Closed Wuzzy2 closed 8 months ago
This can be solved by giving context to the translation. Although not sure if we support it for properties.
Yeah, another example is the word "Normal". It's used both for "Normal" vector of WorldBounaryShape2D
and for "Normal" texture / theme item of UI elements. The former usage has a dedicated term in Chinese.
I'll try to make it possible to add context for properties.
If 3.x series is still getting translations, "Switch" has the same issue: "Switch" block for VisualScript, and switching action for animation frames.
Created a proof of concept PR #82852
Some details may need to be refined. Suggestions are welcome.
I don't know how this will show up on Weblate. In case we get two entries for the two meanings, Weblate's "distribute translation" setting needs to be turned off, otherwise they will be coupled to a single translation that renders this work useless.
Strings with different context are different entries (also different from a version without any context). They won't propagate to each other.
Propagation between different Weblate components is not related to this issue.
Strings with different context are different entries (also different from a version without any context). They won't propagate to each other.
Propagation between different Weblate components is not related to this issue.
Thanks, that is nice to hear then. One more question though: should this be done separately every time we find one such string? or do your edits apply a general formulae?
Context should be added separately.
I think this should be done on a case-to-case basis. It doesn't seem to happen often.
I tried naive approach and gave up after checking 200 for the moment :) there are 602 single words in editor, and 773 in properties (single words are the most possible places). I leave finding such words in my language to my next run for proof-reading my translations.
thanks for the "force" and "normal"
I wonder. Could the description of the Editor Settings themselves be used as translation context? I am aware they come from the documentation's XMLs, but could it be doable...?
Property names don't come from documentation XMLs. They are extracted from C++ source code like this one:
Using descriptions as contexts will have some problems:
Context are expected to be a word or a short sentence. It breaks common editing UI like Poedit and Weblate :P
I worked with both Poedit and Weblate and both support context. Why do you think using context "breaks" these softwares? o_O
I agree that using a description as context is overkill tho; I agree that it is not needed to add a context for everything to fix this issue.
I mean, it breaks the UI, not the software ;) Because those descriptions are very long, and may contain multiple lines.
I don't know what happens to the UI of Gettext and Weblate if the context is very long but if it breaks, that's a bug in the software. But I still agree that context should be normally be kept short. Thanks for clarification; I was confused.
Note to self (and anyone who translates): Fix the translation once this ticket is merged.
Godot version
v4.2.dev.custom_build [f5696c311]
System information
Godot v4.2.dev (f5696c311) - Arch Linux #1 SMP PREEMPT_DYNAMIC Sat, 23 Sep 2023 22:55:13 +0000 - X11 - GLES3 (Compatibility) - Mesa Intel(R) HD Graphics 2000 (SNB GT1) () - Intel(R) Core(TM) i5-2500S CPU @ 2.70GHz (4 Threads)
Issue description
While translating Godot, I noticed there is a string with an ambigious meaning in Godot Properties: "Force".
This string is used with two different meanings:
editor/import/resource_importer_wav.cpp
it is used to force certain WAV import settings in the WAV importer.scene/2d/physics_body_2d.cpp
andscene/3d/physics_body_3d.cpp
, it is used to mean physical force, something entirely different.This makes it impossible to translate in some languages. This also applies to v4.1 stable.
The string in Weblate: https://hosted.weblate.org/translate/godot-engine/godot-properties/de/?checksum=b2baabd9a1355710
Suggested fix: To fix this, I suggest to either make use of the Gettext context feature or by changing the string in one of the two contexts.
Steps to reproduce
First, let me show where you can find the string in Godot:
To find the string in the first meaning, go to Project Settings > Import default values, then select the Microsoft WAV importer from the drop-down list. Here you see the word "Force" as a header, meaning to force certain WAV import settings like 8-bit.
For the second meaning, add a RigidBody2D node, select it, and in the inspector go to "Constant Forces". In this section you can also find the word "Froce" (for
constant_force
), but to mean physical force.Now try to translate it into German. Oops! It doesn't work. Forcing something translates to "erzwingen" while physical force translates to "Kraft". There is no way in German to work around this. You will probably bump into issues with other languages as well.
Minimal reproduction project
N/A