X Tutup
Skip to content

Fix loading old-style translation files#113322

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
nikitalita:fix-translation
Dec 3, 2025
Merged

Fix loading old-style translation files#113322
Repiteo merged 1 commit intogodotengine:masterfrom
nikitalita:fix-translation

Conversation

@nikitalita
Copy link
Contributor

@nikitalita nikitalita commented Nov 29, 2025

Fixes regression introduced in #108862 .

Versions of Godot prior to current had unoptimized Translation files stored with their messages as Strings, rather than StringNames.
image

As a result of #108862 's changes, the keys for unoptimized translations fail to load. This fixes it.

cc @timothyqiu

@nikitalita nikitalita requested a review from a team as a code owner November 29, 2025 15:35
Copy link
Member

@timothyqiu timothyqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit surprised because _get_messages() has always stored StringName in the Dictionary to be saved.

However, it turns out that StringName keys were converted to Strings when saving prior to 4.4 (see #70096). So this makes sense.

@nikitalita
Copy link
Contributor Author

@timothyqiu can you approve this?

@Repiteo Repiteo merged commit 66333f9 into godotengine:master Dec 3, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 3, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup