[GRASS-SVN] r53888 - in grass/trunk: . locale

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 18 04:18:23 PST 2012


Author: marisn
Date: 2012-11-18 04:18:23 -0800 (Sun, 18 Nov 2012)
New Revision: 53888

Modified:
   grass/trunk/SUBMITTING
   grass/trunk/locale/Makefile
   grass/trunk/locale/README
Log:
Ability to add comments for GRASS translators with GTC keyword in code comments

Modified: grass/trunk/SUBMITTING
===================================================================
--- grass/trunk/SUBMITTING	2012-11-18 11:28:19 UTC (rev 53887)
+++ grass/trunk/SUBMITTING	2012-11-18 12:18:23 UTC (rev 53888)
@@ -142,6 +142,14 @@
     Always use the gettext macros with _("") for user messages,
     example:
       G_fatal_error(_("Vector map <%s> not found"), name); 
+    It is suggested to add a comment line before translatable user message
+    to give a hint to translators about meaning or use of 
+    cumbersome or obscure message. First word in the comment must be GTC
+    - GRASS translation comment,
+    example:
+        /* GTC A name of a projection */
+        G_message(_("State Plane"));
+    See locale/README for details.
 
 
     Pipe/file data output:

Modified: grass/trunk/locale/Makefile
===================================================================
--- grass/trunk/locale/Makefile	2012-11-18 11:28:19 UTC (rev 53887)
+++ grass/trunk/locale/Makefile	2012-11-18 12:18:23 UTC (rev 53888)
@@ -47,11 +47,11 @@
 		exit 1 ; \
 	fi
 	@echo "Generating $(LIBDOMAIN)..."
-	xgettext -k_ -o ./templates/$(LIBDOMAIN).pot `$(LIB_POTFILES)`
+	xgettext -k_ -cGTC -o ./templates/$(LIBDOMAIN).pot `$(LIB_POTFILES)`
 	@echo "Generating $(MODDOMAIN)..."
-	xgettext -k_ -o ./templates/$(MODDOMAIN).pot `$(MOD_POTFILES)`
+	xgettext -k_ -cGTC -o ./templates/$(MODDOMAIN).pot `$(MOD_POTFILES)`
 	@echo "Generating $(WXPYDOMAIN)..."
-	xgettext -k_ -o ./templates/$(WXPYDOMAIN).pot `$(WXPY_POTFILES)` 
+	xgettext -k_ -cGTC -o ./templates/$(WXPYDOMAIN).pot `$(WXPY_POTFILES)` 
 
 #merge already existing translations with new messages in POT template file and create new po files:
 update-po:

Modified: grass/trunk/locale/README
===================================================================
--- grass/trunk/locale/README	2012-11-18 11:28:19 UTC (rev 53887)
+++ grass/trunk/locale/README	2012-11-18 12:18:23 UTC (rev 53888)
@@ -48,12 +48,19 @@
 NOTE2: Also the parameters/flags of each module needs the
        macro _().
 
+NOTE3: Notices to translators can be added by placing
+       a comment line starting with GTC tag just above
+       message to be translated:
+        /* GTC A comma separated keyword list. 
+           Should not contain spaces! */
+        keywords = _("first,second,third");
+        
 All these messages strings will be then automatically 
 extracted into the message files.
 
 See for example ./vector/v.what.rast/main.c
 
-NOTE3: Such lines
+NOTE4: Such lines
         fprintf (stdout,"\n");
   do not need a change as no translation is needed.
 



More information about the grass-commit mailing list