Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract translations by domain ? #461

Open
ikodev opened this issue Oct 5, 2017 · 1 comment
Open

Extract translations by domain ? #461

ikodev opened this issue Oct 5, 2017 · 1 comment

Comments

@ikodev
Copy link

ikodev commented Oct 5, 2017

Hello !
Is it possible (or could be a nice improvement) to allow the extraction by domain ?
I havn't found that feature in the doc...

Currently in our team, when we extract by configuration (--config=...), the command regenerate useless files with only a timestamp changed in top file (xliff). These committed files in our project are useless for our diff check before a production delivery. Sometimes we would love to extract translations by domains only.

$container->get('translator')->trans('our_key', [], 'specific_domain_to_extract');

Thank you for your advice :)

| ---------------- | ---
| Bundle version | 1.3.2
| Symfony version | 3.3.9
| PHP version | 7.0

@Nattfarinn
Copy link

Few solutions:

  • Don't extract references and dates at all:
jms_translation:
    # ...
    dumper:
        add_references: false
        add_date: false
  • Use --domain argument:
$ bin/console translation:extract --config=example_config --domain=specific_domain_to_extract
  • Add domains to config:
jms_translation:
    # ...
    configs:
        example_config:
            # ...
            domains: ["specific_domain_to_extract"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants