diff --git a/desktop_version/lang/README-programmers.txt b/desktop_version/lang/README-programmers.txt index 019ae7bfea..ecaf5ee7d2 100644 --- a/desktop_version/lang/README-programmers.txt +++ b/desktop_version/lang/README-programmers.txt @@ -1,6 +1,8 @@ === I N T R O D U C T I O N === -This file will explain what you need to know when maintaining translations of VVVVVV (like adding new strings and syncing them across languages). +This file will explain what you need to know when maintaining translations of VVVVVV (like adding new strings to the game and syncing them across languages). + +For making new translations of the game, read README-translators.txt instead. diff --git a/desktop_version/lang/README-translators.txt b/desktop_version/lang/README-translators.txt index 29d04c8d81..6e9959d118 100644 --- a/desktop_version/lang/README-translators.txt +++ b/desktop_version/lang/README-translators.txt @@ -16,6 +16,8 @@ The English language files are basically templates for other languages (all the To create a new language, simply copy the `en` folder, and start by filling out meta.xml (further explained below). +Alternatively, you can create an empty language folder, and then use the in-game sync tool (translator > maintenance > sync language files) to populate it. + === E X C E L === diff --git a/desktop_version/src/LocalizationMaint.cpp b/desktop_version/src/LocalizationMaint.cpp index 6ce4f34d64..35f547615f 100644 --- a/desktop_version/src/LocalizationMaint.cpp +++ b/desktop_version/src/LocalizationMaint.cpp @@ -177,6 +177,17 @@ static void sync_lang_file(const std::string& langcode) FILESYSTEM_saveTiXml2Document((langcode + "/strings.xml").c_str(), doc); } + if (!load_lang_doc("numbers", doc, langcode)) + { + /* If numbers.xml doesn't exist _at all_, then simply copy it from English, + * so that you can make a new translation simply by making a folder and syncing. */ + + if (load_lang_doc("numbers", doc, "en")) + { + FILESYSTEM_saveTiXml2Document((langcode + "/numbers.xml").c_str(), doc); + } + } + if (load_lang_doc("strings_plural", doc, "en")) { /* Form 255 is technically invalid, but we have to account for it */ diff --git a/desktop_version/src/LocalizationStorage.cpp b/desktop_version/src/LocalizationStorage.cpp index faa323be14..a670a995f5 100644 --- a/desktop_version/src/LocalizationStorage.cpp +++ b/desktop_version/src/LocalizationStorage.cpp @@ -59,6 +59,10 @@ static void loadmeta(LangMeta& meta, const std::string& langcode = lang) { meta.active = true; meta.code = langcode; + meta.nativename = langcode; + meta.credit = ""; + meta.action_hint = "Press Space, Z, or V to select"; + meta.gamepad_hint = "Press {button} to select"; meta.autowordwrap = true; meta.toupper = true; meta.toupper_i_dot = false; @@ -238,6 +242,7 @@ void resettext(bool final_shutdown) number[i] = ""; } SDL_zeroa(number_plural_form); + number_plural_form[1] = 1; SDL_zeroa(translation_roomnames); SDL_zeroa(explanation_roomnames);