-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I'm not quiet sure if this belongs here or if it should be part of the cakephp repo.
Currently cakephp's i18n extract-command only looks for and reads files with the php-extension (https://github.com/cakephp/cakephp/blob/8b5d4b65ca63478bb525042eb95071d6749b5c30/src/Command/I18nExtractCommand.php#L839)
This leads to missing translatable strings from .twig-files when using this twig-view-package.
Simply adding the twig-extension in the lookup is not sufficient because the _extractTokens()-method of that command uses php's token_get_all()-function (see https://github.com/cakephp/cakephp/blob/8b5d4b65ca63478bb525042eb95071d6749b5c30/src/Command/I18nExtractCommand.php#L431)
The two main questions I have:
- How to parse the twig templates files and look for calls to the i18n functions?
- How to add that functionality to the command line?
Should this package provie a standalone extract command? Would it be possible to extend cakephp'sI18nExtractCommand?
Metadata
Metadata
Assignees
Labels
No labels