r16797 - gnucash/branches/2.2/src/gnome-utils - [r16767] Remove translation string from gnucash.pot that is looked up in gtk20 domain.

Andreas Köhler andi5 at cvs.gnucash.org
Fri Jan 4 19:52:56 EST 2008


Author: andi5
Date: 2008-01-04 19:52:55 -0500 (Fri, 04 Jan 2008)
New Revision: 16797
Trac: http://svn.gnucash.org/trac/changeset/16797

Modified:
   gnucash/branches/2.2/src/gnome-utils/gnc-dense-cal.c
Log:
[r16767] Remove translation string from gnucash.pot that is looked up in gtk20 domain.

As pointed out by Bruno Haible, if there is only one dgettext call
the easiest way to exclude this from xgettext extraction is to rename
this particular dgettext call by a wrapper macro.

Committed by cstim.


Modified: gnucash/branches/2.2/src/gnome-utils/gnc-dense-cal.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/gnc-dense-cal.c	2008-01-05 00:52:46 UTC (rev 16796)
+++ gnucash/branches/2.2/src/gnome-utils/gnc-dense-cal.c	2008-01-05 00:52:55 UTC (rev 16797)
@@ -436,12 +436,18 @@
     dcal->week_starts_monday = 0;
     {
         gchar **parts;
-	/* Translators: This string should not have shown up in
-	   gnucash.pot as it is looked up in the "gtk20" translation
-	   domain. You can safely ignore this string and leave it
-	   untranslated. */
-        parts = g_strsplit(dgettext("gtk20", "calendar:week_start:0"),
-                           ":", 3);
+	const char *week_start_str;
+
+	/* Use this renaming macro to avoid extraction of the message
+	   string into the gnucash.pot file when calling xgettext. */
+#define dgettext_noextract dgettext
+	/* Translators: This string must not show up in gnucash.pot as
+	   it is looked up in the "gtk20" translation domain
+	   instead. */
+	week_start_str = dgettext_noextract("gtk20", "calendar:week_start:0");
+#undef dgettext_noextract
+
+        parts = g_strsplit(week_start_str, ":", 3);
         if (parts[0] != NULL
             && parts[1] != NULL
             && parts[2] != NULL)



More information about the gnucash-changes mailing list