[gimp-help-2] [make] Some minor changes and cleanups



commit 55b75e839073988424dce3d64a461f54eaaf32d8
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date:   Sun Apr 18 19:52:13 2010 +0200

    [make] Some minor changes and cleanups
    
    ... including a small fix for the authors stylesheet.

 Makefile.GNU                   |    7 ++-----
 Makefile.am                    |    5 +----
 make.help                      |    6 ++++++
 stylesheets/authors_common.xsl |   15 ++++++++++-----
 4 files changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index 213ef3a..d698c88 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -179,9 +179,6 @@ endif
 # Parameters:
 #     $1 - input:  original (untranslated) XML files
 #     $2 - output: POT template file containing translatable tags
-#
-# Hint: Don't use 'grep' for filtering-out the warning messages,
-#       since grep's exit status is 1 if there is no match.
 xml2pot = $(XML2PO) $(XML2POFLAGS) --output='-' $(filter %.xml,$(1)) \
           | $(MSGUNIQ) $(MSGUNIQFLAGS) \
           | $(MSGCAT) $(MSGCATFLAGS) - > "$(2)"; \
@@ -296,7 +293,7 @@ make.help:
 # TODO?: replace with a "real" script (e.g. tools/make-help.sed)
 #   (probably "yes" if more features are needed...)
 help: make.help
-	$(cmd) $(SED) \
+	@$(SED) \
 	    -e '### skip comments ###' \
 	    -e '/^#/d' \
 	    -e '### print if no "make" variable found ###' \
@@ -449,7 +446,7 @@ force-po/%:
 # Main commandline target
 po: $(foreach LANG,$(PO_LANGS),po-$(LANG)) ;
 
-.PHONY: po po-% cleanup-po-% po-todo-% po-status-%
+.PHONY: po po-% cleanup-po-% todo-% po-todo-% po-status-%
 
 
 ########################################################################
diff --git a/Makefile.am b/Makefile.am
index 12a9a91..128708f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -228,9 +228,6 @@ if HAVE_I18N_TOOLS
 # Parameters:
 #     $1 - input:  original (untranslated) XML files
 #     $2 - output: POT template file containing translatable tags
-#
-# Hint: Don't use 'grep' for filtering-out the warning messages,
-#       since grep's exit status is 1 if there is no match.
 xml2pot = $(XML2PO) $(XML2POFLAGS) --output='-' $(1) \
           | $(MSGUNIQ) $(MSGUNIQFLAGS) \
           | $(MSGCAT) $(MSGCATFLAGS) - > "$(2)"; \
@@ -506,7 +503,7 @@ po-todo-%: po-%
 # Main commandline target
 po: $(foreach LANG,$(PO_LANGS),po-$(LANG)) ;
 
-.PHONY: po po-% cleanup-po-% po-todo-% po-status-%
+.PHONY: po po-% cleanup-po-% todo-% po-todo-% po-status-%
 
 
 ########################################################################
diff --git a/make.help b/make.help
index 9b2b4f0..0de5ed9 100644
--- a/make.help
+++ b/make.help
@@ -70,3 +70,9 @@ Make variables (can be overriden at command-line):
   VERBOSE=0|1|2    Controls the amount of output messages:
                      1 = moderate (default), 2 = all, 0 = nearly silent
 
+More (optional) make variables (empty by default):
+  GIMP_PO_ROOT     Path to the local GIMP (not: gimp-help-2) git repository
+                   containing po files (po*/LANG.po) which may be used as
+                   additional libraries of translations
+  XSLTEXTRAFLAGS    Additional flags passed to the xsltproc tool
+  DBLATEXEXTRAFLAGS Additional flags passed to the dblatex tool
diff --git a/stylesheets/authors_common.xsl b/stylesheets/authors_common.xsl
index bea6c40..4bfda9d 100644
--- a/stylesheets/authors_common.xsl
+++ b/stylesheets/authors_common.xsl
@@ -62,11 +62,16 @@
     </xsl:variable>
     <xsl:variable name="tail"
       select="substring-after($languages,concat($langid,':'))"/>
-    <xsl:if test="$tail != ''">
-      <xsl:value-of select="translate(
-                              normalize-space(substring-before($tail,' ')),
-                              '_', ' ')"/>
-    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="$tail != ''">
+        <xsl:value-of select="translate(
+                                normalize-space(substring-before($tail,' ')),
+                                '_', ' ')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$langid"/>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
 </xsl:stylesheet>
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]