-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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 editor pseudolocalization support. #96105
base: master
Are you sure you want to change the base?
Conversation
ec1bb9c
to
6209dd5
Compare
Note: The doubled square brackets seem to indicate that a lot of editor strings are running through translation twice, e.g., "Scene" tab name is:
editor_dock_manager->add_dock(SceneTreeDock::get_singleton(), TTR("Scene"), EditorDockManager::DOCK_SLOT_LEFT_UR, nullptr, "PackedScene");
tabs.write[p_tab].text_buf->add_string(atr(tabs[p_tab].text), theme_cache.font, theme_cache.font_size, tabs[p_tab].language); |
6209dd5
to
6f28b97
Compare
Yeah editor has auto-translation enabled, but all strings are set pre-translated. We could be using TTRC almost everywhere. |
The removal of TextServerExtension methods without deprecation is a breaking change. |
I wonder how users would benefit from toggling pseudolocalization translation in the Editor Settings dialog. You need to recompile the editor in order to test your own translation anyway. Translations in official builds are almost always out of sync with Weblate. |
It could be useful for plugins, once we support translating them. |
It's not useful for most of the editor users, but useful for editor development. I would hide it under "advanced" toggle, but we only have it for project settings, and adding it specifically for this seems like overkill. |
For external |
We actually had but just removed support for editor pseudolocalization in #93554, because:
|
And editor localization is an absolute mess of half untranslated and half double translated strings, which is instantly visible with pseudolocalization and impossible to detect without it.
Not sure how it's possible, but I guess it can be build option disabled by default, it's definitely a useful feature. |
I think that the main problem with that feature was in a pretty nasty spot in the Editor Settings, where it was a bit too easy to enable on accident when messing around with the other |
6f28b97
to
0ea6685
Compare
0ea6685
to
956d85c
Compare
Added build flag (disabled by default). |
I suppose that... a build flag is reasonably accessible for just this purpose? Never really looked into them much, just so long as it's possibile to know their existence. If it needs to be documented somewhere too, so be it. |
|
I haven't had time to review the PR and discussion properly so TIWAGOS, but IMO a build option for this might be overkill. A command line option to enable pseudolocalization makes IMO more sense (and we can make it |
I really wish this was done after #95787 is merged 😅 That PR makes TranslationServer handle different parts of the editor uniformly. Pseudolocalization was kept project-only (only affects main translation domain) to keep that PR's changes minimum. After moving pseudolocalization logic into TranslationDomain, it'll be easy to make a command-line option to enable pseudolocalization for the editor, or just ask devs to call something like Update: after writing this, I realized that there is a prerequisite for proper editor pseudolocalization: changing most TTRs to TTRC (and also updating the text that uses TTRN and TTRs with context in |
Moves localized number formatting methods from TextServer to TranslationServer. Adds support for localized numbers pseudolocalization. Adds editor/project manager pseudolocalization support.
956d85c
to
ce3df88
Compare
I agree with that approach as well, although I don't think we need to put it behind |
TextServer
toTranslationServer
. This is a more appropriate place for these (it's using custom code and not related to any of the otherTextServer
parts), and better handle differnet tool/project locales.