Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Translation][FrameworkBundle] Adding Translation Providers#37462
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
YaFou commentedJul 1, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm really interested in this new feature! Thank you, it's promising! 👏 I also have another adapter that can be implemented:Crowdin. |
326c05e tode0138fCompare5beef58 tob9f5792CompareUh oh!
There was an error while loading.Please reload this page.
b9f5792 to5cd37f5CompareUh oh!
There was an error while loading.Please reload this page.
43a9251 to9a230fdCompareYaFou commentedAug 8, 2020
@welcoMattic for the Transifex bridge, have you try to use |
aa50e05 todb0a76dComparewelcoMattic commentedSep 1, 2020
Before continuing the work on this PR, I ask myself several questions:
|
fabpot left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I've just done a very very quick review to better understand the PR and its goals.
src/Symfony/Bundle/FrameworkBundle/Command/TranslationPullCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/TranslationPullCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/TranslationPullCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/TranslationPullCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/TranslationPushCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| useSymfony\Component\Translation\TranslatorBag; | ||
| class RemoteDecoratorimplements RemoteInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Why is it useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It is in theread method, that we merge wanted domains (passed as arguments in commands) with default domains (defined in configuration)
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
fabpot commentedSep 7, 2020
I think we would need at least 2 (or 3) providers to exercise the API and be sure it's generic and powerful enough. |
welcoMattic commentedSep 12, 2020
Thank you for the review. I'm ok to add 2 or 3 Providers (I will rename RemoteStorage for Provider). |
7d48c0c to5afca3bComparewelcoMattic commentedSep 29, 2020
@andrii-bodnar Hi, sorry but I do not understand how Crowdin API works for uploading translations. You mentioned theUpload Translations endpoint, but in the documentation, there is no mention of content uploading. How do I upload existing translations and in which format? |
andrii-bodnar commentedSep 29, 2020
Hi@welcoMattic, let's imagine you have domainadmin.en.xlf and French translations -admin.fr.xlf Fileadmin.en.xlf is being added to the Crowdin project. Now, if you want to uploadadmin.fr.xlf translations to Crowdin, you need to create a Storage with this file and useUpload Translations method. This method accepts |
welcoMattic commentedSep 29, 2020
@andrii-bodnar thank you for the quick answer. Ok, it's not very easy to understand the concepts of Storage and File, moreover with an Upload operation between them. But ok, I will try to implement this workflow in Symfony. Thanks again. |
welcoMattic commentedSep 29, 2020
@andrii-bodnar can we discuss by email or inSymfony Slack? I still have difficulties to send existing translations to Crowdin. |
andrii-bodnar commentedSep 29, 2020
@welcoMattic, sure, I'll try to join Symfony Slack. |
stephane-lou commentedSep 30, 2020
This is a very welcome feature, thanks for the work guys ! |
5afca3b tod88294eComparewelcoMattic commentedOct 1, 2020
Well, there's still a lot of work here before we get to a complete and stable functionality (especially for the Provider Crowdin), and then the functional tests are not written yet. For Crowdin, we have been working the last few days with@andrii-bodnar in order to implement all needed API calls, and it remains the For Transifex, I need to work again the Provider, and explore the API more deeply to find the right way to do things. For all these reasons, I think we should target a merge for 5.3, it's more reasonable than speed up work and merge an unstable feature in 5.2. |
fabpot commentedOct 7, 2020
We've just moved away from |
This PR was merged into the 5.3-dev branch.Discussion----------[Translation] Adding Translation Providers| Q | A| ------------- | ---| Branch? | 5.x| Bug fix? | no| New feature? | yes| Deprecations? | no| Tickets |Fix#36543| License | MIT| Doc PR | todo> Follow up of#37462This PR refers to the early opened RFC#36543 about adding third party translation SaaS into Symfony.I worked in collaboration with `@odolbeau` on this first draft.We have implemented only Loco Provider for now, to validate the main workflow of the feature.~~We are not very sure about some naming convention, such as Remote Storage, it might be renamed in Transport, to correspond to the naming of third party services in Mailer and Notifier Components.~~ We use Provider name.This PR brings 2 new commands in Translation component: `translation:push` and `translation:pull`It adds also new configuration entry:```yamlframework: default_locale: fr translator: default_path: '%kernel.project_dir%/translations' enabled_locales: '%locales%' fallbacks: - en - it providers: loco: dsn: '%env(LOCO_DSN)%' domains: ['messages'] locales: '%locales%'```## To do- [x] Implement Provider into Translation component- [x] Plug it into FrameworkBundle- [x] Implement pull and push commands- [x] Implement Loco adapter- [x] Tests- [ ] Documentation- [x] Update CHANGELOG.md files in FrameworkBundle and Translation ComponentDocs:Adapt language settings in Lokalise to be sure that Symfony locales match with Lokalise languagesTodo:- [x] Implement POEditor Provider (:warning: there is a trick to do in POEditor Dashboard in order to make XLF export works, it will have to be documented explicitly in the symfony/symfony-docs PR)- [x] Implement Lokalise Provider- [x] Implement Crowdin ProviderThese 3 providers are implemented separately. They are not fully tested yet, it is planned to make it done by the end of April 2021.Commits-------6e55fa8 Added Translation Providers
Uh oh!
There was an error while loading.Please reload this page.
This PR refers to the early opened RFC#36543 about adding third party translation SaaS into Symfony.
I worked in collaboration with@odolbeau on this first draft.
We have implemented only Loco Provider for now, to validate the main workflow of the feature.
We are not very sure about some naming convention, such as
Remote StorageProvider, it might be renamed in Transport, to correspond to the naming of third party services in Mailer and Notifier Components.This PR brings 2 new commands in FrameworkBundle:
translation:pushandtranslation:pullIt adds also new configuration entry:
To do
Remote StoragesProvider into Translation componentTransifex Provider
To do:
Crowdin Provider
To do: