Skip to content
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

String replacement in property name processor breaks translation lookup #23

Closed
Cerno-b opened this issue Nov 6, 2023 · 2 comments
Closed

Comments

@Cerno-b
Copy link

Cerno-b commented Nov 6, 2023

In the editor_property_name_processor.cpp, there are some property substrings that are automatically modified for display in Godot's settings. Unfortunately, this replacement seems to break translation lookup.

Case in point:

  • property: low_processor_mode_sleep_usec
  • name in Weblate: Low Processor Mode Sleep Usec
  • name processor rule: capitalize_string_remaps["usec"] = U"(µsec)"; // Unit.
  • name displayed in the editor in English: Low Processor Mode Sleep (µsec)

I assume that since the name gets modified from Usec to µsec, it can't be found by the translation and will remain untranslated.

image

@timothyqiu
Copy link
Member

It was because our code style was changed from using String::utf8("XXX") to U"XXX", but the extraction script did not catch that.

This is fixed in godotengine/godot-editor-l10n#10. Weblate will be fixed on next sync.

@Cerno-b
Copy link
Author

Cerno-b commented Nov 6, 2023

Nice!

@Cerno-b Cerno-b closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants