From: Philip Withnall Date: Sat, 17 Sep 2011 11:40:22 +0000 (+0100) Subject: i18n: Remove untranslatable identifiers from translatable strings X-Git-Tag: FOLKS_0_6_3~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70d2a568374bc9c73b2bcd56009131a7a6abbc20;p=platform%2Fupstream%2Ffolks.git i18n: Remove untranslatable identifiers from translatable strings Also remove some trailing newline characters which don't need translating. --- diff --git a/tools/import.vala b/tools/import.vala index df80d72..336aa39 100644 --- a/tools/import.vala +++ b/tools/import.vala @@ -36,6 +36,8 @@ public class Folks.ImportTool : Object private static string source; private static string source_filename; + private static const string DEFAULT_SOURCE = "pidgin"; + private static const OptionEntry[] options = { { "source", 's', 0, OptionArg.STRING, ref ImportTool.source, @@ -62,14 +64,14 @@ public class Folks.ImportTool : Object catch (OptionError e) { /* Translators: the parameter is an error message. */ - stderr.printf (_("Couldn't parse command line options: %s\n"), + stderr.printf (_("Couldn't parse command line options: %s") + "\n", e.message); return 1; } /* We only support importing from Pidgin at the moment */ if (source == null || source.strip () == "") - source = "pidgin"; + source = ImportTool.DEFAULT_SOURCE; /* FIXME: We need to create this, even though we don't use it, to prevent * debug message spew, as its constructor initialises the log handling. @@ -103,7 +105,8 @@ public class Folks.ImportTool : Object catch (GLib.Error e1) { /* Translators: the parameter is an error message. */ - stderr.printf (_("Couldn't load the backends: %s\n"), e1.message); + stderr.printf (_("Couldn't load the backends: %s") + "\n", + e1.message); return false; } @@ -112,7 +115,9 @@ public class Folks.ImportTool : Object if (kf_backend == null) { - stderr.printf (_("Couldn't load the 'key-file' backend.\n")); + /* Translators: the parameter is a backend identifier. */ + stderr.printf (_("Couldn't load the ‘%s’ backend.") + "\n", + "key-file"); return false; } @@ -122,9 +127,10 @@ public class Folks.ImportTool : Object } catch (GLib.Error e2) { - /* Translators: the parameter is an error message. */ - stderr.printf (_("Couldn't prepare the 'key-file' backend: %s\n"), - e2.message); + /* Translators: the first parameter is a backend identifier and the + * second parameter is an error message. */ + stderr.printf (_("Couldn't prepare the ‘%s’ backend: %s") + "\n", + "key-file", e2.message); return false; } @@ -135,7 +141,9 @@ public class Folks.ImportTool : Object if (stores.size == 0) { stderr.printf ( - _("Couldn't load the 'key-file' backend's persona store.\n")); + /* Translators: the parameter is a backend identifier. */ + _("Couldn't load the ‘%s’ backend's persona store.") + "\n", + "key-file"); return false; } @@ -152,9 +160,10 @@ public class Folks.ImportTool : Object } catch (GLib.Error e3) { - /* Translators: the parameter is an error message. */ + /* Translators: the first parameter is a backend identifier and the + * second parameter is an error message. */ stderr.printf ( - _("Couldn't prepare the 'key-file' backend's persona store: %s\n"), + _("Couldn't prepare the ‘%s’ backend's persona store: %s") + "\n", e3.message); return false; }