-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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 context support for editor property name i18n #82852
Conversation
Using "Noun" or "Verb" as context is a bad idea because sometimes even identical nouns or verbs can have different meanings. The Gettext context entry is supposed to describe something like a topic or category that fits to that string or some other identifier that clearly helps to fix the ambiguity. See also: https://www.gnu.org/software/gettext/manual/gettext.html#Contexts |
Granted but it refers to how English uses it, i.e. what word to translate from The difference between "A Constant Force" and "To Be Constant Forcing" |
I think you might be worried that "Noun" and "Verb" won't resolve all the possible ambiguities in the project? These contexts are not part of a fixed set of labels that would be picked from when a new ambiguous string appears. They are chosen on a case-by-case basis for each ambiguous string independently. In this case, the two existing usages are "Constant Force Applied to the Object" and "Force the Audio File to be Imported as 8-Bit". I thought about "Physics" vs "Audio" too, but it feels weird because the word "force" itself has nothing to do with audio. |
Yes, technically the context could be anything to just resolve the collision. I was just arguing it could be a little bit more descriptive. But technically this is not 100% required as long all collisions are resolved. |
@Wuzzy2 Any suggestions? |
For the physical "Force", name the context "physics". |
44a8c14
to
8e15eb2
Compare
Changed to "Physics" and "Enforce". I think "forcing a setting" is a bit specific. |
7555e44
to
ae2b902
Compare
I tested the context for Normal and it works for "Geometry", but not for "Ordinary". Theme overrides translate the names without using context. |
Good catch! I tested with Ordinary one and no context one being the same, so I didn't spot that bug. I'll work on that. |
ae2b902
to
24e0be6
Compare
theme->set_font("normal", "Fonts", Ref<Font>()); | ||
theme->set_font("large", "Fonts", Ref<Font>()); |
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.
Note: These two are removed because
- They were used to store default theme fonts when Godot was open sourced. But fonts were changed to a dedicated theme member later, so these entries were abandoned.
- They add unnecessary strings to translate. Not worth adding exceptions for.
24e0be6
to
c36a8f6
Compare
c36a8f6
to
479b7af
Compare
Thanks! |
Fixes #82788
process_name()
: full property path & class nameconstant_force
vsforce/8_bit
Decal.texture_normal
andTextureButton.texture_normal
EditorPropertyNameProcessor
full/property/path
or forClass::full/property/path
theme_overrides_style/normal
as it applies to many UI nodes