diff options
author | Wuzzy <wuzzy2@mail.ru> | 2020-03-20 08:41:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 09:41:07 +0100 |
commit | 625b1005939e76d6a5b2d241635be3b8a89eb128 (patch) | |
tree | 07c47b2f6925a2da46dc6f648e8b35c3da02cf2b | |
parent | 5c1b72544a6158346b7d8608c895678fe7d5a19b (diff) | |
download | minetest-625b1005939e76d6a5b2d241635be3b8a89eb128.tar.gz minetest-625b1005939e76d6a5b2d241635be3b8a89eb128.tar.bz2 minetest-625b1005939e76d6a5b2d241635be3b8a89eb128.zip |
Add comments for translators (#9510)
* Add translator comments for "special" strings
* Add translator comments for some "tricky" strings
-rw-r--r-- | builtin/mainmenu/dlg_settings_advanced.lua | 11 | ||||
-rw-r--r-- | builtin/mainmenu/tab_online.lua | 1 | ||||
-rw-r--r-- | src/client/fontengine.cpp | 8 | ||||
-rw-r--r-- | src/client/game.cpp | 1 | ||||
-rw-r--r-- | src/client/keycode.cpp | 3 | ||||
-rw-r--r-- | src/gui/modalMenu.cpp | 2 | ||||
-rw-r--r-- | src/network/clientpackethandler.cpp | 3 | ||||
-rwxr-xr-x | util/updatepo.sh | 1 |
8 files changed, 30 insertions, 0 deletions
diff --git a/builtin/mainmenu/dlg_settings_advanced.lua b/builtin/mainmenu/dlg_settings_advanced.lua index 24b71d957..c16e4aad0 100644 --- a/builtin/mainmenu/dlg_settings_advanced.lua +++ b/builtin/mainmenu/dlg_settings_advanced.lua @@ -639,12 +639,23 @@ local function create_change_setting_formspec(dialogdata) -- Flags formspec = table.concat(fields) .. "checkbox[0.5," .. height - 0.6 .. ";cb_defaults;" + --[[~ "defaults" is a noise parameter flag. + It describes the default processing options + for noise settings in main menu -> "All Settings". ]] .. fgettext("defaults") .. ";" -- defaults .. tostring(flags["defaults"] == true) .. "]" -- to get false if nil .. "checkbox[5," .. height - 0.6 .. ";cb_eased;" + --[[~ "eased" is a noise parameter flag. + It is used to make the map smoother and + can be enabled in noise settings in + main menu -> "All Settings". ]] .. fgettext("eased") .. ";" -- eased .. tostring(flags["eased"] == true) .. "]" .. "checkbox[5," .. height - 0.15 .. ";cb_absvalue;" + --[[~ "absvalue" is a noise parameter flag. + It is short for "absolute value". + It can be enabled in noise settings in + main menu -> "All Settings". ]] .. fgettext("absvalue") .. ";" -- absvalue .. tostring(flags["absvalue"] == true) .. "]" height = height + 1 diff --git a/builtin/mainmenu/tab_online.lua b/builtin/mainmenu/tab_online.lua index 8733f7618..7985fd84a 100644 --- a/builtin/mainmenu/tab_online.lua +++ b/builtin/mainmenu/tab_online.lua @@ -78,6 +78,7 @@ local function get_formspec(tabview, name, tabdata) "text,align=right,padding=0.25;" .. -- clients_max image_column(fgettext("Creative mode"), "creative") .. ",padding=1;" .. image_column(fgettext("Damage enabled"), "damage") .. ",padding=0.25;" .. + --~ PvP = Player versus Player image_column(fgettext("PvP enabled"), "pvp") .. ",padding=0.25;" .. "color,span=1;" .. "text,padding=1]" .. diff --git a/src/client/fontengine.cpp b/src/client/fontengine.cpp index 26ceda4c5..2b5841cd8 100644 --- a/src/client/fontengine.cpp +++ b/src/client/fontengine.cpp @@ -194,6 +194,14 @@ void FontEngine::readSettings() m_default_size[FM_Fallback] = m_settings->getU16("fallback_font_size"); m_default_size[FM_Mono] = m_settings->getU16("mono_font_size"); + /*~ DO NOT TRANSLATE THIS LITERALLY! + This is a special string. Put either "no" or "yes" + into the translation field (literally). + Choose "yes" if the language requires use of the fallback + font, "no" otherwise. + The fallback font is (normally) required for languages with + non-Latin script, like Chinese. + When in doubt, test your translation. */ m_currentMode = is_yes(gettext("needs_fallback_font")) ? FM_Fallback : FM_Standard; diff --git a/src/client/game.cpp b/src/client/game.cpp index 32291c7ef..0201ded69 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -4184,6 +4184,7 @@ void Game::showPauseMenu() << strgettext("- Creative Mode: ") << creative << "\n"; if (!simple_singleplayer_mode) { const std::string &pvp = g_settings->getBool("enable_pvp") ? on : off; + //~ PvP = Player versus Player os << strgettext("- PvP: ") << pvp << "\n" << strgettext("- Public: ") << announced << "\n"; std::string server_name = g_settings->get("server_name"); diff --git a/src/client/keycode.cpp b/src/client/keycode.cpp index 646d181e0..6a0e9f569 100644 --- a/src/client/keycode.cpp +++ b/src/client/keycode.cpp @@ -109,6 +109,7 @@ static const struct table_key table[] = { DEFINEKEY1(KEY_RETURN, N_("Return")) DEFINEKEY1(KEY_SHIFT, N_("Shift")) DEFINEKEY1(KEY_CONTROL, N_("Control")) + //~ Key name, common on Windows keyboards DEFINEKEY1(KEY_MENU, N_("Menu")) DEFINEKEY1(KEY_PAUSE, N_("Pause")) DEFINEKEY1(KEY_CAPITAL, N_("Caps Lock")) @@ -121,7 +122,9 @@ static const struct table_key table[] = { DEFINEKEY1(KEY_UP, N_("Up")) DEFINEKEY1(KEY_RIGHT, N_("Right")) DEFINEKEY1(KEY_DOWN, N_("Down")) + //~ Key name DEFINEKEY1(KEY_SELECT, N_("Select")) + //~ "Print screen" key DEFINEKEY1(KEY_PRINT, N_("Print")) DEFINEKEY1(KEY_EXECUT, N_("Execute")) DEFINEKEY1(KEY_SNAPSHOT, N_("Snapshot")) diff --git a/src/gui/modalMenu.cpp b/src/gui/modalMenu.cpp index 30417943d..8fb6c6f0f 100644 --- a/src/gui/modalMenu.cpp +++ b/src/gui/modalMenu.cpp @@ -134,6 +134,8 @@ bool GUIModalMenu::preprocessEvent(const SEvent &event) return retval; m_jni_field_name = field_name; + /*~ Imperative, as in "Enter/type in text". + Don't forget the space. */ std::string message = gettext("Enter "); std::string label = wide_to_utf8(getLabelByID(hovered->getID())); if (label.empty()) diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 0a9f8c212..432fb415e 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -135,6 +135,9 @@ void Client::handleCommand_AuthAccept(NetworkPacket* pkt) << m_recommended_send_interval<<std::endl; // Reply to server + /*~ DO NOT TRANSLATE THIS LITERALLY! + This is a special string which needs to contain the translation's + language code (e.g. "de" for German). */ std::string lang = gettext("LANG_CODE"); if (lang == "LANG_CODE") lang = ""; diff --git a/util/updatepo.sh b/util/updatepo.sh index 84dfd3ddb..168483bd4 100755 --- a/util/updatepo.sh +++ b/util/updatepo.sh @@ -49,6 +49,7 @@ cd .. # --package-name potfile=po/minetest.pot xgettext --package-name=minetest \ + --add-comments='~' \ --sort-by-file \ --add-location=file \ --keyword=N_ \ |