1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

Add CSV translation template generation

This commit is contained in:
Haoyu Qiu
2025-10-29 17:44:13 +08:00
parent 07f4c06601
commit ea9a2c3b2c
9 changed files with 404 additions and 374 deletions

View File

@@ -40,8 +40,7 @@ class Translation : public Resource {
OBJ_SAVE_TYPE(Translation);
RES_BASE_EXTENSION("translation");
String locale = "en";
public:
struct MessageKey {
StringName msgctxt;
StringName msgid;
@@ -56,6 +55,9 @@ class Translation : public Resource {
}
};
private:
String locale = "en";
HashMap<MessageKey, Vector<StringName>, MessageKey> translation_map;
mutable PluralRules *plural_rules_cache = nullptr;