AUDIT: r16767 - gnucash/trunk/src/gnome-utils - Remove translation string from gnucash.pot that is looked up in gtk20 domain.

Christian Stimming cstim at cvs.gnucash.org
Sun Dec 30 05:57:39 EST 2007


Author: cstim
Date: 2007-12-30 05:57:38 -0500 (Sun, 30 Dec 2007)
New Revision: 16767
Trac: http://svn.gnucash.org/trac/changeset/16767

Modified:
   gnucash/trunk/src/gnome-utils/gnc-dense-cal.c
Log:
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.
BP

Modified: gnucash/trunk/src/gnome-utils/gnc-dense-cal.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-dense-cal.c	2007-12-29 22:36:07 UTC (rev 16766)
+++ gnucash/trunk/src/gnome-utils/gnc-dense-cal.c	2007-12-30 10:57:38 UTC (rev 16767)
@@ -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