diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-09-28 14:54:09 +0300 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-10-01 15:17:27 +0300 |
commit | 9a19d4f999f0c15dcc2a3770499bb580a0a726b7 (patch) | |
tree | a36101ab8ea7e61b77ef685e345629d6fe12252c /plugins/x2go | |
parent | 476375c22126e5f7cdf0f375b648f026844ae874 (diff) |
x2go_plugin.c: Add translators comments; Improve an error message.
Diffstat (limited to 'plugins/x2go')
-rw-r--r-- | plugins/x2go/x2go_plugin.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/plugins/x2go/x2go_plugin.c b/plugins/x2go/x2go_plugin.c index 2f58194fa..838b3a117 100644 --- a/plugins/x2go/x2go_plugin.c +++ b/plugins/x2go/x2go_plugin.c @@ -1301,25 +1301,32 @@ static GError* remmina_plugin_x2go_string_setting_validator(gchar* key, } if (elements_amount > 2) { - /* TRANSLATORS: once %s is finished building it will look like this: - * "'value1', 'value2', 'value3', 'valueN-1' and 'valueN'" - * Presumably you just want to translate 'and' into your language. - */ if (i == elements_amount - 1) { + // TRANSLATORS: Presumably you just want to translate 'and' + // into your language. (Except your listing-grammar differs from english.) + // 'value1', 'value2', 'valueN-1' and 'valueN' data_str = g_strdup_printf(_("%sand '%s'"), data_str, element); } else if (i == elements_amount - 2) { + // TRANSLATORS: Presumably you just want to leave it english. + // (Except your listing-grammar differs from english.) + // 'value1', 'value2', 'valueN-1' and 'valueN' data_str = g_strdup_printf(_("%s'%s' "), data_str, element); } else { + // TRANSLATORS: Presumably you just want to leave it english. + // (Except your listing-grammar differs from english.) + // 'value1', 'value2', 'valueN-1' and 'valueN' data_str = g_strdup_printf(_("%s'%s', "), data_str, element); } } else if (elements_amount == 2) { - /* TRANSLATORS: once %s is finished building it will look like this: - * "'value1' and 'value2'" - * Presumably you just want to translate 'and' into your language. - */ if (i == elements_amount - 1) { + // TRANSLATORS: Presumably you just want to translate 'and' + // into your language. (Except your listing-grammar differs from english.) + // 'value1' and 'value2' data_str = g_strdup_printf(_("%sand '%s'"), data_str, element); } else { + // TRANSLATORS: Presumably you just want to leave it english. + // (Except your listing-grammar differs from english.) + // 'value1' and 'value2' data_str = g_strdup_printf(_("%s'%s' "), data_str, element); } } else { @@ -1401,11 +1408,12 @@ static GError* remmina_plugin_x2go_int_setting_validator(gchar* key, gint int_value; err = str2int(&int_value, value, 10); if (err == STR2INT_INCONVERTIBLE) { + // Can't happen in theory since non-numerical characters are can't + // be entered but, let's be safe. g_set_error(&error, 1, 1, _("Input is not a valid integer!")); - } else if (err == STR2INT_OVERFLOW) { - g_set_error(&error, 1, 1, _("Input is too large!")); - } else if (err == STR2INT_UNDERFLOW) { - g_set_error(&error, 1, 1, _("Input is too small!")); + } else if (err == STR2INT_OVERFLOW || err == STR2INT_UNDERFLOW) { + g_set_error(&error, 1, 1, _("Input must be a number between %i and %i."), + minimum, maximum); } else if (err == STR2INT_INVALID_DATA) { g_set_error(&error, 1, 1, _("Something went wrong.")); } |