diff options
author | Wolfgang Müller | 2021-06-26 19:18:11 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-06-27 18:31:06 +0200 |
commit | 5fdfd3c6072ccb4af666603905c5965e4c6358f8 (patch) | |
tree | f55d984d28b83d264ff3bfa6d55f3ffe6c3562d4 /configreader.vala | |
parent | 75ff67a99e3420ff49da7ec1b74f53a74451e874 (diff) | |
download | weltschmerz-5fdfd3c6072ccb4af666603905c5965e4c6358f8.tar.gz |
Mark messages for translation
With the translation infrastructure now in place, make sure to mark
every user-bound message for translation. All but one of the strings in
terminal.ui are already marked. This commit marks all remaining messages
in the Vala code as well as the missing one from terminal.ui.
One of the messages in terminal.ui is a sample error message for the
infobar label. Since this message will never be visible to the user (the
code overrides the label's contents with any relevant warning messages),
we do not need to keep it marked.
Finally, give translators ample context for what they will have to
translate and fix a small inconsistency with the capitalization of
warning messages in configreader.vala.
Diffstat (limited to '')
-rw-r--r-- | configreader.vala | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/configreader.vala b/configreader.vala index 6348d5e..46f6b1f 100644 --- a/configreader.vala +++ b/configreader.vala @@ -106,8 +106,12 @@ class ConfigReader { } catch (KeyFileError e) {} if (keys.length > 0) { - string k = keys.length > 1 ? "keys" : "key"; - append_warning("Unknown %s in config: %s".printf(k, string.joinv(", ", keys))); + var keylist = string.joinv(", ", keys); + // TRANSLATORS: %s is the list of unknown keys joined with ', ' + var warning = ngettext("unknown key in config: %s", + "unknown keys in config: %s", keys.length).printf(keylist); + + append_warning(warning); } } @@ -161,7 +165,8 @@ class ConfigReader { var rgba = Gdk.RGBA(); if (!rgba.parse(str)) { - append_warning("invalid colour '%s' in %s.%s".printf(str, group, key)); + // TRANSLATORS: First %s is parsed colour, %s.%s is <group>.<key> from the config file + append_warning(_("invalid colour '%s' in %s.%s").printf(str, group, key)); rgba.parse(default); return rgba; @@ -181,7 +186,8 @@ class ConfigReader { case "underline": return UNDERLINE; default: - append_warning("invalid cursor shape '%s' in %s.%s".printf(cursor, group, key)); + // TRANSLATORS: First %s is parsed shape, %s.%s is <group>.<key> from the config file + append_warning(_("invalid cursor shape '%s' in %s.%s").printf(cursor, group, key)); return BLOCK; } } @@ -197,7 +203,8 @@ class ConfigReader { case "system": return SYSTEM; default: - append_warning("invalid cursor blink setting '%s' in %s.%s".printf(blink, group, key)); + // TRANSLATORS: First %s is parsed blink setting, %s.%s is <group>.<key> from the config file + append_warning(_("invalid cursor blink setting '%s' in %s.%s").printf(blink, group, key)); return SYSTEM; } } |