-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[3.x] i18n: Add support for translating the class reference #53511
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes godotengine#37109. (cherry picked from commit e817792)
akien-mga
force-pushed
the
3.x-i18n-classref
branch
2 times, most recently
from
October 7, 2021 10:19
74f599a
to
7651000
Compare
timothyqiu
requested changes
Oct 7, 2021
akien-mga
force-pushed
the
3.x-i18n-classref
branch
from
October 7, 2021 10:46
7651000
to
cb6f27d
Compare
(cherry picked from commit aca1971)
Change extract script `path` argument to support specifying multiple paths, like `makerst.py`. This prevents parsing invalid XML files while scanning the whole repository. (cherry picked from commit 87d23bf)
- Parse `.po` files from `doc/translations/*.po` like already done with `editor/translations/*.po`. - Add logic to register a doc translation mapping in `TranslationServer` and `EditorSettings`. - Add `DTR()` to lookup the doc translation mapping (similar to `TTR()`). Strings are automatically dedented and stripped of whitespace to ensure that they would match the translation catalog. - Use `DTR()` to translate relevant strings in `EditorHelp`, `EditorInspector`, `CreateDialog`, `ConnectionsDialog`. - Small simplification to `TranslationLoaderPO`, the path argument was not really meaningful. (cherry picked from commit 4857648)
See godotengine#37114 (comment) (cherry picked from commit 8c3ad2a)
And do the dedent and stripping for both translated and non-translated strings for consistency, and so that we don't need to do it at the call site. (cherry picked from commit a16031b)
(cherry picked from commit 1e3c02d)
akien-mga
force-pushed
the
3.x-i18n-classref
branch
from
October 7, 2021 10:48
cb6f27d
to
583c6d3
Compare
timothyqiu
approved these changes
Oct 7, 2021
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.
Looks good 🎉
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This backports a feature from the
master
branch implemented back in March 2020, at a time where we did not intend prolonged feature development for3.2
.Since we restarted 3.x development with the
3.x
branch, 4.0 is still a ways off, and translators have already started translating the class reference on https://hosted.weblate.org/projects/godot-engine/godot-class-reference/, I'm bringing this to3.x
so that we can make use of the translators' work (mostly Chinese (Simplified) and Spanish which are 100% translated on Weblate, though they'll have 20% of the strings to review and 10% new strings to work on when I sync Weblate with3.x
).Backports the following PRs:
master
)Ref. godotengine/godot-docs-l10n#18
This PR doesn't include the actual translations, I'll sync them in a follow-up.
Once merged with the
3.x
class reference content, it looks like this: