becklyn/translations-extractor

Extracts translations from the given directory.

Maintainers

👁 becklyn

Package info

github.com/Becklyn/translations-extractor

Type:lib

pkg:composer/becklyn/translations-extractor

Statistics

Installs: 9 603

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.1.1 2023-05-23 14:49 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

BSD-3-Clause f29335b16e9bf8ce3be870ef5810495a586ffefe

This package is auto-updated.

Last update: 2026-06-23 21:23:55 UTC


README

CLI command, that helps extracting translations in Symfony projects.

Installation

It's best to install this command using the composer-bin-plugin:

composer bin test req becklyn/translations-extractor 

Usage

Call the command using the CLI:

./vendor/bin/extract-translations src/ templates/

As arguments, pass the list of directories to search in.

Options

You can pass in extension names for twig, so that Twig doesn't complain about missing functions (or filters, etc.).

  • --mock-function the names of the functions to mock
  • --mock-filter the names of the filters to mock
  • --mock-test the names of the tests to mock
./vendor/bin/extract-translations src/ --mock-filter normalize --mock-filter normalize_another

There is a list of predefined mocks, take a look in MockExtension.