diff options
-rw-r--r-- | configreader.vala | 17 | ||||
-rw-r--r-- | terminal.ui | 4 | ||||
-rw-r--r-- | terminal.vala | 4 |
3 files changed, 16 insertions, 9 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; } } diff --git a/terminal.ui b/terminal.ui index 345c543..68a36b7 100644 --- a/terminal.ui +++ b/terminal.ui @@ -72,7 +72,7 @@ </child> <child> <object class="GtkImageMenuItem" id="copy_item_html"> - <property name="label">Copy as _HTML</property> + <property name="label" translatable="yes">Copy as _HTML</property> <property name="visible">True</property> <property name="can-focus">False</property> <property name="tooltip-text" translatable="yes">Copy the selection as HTML</property> @@ -276,7 +276,7 @@ <object class="GtkLabel" id="infobar_label"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="label" translatable="yes">Sample Error Message</property> + <property name="label">Sample Error Message</property> <property name="use-markup">True</property> <property name="wrap">True</property> </object> diff --git a/terminal.vala b/terminal.vala index dfe8130..fcd5ee0 100644 --- a/terminal.vala +++ b/terminal.vala @@ -138,10 +138,10 @@ class Terminal : Gtk.Overlay { vte.set_color_highlight(conf.selection_background); if (conf.get_warnings().length > 0) { - string header = "<b>Configuration loaded with warnings:</b>\n"; + string header = "<b>%s</b>\n".printf(_("Configuration loaded with warnings:")); infobar_show(header + string.joinv("\n", conf.get_warnings()), Gtk.MessageType.WARNING); } else if (reload) { - infobar_show("Configuration loaded successfully.", Gtk.MessageType.INFO, 3); + infobar_show(_("Configuration loaded successfully."), Gtk.MessageType.INFO, 3); } } |