-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Add custom methods for adding editor translations #77104
Conversation
I'll repeat my comments from RC. I don't think this should be done using new custom methods. |
4691223
to
5d72a71
Compare
5d72a71
to
4c8fd70
Compare
I think this is generally a better approach than #82158. Instead of writing translation logic in godot/core/string/translation.h Lines 79 to 82 in c12d635
Then |
4c8fd70
to
e863cec
Compare
Updated with the above suggestion. Sorry for the delay 🙃 |
e863cec
to
220c42d
Compare
220c42d
to
9dd97ff
Compare
Found a problem. When you add translation, it will always be used for translating matching messages, even if the locale doesn't match. How it should be handled? Should non-matching locales get ignored? (i.e. not added) Or it should be simply documented? |
Superseded by #95787. |
Closes godotengine/godot-proposals#6885
Closes godotengine/godot-proposals#1262
Test addon with translation:
translationtest.zip
The implementation is as described in the proposal, but it has one problem - it doesn't support translation context. Coupled with the fact that duplicate messages trigger a warning, there is a chance for a conflicting messages in translations of multiple plugins.
Alternative suggested approach is to modify TranslationServer methods to work in editor. It would still likely require a separate method, because AFAIK TranslationServer handles only project's translations (I think even in editor?). Editor translations have some dedicated methods that work differently.