summaryrefslogtreecommitdiff
path: root/src/inputmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-03 12:35:33 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-03 12:51:43 +0300
commit9510979d65738fb03b2c48425fa59984c2a4b938 (patch)
treed546c5e932da966d4bddcebb5ae9a0f6f4820881 /src/inputmanager.cpp
parenta7c723b681ddefdcaa84cb9b16681c65818d7110 (diff)
downloadplus-9510979d65738fb03b2c48425fa59984c2a4b938.tar.gz
plus-9510979d65738fb03b2c48425fa59984c2a4b938.tar.bz2
plus-9510979d65738fb03b2c48425fa59984c2a4b938.tar.xz
plus-9510979d65738fb03b2c48425fa59984c2a4b938.zip
add comments for translators.
Diffstat (limited to 'src/inputmanager.cpp')
-rw-r--r--src/inputmanager.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp
index 55b13e82c..4b5988a57 100644
--- a/src/inputmanager.cpp
+++ b/src/inputmanager.cpp
@@ -317,13 +317,18 @@ std::string InputManager::getKeyStringLong(const int index) const
if (key.type == INPUT_KEYBOARD)
{
if (key.value >= 0)
+ {
str = keyboard.getKeyName(key.value);
+ }
else if (key.value < -1)
+ {
+ // TRANSLATORS: long key name. must be short.
str = strprintf(_("key_%d"), -key.value);
+ }
}
else if (key.type == INPUT_JOYSTICK)
{
- // TRANSLATORS: this is long joystick button name
+ // TRANSLATORS: long joystick button name. must be short.
str = strprintf(_("JButton%d"), key.value + 1);
}
if (!str.empty())
@@ -336,7 +341,10 @@ std::string InputManager::getKeyStringLong(const int index) const
}
if (keyStr.empty())
+ {
+ // TRANSLATORS: unknown long key type
return _("unknown key");
+ }
return keyStr;
}
@@ -358,12 +366,13 @@ std::string InputManager::getKeyValueString(const int index) const
}
else if (key.value < -1)
{
+ // TRANSLATORS: short key name. must be very short.
str = strprintf(_("key_%d"), -key.value);
}
}
else if (key.type == INPUT_JOYSTICK)
{
- // TRANSLATORS: this is short joystick button name
+ // TRANSLATORS: short joystick button name. muse be very short
str = strprintf(_("JB%d"), key.value + 1);
}
if (!str.empty())
@@ -376,7 +385,10 @@ std::string InputManager::getKeyValueString(const int index) const
}
if (keyStr.empty())
+ {
+ // TRANSLATORS: unknown short key type. must be short
return _("u key");
+ }
return keyStr;
}