php-translation / loco-adapter Goto Github PK
View Code? Open in Web Editor NEWAdapter for Localise.biz
License: MIT License
Adapter for Localise.biz
License: MIT License
Hello,
Have you planned to update and support Symfony >= 5.0
Thanks !
Related to: FriendsOfApi/localise.biz#24
I can implement that feature when we finish the related PR.
Is there a plan to support 8.0 soon-ish? Thanks.
It would be nice to make the Adapters installable by Symfony Flex. For that we need to move TranslationAdapterLocoBundle
to let Flex understands it's a bundle, and add it automatically in bundles.php.
Currently i can configure locales for translation and domains fΓΌr project.
If i configure "fr, "en" and i use "it", it will raise an exception. Project for "%s" domain was not found.
I expected that it will ignore every locale it's not configured for, and the same for domains.
Is there a plan for Symfony 6 support ?
Can you please create a adapter-repo for https://phraseapp.com/?
I will write the source code and tests for it the next days.
In my testing setup I was using yml for storing my translations but the translation:download command downloaded xlf files. Expected behaviour would be to replace the contents of the yml file.
Now, the order of translations - both in yml and xlf format is hard to predict.
I guess that symfony somehow prioritizes xliff files above yml, as xliff is the recommended format.
Let me know if that's an expected behaviour.
An easy fix for that would be to add an option where user can specify desired format.
As we now support Symfony >=5.0, we could migrate from Httplug to symfony/http-client. It will remove an external dependency (if you're using php-translation/symfony-bundle).
Symfony HTTP Client offers same features as Httplug, full support of HTTP protocol, many clients per application by configuration, ...
EDIT: Main discussion will be here, after decision we will open or not issues on other adapters repositories.
The adapter is using the Translation API
to delete translations. This empties the translation message but doesn't delete the asset. Is this the desired behavior? Would it make more sense to use the Asset API
?
I will be glad to make a PR if we decide to switch to the Asset API
.
Line 160 in 81ffde8
Hi !
First of all, thank you for your work !
Context : Today, i started to install php-translation/symfony-bundle
and php-translation/loco-adapter
on a project where we, as developers, were doing only french translations with .yml
files. But for now, we need to focus on i18n. So, we'll use Loco to have a clean UI for future translators.
I wanted to know if there is a way to get assets ID created from source keys with the API of Loco. I didn't found any info. It works using import form on the UI of Loco but there's no option for the API.
I may have missed something. ^^
It looks like this #189
Thank you !
Is there a plan for Symfony 7 support ?
Hi,
In HttpApi.php line 187:
Asset not translated in this locale
I have this error when trying to remove obsolete translations.
As far as I understand, the API response is that the translation does not exist and an error is thrown.
There is no reason to throw that error. This is the expected behaviour.
I would rather expect these strings to be, by default, the same as the key.
Also, the fallback language will not work in this case.
What is the expected scenario here?
Hi !
I've seen that "Fuzzy" translations are not exported.
Should we consider it as normal ? Should we make it as configurable through the Symfony Bundle ?
Depending on environment (development, production, etc.) we would want to keep translations or not if the status changes.
Thank you ! π
In the Readme.md
is an option which describes to use the domains
configuration to use tags for domains. This isn't really an option at the moment (afaik) because tags aren't created from the api.
This results in an issue where translations without tags are created on loco and existing translations are added to wrong/all domains locally when running the translation:sync
command.
Maybe this is a known issue. I use:
php-translation/extractor 1.1.1 Extract translations form the source code
php-translation/loco-adapter 0.3.1 Adapter for loco.
php-translation/symfony-bundle 0.3.6
php-translation/symfony-storage 0.2.2 A translation file storage using Symfony translation component.
Error I get:
[2017-07-14 15:35:51] [hostname:vagrant] [region:pl] [request_id:???] request.INFO: Matched route "php_translation_profiler_translation_edit". {"route":"php_translation_profiler_translation_edit","route_parameters":{"_controller":"Translation\\Bundle\\Controller\\SymfonyProfilerController::editAction","token":"44dfc5","_route":"php_translation_profiler_translation_edit"},"request_uri":"http://web-local.***dev.com/app_dev.php/44dfc5/translation/edit?message_id=plmessagesmeta_keywords","method":"GET"} []
[2017-07-14 15:35:52] [hostname:vagrant] [region:pl] [request_id:???] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2017-07-14 15:35:53] [hostname:vagrant] [region:pl] [request_id:???] request.CRITICAL: Uncaught PHP Exception Http\Discovery\NotFoundException: "No HTTPlug clients found. Make sure to install a package providing "php-http/client-implementation". Example: "php-http/guzzle6-adapter"." at /vagrant/vendor/php-http/discovery/src/HttpClientDiscovery.php line 27 {"exception":"[object] (Http\\Discovery\\NotFoundException(code: 0): No HTTPlug clients found. Make sure to install a package providing \"php-http/client-implementation\". Example: \"php-http/guzzle6-adapter\". at /vagrant/vendor/php-http/discovery/src/HttpClientDiscovery.php:27, Http\\Discovery\\Exception\\DiscoveryFailedException(code: 0): Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors\n - Puli Factory is not available\n\n at /vagrant/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php:41)"} []
[2017-07-14 15:35:59] [hostname:vagrant] [region:pl] [request_id:???] request.INFO: Matched route "php_translation_profiler_translation_sync". {"route":"php_translation_profiler_translation_sync","route_parameters":{"_controller":"Translation\\Bundle\\Controller\\SymfonyProfilerController::syncAction","token":"44dfc5","_route":"php_translation_profiler_translation_sync"},"request_uri":"http://web-local.***dev.com/app_dev.php/44dfc5/translation/sync","method":"POST"} []
[2017-07-14 15:36:00] [hostname:vagrant] [region:pl] [request_id:???] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2017-07-14 15:36:00] [hostname:vagrant] [region:pl] [request_id:???] request.CRITICAL: Uncaught PHP Exception Http\Discovery\NotFoundException: "No HTTPlug clients found. Make sure to install a package providing "php-http/client-implementation". Example: "php-http/guzzle6-adapter"." at /vagrant/vendor/php-http/discovery/src/HttpClientDiscovery.php line 27 {"exception":"[object] (Http\\Discovery\\NotFoundException(code: 0): No HTTPlug clients found. Make sure to install a package providing \"php-http/client-implementation\". Example: \"php-http/guzzle6-adapter\". at /vagrant/vendor/php-http/discovery/src/HttpClientDiscovery.php:27, Http\\Discovery\\Exception\\DiscoveryFailedException(code: 0): Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors\n - Puli Factory is not available\n\n at /vagrant/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php:41)"} []
[2017-07-14 15:36:18] [hostname:vagrant] [region:pl] [request_id:???] request.INFO: Matched route "php_translation_profiler_translation_sync". {"route":"php_translation_profiler_translation_sync","route_parameters":{"_controller":"Translation\\Bundle\\Controller\\SymfonyProfilerController::syncAction","token":"44dfc5","_route":"php_translation_profiler_translation_sync"},"request_uri":"http://web-local.***dev.com/app_dev.php/44dfc5/translation/sync","method":"POST"} []
[2017-07-14 15:36:18] [hostname:vagrant] [region:pl] [request_id:???] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2017-07-14 15:36:18] [hostname:vagrant] [region:pl] [request_id:???] request.CRITICAL: Uncaught PHP Exception Http\Discovery\NotFoundException: "No HTTPlug clients found. Make sure to install a package providing "php-http/client-implementation". Example: "php-http/guzzle6-adapter"." at /vagrant/vendor/php-http/discovery/src/HttpClientDiscovery.php line 27 {"exception":"[object] (Http\\Discovery\\NotFoundException(code: 0): No HTTPlug clients found. Make sure to install a package providing \"php-http/client-implementation\". Example: \"php-http/guzzle6-adapter\". at /vagrant/vendor/php-http/discovery/src/HttpClientDiscovery.php:27, Http\\Discovery\\Exception\\DiscoveryFailedException(code: 0): Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors\n - Puli Factory is not available\n\n at /vagrant/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php:41)"} []
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.