You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #15310 [Translation] Introduce Translation Providers (welcoMattic)
This PR was submitted for the 5.4 branch but it was squashed and merged into the 5.3 branch instead.
Discussion
----------
[Translation] Introduce Translation Providers
Docs for symfony/symfony#38475, symfony/symfony#40926, symfony/symfony#40927, and symfony/symfony#40947
Ready for first review, but I'm not sure that I've written documentation in the right and all required places.
ATM, Translation Providers Bridges packages doesn't exists, so Flex recipes are not created yet.
Commits
-------
943a63f [Translation] Introduce Translation Providers
To push your existing translations to your configured third party provider, you have to use the `translation:push` command:
713
+
714
+
.. code-block:: terminal
715
+
716
+
# push all local translations to the Loco provider for the locales and domains configured in config/packages/translation.yaml file
717
+
# it will update existing translations already on the provider.
718
+
$ php bin/console translation:push loco --force
719
+
720
+
# push new local translations to the Loco provider for the French locale and the validators domain.
721
+
# it will **not** update existing translations already on the provider.
722
+
$ php bin/console translation:push loco --locales fr --domain validators
723
+
724
+
# push new local translations and delete provider's translations that not exists anymore in local files for the French locale and the validators domain.
725
+
# it will **not** update existing translations already on the provider.
726
+
$ php bin/console translation:push loco --delete-missing --locales fr --domain validators
727
+
728
+
# check out the command help to see its options (format, domains, locales, etc.)
729
+
$ php bin/console translation:push --help
730
+
731
+
To pull translations from a provider in your local files, you have to use the `translation:pull` command:
732
+
733
+
.. code-block:: terminal
734
+
735
+
# pull all provider's translations to local files for the locales and domains configured in config/packages/translation.yaml file
736
+
# it will overwrite completely your local files.
737
+
$ php bin/console translation:pull loco --force
738
+
739
+
# pull new translations from the Loco provider to local files for the French locale and the validators domain.
740
+
# it will **not** overwrite your local files, only add new translations.
741
+
$ php bin/console translation:pull loco --locales fr --domain validators
742
+
743
+
# check out the command help to see its options (format, domains, locales, intl-icu, etc.)
0 commit comments