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

Translations that start with an _ or - generate a file named <translation>..translation #83573

Closed
IntangibleMatter opened this issue Oct 18, 2023 · 2 comments · Fixed by #83600

Comments

@IntangibleMatter
Copy link
Contributor

Godot version

4.1.1 stable

System information

Linux Pop!_OS 22.04 LTS

Issue description

When you create a CSV file to import for translation, if you have a locale that begins with an underscore or a hyphen, it will be semi-ignored, with all columns that have a hyphen or underscore being shoved into one translation file with the name ..translation.

Ideally this would be imported properly, or better yet work like godotengine/godot-proposals#8183.

Steps to reproduce

Create a translation CSV and add a locale column that starts with an _ or a -. Import it, and a translation file with no locale will be imported.

Minimal reproduction project

trtest.zip

@jsjtxietian
Copy link
Contributor

jsjtxietian commented Oct 19, 2023

Confirmed. The problem is that when godot meets unrecognized locale, it just use an empty as it's name and this will produce a .<empty>. and thus ..
I think for this bug fix we can just ignore the wrong "lang" tags (see https://docs.godotengine.org/en/stable/tutorials/assets_pipeline/importing_translations.html, engine make a string assumption about tranlation format) . As for that proposal, it may still need more discussion before implentation.

@bruvzg
Copy link
Member

bruvzg commented Oct 20, 2023

Locale code should have specific format, see - https://docs.godotengine.org/en/stable/classes/class_os.html#class-os-method-get-locale

@akien-mga akien-mga added this to the 4.2 milestone Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants