-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Suggestion on the translation system #40418
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
Comments
Hey. Cool. It looks like you want to modify the Slightly related: This PR might be interesting for you: #38475. It creates a connection with the online PoEdit so you can import/export translation files to your project. About |
Hi, nice to see an effort put into improving translators/devs experience with i18n. I never used I also opened a PR that implements translation variables extraction as additional notes: #38884 (there's a screenshot that shows PoEdit support to XLIFF notes) |
Hi, @Nyholm For the setDefaultDomain, it is to have the same operation as under Twig with {% trans_default_domain 'mynamefile' %}. I take note of your remark anyway. @liarco For the code, I did something fast based on the translation codes, as I don't know Symfony too much, I'm going gradually XD Regards, |
Thank you for this issue. |
Could I get a reply or should I close this? |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
Description
Symfony allows you to do a lot of things, but I'm having a hard time managing languages. We do not exploit the potential of language files.
The Xliff, for example, you cannot put comments in the code, it is ignored, and if you put the comments in an xlif file, during the next update run, they are all deleted. Identical for po files. I read your files and watch to keep it simple, because there is no point in making gas plants either. I therefore took over the basis of the management of po files to directly manufacture templates, .pot.
We make the best use of the generated files and the use of PoEdit or others to translate the files with the keys and the source text. Then we take the translation program we open the .pot file, we translate, we save it in .po, the little tinkering I change the extension to .to so as not to modify the existing po system. Which gives as in the examples.
Example
By default
With feature
#. S or P using comment developper for key
msgctxt for context eg : Rage, Important, Happy etc..
and msgid they are really used for text
Look bottom right

For single
For plurial

I will not hide from you that this is the first time that I use a framework and I chose Symfony to create a project (self-taught) and to do well this project is a game that integrates forum, blog, chat, discord link etc. If I cut it represents 47 bundles. Given its size and complexity, I find myself faced with things that are missing. May I also suggest, would it be possible to add a setDefaultdomain to TranslatorInterface to avoid putting each time the domain for which the translation is intended in the controllers?
Here are the files necessarily you have to do the service in the configurations.
Translator.tar.gz
Thank you :)
Regards,
The text was updated successfully, but these errors were encountered: