Browse Source

Extract messages with multiple plural forms to POT files

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59157 15284696-431f-4ddb-bdfa-cd5b030d7da7
Maris Nartiss 11 years ago
parent
commit
f543cec62a
1 changed files with 6 additions and 6 deletions
  1. 6 6
      locale/Makefile

+ 6 - 6
locale/Makefile

@@ -31,9 +31,9 @@ MODDOMAIN = grassmods
 WXPYDOMAIN = grasswxpy
 DOMAINS = $(LIBDOMAIN) $(MODDOMAIN) $(WXPYDOMAIN)
 
-LIB_POTFILES = find ../lib \( -name "*.c" -o -name "*.py" \) | xargs grep -l "_(\""
-MOD_POTFILES = find ../ -name '*.c' | grep -v '../lib' | xargs grep -l "_(\""
-WXPY_POTFILES = find ../gui/wxpython -name '*.py' | xargs grep -l "_(\""
+LIB_POTFILES = find ../lib \( -name "*.c" -o -name "*.py" \) | xargs grep -l "_(\"\|_n(\""
+MOD_POTFILES = find ../ -name '*.c' | grep -v '../lib' | xargs grep -l "_(\"\|_n(\""
+WXPY_POTFILES = find ../gui/wxpython -name '*.py' | xargs grep -l "_(\"\|_n(\""
 
 define po_stats
 GISBASE="$(RUN_GISBASE)" $(PYTHON) ./grass_po_stats.py
@@ -47,11 +47,11 @@ pot:
 		exit 1 ; \
 	fi
 	@echo "Generating $(LIBDOMAIN)..."
-	xgettext -k_ -cGTC -o ./templates/$(LIBDOMAIN).pot `$(LIB_POTFILES)`
+	xgettext --keyword=_ --keyword=_n:1,2 -cGTC -o ./templates/$(LIBDOMAIN).pot `$(LIB_POTFILES)`
 	@echo "Generating $(MODDOMAIN)..."
-	xgettext -k_ -cGTC -o ./templates/$(MODDOMAIN).pot `$(MOD_POTFILES)`
+	xgettext --keyword=_ --keyword=_n:1,2 -cGTC -o ./templates/$(MODDOMAIN).pot `$(MOD_POTFILES)`
 	@echo "Generating $(WXPYDOMAIN)..."
-	xgettext -k_ -cGTC -o ./templates/$(WXPYDOMAIN).pot `$(WXPY_POTFILES)` 
+	xgettext --keyword=_ --keyword=_n:1,2 -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: