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] Added Lokalise Provider#40927
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
carsonbot commentedApr 23, 2021
Please note that you need squash your commits before this PR can be merged. The maintainer can also squash the commits for you, but then you need to “Allow edits from maintainer” (there is a checkbox in the sidebar of the PR). Cheers! Carsonbot |
OskarStark 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.
Do you need to adjust UnsupoortedSchemeException like we do for the Notifier?
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…etter (Nyholm)This PR was merged into the 5.3-dev branch.Discussion----------[CI] Sort packages by length to match modified package better| Q | A| ------------- | ---| Branch? | 5.x| Bug fix? | no| New feature? | no| Deprecations? | no| Tickets || License | MIT| Doc PR |Given the build error in#40927, I saw that we match "modified packages" wrong. The script things we modified `symfony/translation` rather than the new bridge. This is because we are using a simple [string matchning](https://github.com/symfony/symfony/blob/18658a29a37d6de3e73c95f96fb9e51bf1d5f59d/.github/get-modified-packages.php#L24). If we sort the packages by length, we make sure we match the most detailed (longest) string first.Commits-------f7a0bd1 [CI] Sort packages by length to match modified package better
c41ea84 to749cca8Comparesrc/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
welcoMattic commentedApr 28, 2021
Thanks@OskarStark for the quick review, I have not finish the revamp of Lokalise accordingly to the recent changes 😉 |
welcoMattic commentedMay 5, 2021 • 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.
status: needs review CI failures seems unrelated to this PR. |
906af69 tod7a0ad9Compared434655 to2399fc7Compare2399fc7 to608685fCompare
nicolas-grekas 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.
(with easy to fix comments)
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
4fef59d to31df459Comparefabpot commentedMay 9, 2021
Tests seem broken. |
15b6ba2 to6a5d222ComparewelcoMattic commentedMay 9, 2021
@fabpot I've just pushed a fix (adding symfony/config as dev dependency of the Lokalise Provider Bridge). It fixes tests on Travis. On AppVeyor, failures seems unrelated |
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.
LGTM, to be merged after the HOST constant is fixed.
src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProviderFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ebd9708 tofe0685aComparewelcoMattic commentedMay 10, 2021 • 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.
@fabpot Last comment has been addressed, branch has been rebased, it looks ready 👍 |
src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProviderFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
631b635 to82179a6Comparesrc/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProviderFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
3b068e8 to89f9e1dCompare89f9e1d to022d828Comparefabpot commentedMay 10, 2021
Thank you@welcoMattic. |
stof commentedMay 10, 2021
@welcoMattic actually, the symfony/config component is necessary when using the xliff loader (which is why it is only a dev dependency in symfony/translation as you are not forced to use xliff). As the Lokalise provider relies on loading xliff, it should have a non-dev requirement on symfony/config |
stof commentedMay 10, 2021
@welcoMattic does this provider handle properly the fact that Symfony translation keys are only unique inside a domain, not globally ? |
welcoMattic commentedMay 10, 2021
@stof indeed, actually all Translation Providers use About handling translation keys by domain and not glabally, I paid attention to handle it in all Providers after your first comment about it. |
stof commentedMay 10, 2021
yes, indeed. |
welcoMattic commentedMay 10, 2021
This PR was merged into the 5.3-dev branch.Discussion----------[Translation] Improved Translation Providers| Q | A| ------------- | ---| Branch? | 5.x| Bug fix? | no| New feature? | no| Deprecations? | no| Tickets || License | MIT| Doc PR |Some small improvements on Translation Providers:- move symfony/config from dev dependency to hard dependency for all Bridges as all providers use XliffFileLoader to load pulled translations (cf.#40927 (comment))- replace all instances of```'headers' => [ 'Authorization' => 'Bearer API_TOKEN',]```with `'auth_bearer' => 'API_TOKEN',` even in tests files.- Fix Lokalise base_uri concatenationCommits-------84fd13c Improved Translation Providers
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 ProvidersDocs forsymfony/symfony#38475,symfony/symfony#40926,symfony/symfony#40927, andsymfony/symfony#40947Ready 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
Uh oh!
There was an error while loading.Please reload this page.
To follow up on#38475, this PR addsLokalise Provider.
The todo list to make it ready is:
ProviderInterfaceandTranslatorBagInterface(we removed theall()andgetDomains()method from TranslatorBagInterface)src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.phpfileSymfony\Component\Translation\Exception\UnsupportedSchemeExceptionLokaliseProviderandLokaliseProviderFactoryfromSymfony\Component\Translation\Bridge\Lokalise\ProvidertoSymfony\Component\Translation\Bridge\LokalisenamespaceThe major part of the remaining work concerns tests, I will make it done before the beginning of May.