>>>>> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

>>>>> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
Jean-Marc> Here is what I have in my tree. I need to actually test it
Jean-Marc> before committing.

Jean-Marc> After testing, here is what it became. 

Hmpf.

Index: po/Makefile.in.in
===================================================================
--- po/Makefile.in.in	(revision 14637)
+++ po/Makefile.in.in	(working copy)
@@ -384,18 +384,26 @@ qt_l10n.pot: $(top_srcdir)/src/frontends
 		{\
 			return substr(FILENAME, length(top_srcdir "/") + 1);\
 		}\
-		/<string>/ { \
-			line=$$0; \
-			sub(/.*<string>/, "", line); \
-			sub(/<\/string>.*/, "", line); \
-			gsub(/&amp;/, "\\&", line); \
-			gsub(/&lt;/, "<", line); \
-			gsub(/&gt;/, ">", line); \
-			gsub(/"/, "\\\"", line); \
-			if (length(line) > 0) {\
-				printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n",\
+		BEGIN { \
+			previousline=""; \
+		} \
+		{ \
+			if (!(previousline ~ /^ *< *property  *name *= *"caption" *> *$$/ \
+			    || previousline ~ /^ *< *property  *name *= *"shortcut" *> *$$/) \
+			    && $$0 ~ /<string>/) { \
+				line=$$0; \
+				sub(/.*<string>/, "", line); \
+				sub(/<\/string>.*/, "", line); \
+				gsub(/&amp;/, "\\&", line); \
+				gsub(/&lt;/, "<", line); \
+				gsub(/&gt;/, ">", line); \
+				gsub(/"/, "\\\"", line); \
+				if (length(line) > 0) { \
+					printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
 					fixupfilename(), FNR, line); \
+				} \
 			} \
+			previousline=$$0; \
 		}' \
 	${top_srcdir}/src/frontends/qt3/ui/*.ui > $@
 

Reply via email to