[beast] PO: fixed INTLFIX env variable special cases



commit 4f02704d94f1ae5ce289e68519b4e65a6837dda6
Author: Tim Janik <timj gtk org>
Date:   Wed Sep 8 21:06:29 2010 +0200

    PO: fixed INTLFIX env variable special cases

 autotools/intlfix-las.awk |    4 +---
 autotools/intlfix-xml.awk |    5 ++---
 po/Makefile.am            |    4 ++--
 3 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/autotools/intlfix-las.awk b/autotools/intlfix-las.awk
index f1dcfb1..14b12e3 100644
--- a/autotools/intlfix-las.awk
+++ b/autotools/intlfix-las.awk
@@ -1,8 +1,6 @@
 
 # AWK file to extract translatable strings from single line assignments
 
-BEGIN { MARKER = ""; if (ENVIRON["INTLFIX"] ~ /:marker:/) MARKER = "__INTLFIX__: "; }
-
 /^#/ { print "// " substr ($0, 2) ; next }
 
 /^[[:space:]]*_([^=]*)=/ {
@@ -11,7 +9,7 @@ BEGIN { MARKER = ""; if (ENVIRON["INTLFIX"] ~ /:marker:/) MARKER = "__INTLFIX__:
     sub (/[[:space:]]*_/, "", name)
     sub (/^[^=]*=/, "", value)
     gsub ("[\\\"]", "\\" "\\&", value)
-    print MARKER " /*" name "*/_(\"" value "\");"
+    print "__INTLFIX__: /*" name "*/_(\"" value "\");"
     next
 }
 
diff --git a/autotools/intlfix-xml.awk b/autotools/intlfix-xml.awk
index 079a33a..1d94984 100644
--- a/autotools/intlfix-xml.awk
+++ b/autotools/intlfix-xml.awk
@@ -7,7 +7,6 @@
 # - xmlparse.awk:   	Copyright (C) 2001 Steve Coile
 
 BEGIN {
-  MARKER = ""; if (ENVIRON["INTLFIX"] ~ /:marker:/) MARKER = "__INTLFIX__:";
   OLINE = 1
   TAG = ""
   while (getXMLEVENT(ARGV[1])) {
@@ -20,7 +19,7 @@ BEGIN {
 	if ($i ~ /^_[^_]/) {
 	  aname = $i; avalue = XMLATTR[$i]
 	  sub ("^_", "", aname); gsub ("[\\\"]", "\\" "\\&", avalue)
-          printf ("%s /*%s=*/_(\"%s\"); ", MARKER, aname, avalue)
+          printf ("__INTLFIX__: /*%s=*/_(\"%s\"); ", aname, avalue)
 	}
       }
       #print ""
@@ -32,7 +31,7 @@ BEGIN {
       gsub ("[\\\"]", "\\" "\\&", XMLNAME) # escape string quotes
       gsub (/\n/, "\\n\"\n\"", XMLNAME)    # escape newlines
       sub ("^_", "", TAG)
-      ostring = sprintf ("%s /*<%s/>*/_(\"%s\");\n", MARKER, TAG, XMLNAME);
+      ostring = sprintf ("__INTLFIX__: /*<%s/>*/_(\"%s\");\n", TAG, XMLNAME);
       printf ("__XML_LINE__%-3d: %s", OLINE, ostring); gsub (/[^\n]/, "", ostring); OLINE += length (ostring)
     } else if (XMLEVENT == "ENDELEM") {
       printf ("</>")
diff --git a/po/Makefile.am b/po/Makefile.am
index aeb715d..61dff1f 100644
--- a/po/Makefile.am
+++ b/po/Makefile.am
@@ -188,8 +188,8 @@ define test_unlisted
 	grep $(POSRC_$(strip $(1))_PATTERN) $(2) | \
 	  $(if $(POSRC_$(strip $(1))_FILTER), \
 	    while read file ; do \
-	      INTLFIX=:marker: $(POSRC_$(strip $(1))_FILTER $(top_srcdir)/"$$file") | \
-	      grep -q $(INLTFIXPATTERN) && echo "$$file" ; \
+	       $(POSRC_$(strip $(1))_FILTER) $(top_srcdir)/"$$file" | \
+	       grep -q $(INLTFIXPATTERN) && echo "$$file" ; \
 	    done \
 	  , \
 	    (cd $(top_srcdir) && xargs grep -l $(I18NPATTERN) ) \



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