]> git.lyx.org Git - lyx.git/blobdiff - po/Makefile.in.in
update Basque and Romanian l10n
[lyx.git] / po / Makefile.in.in
index 4f5373f298979d5848501e1e57d17b7d3579f221..0d8d7cc5958875a24dc07c9b62e4a0af1eef34cb 100644 (file)
@@ -369,15 +369,16 @@ ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS)
        rm -f $@-t \
        && ( cd $(top_srcdir); \
             grep -l "_(\".*\")" `find src \( -name '*.[Cch]' -o -name '*.C.in' \) -print` |\
-            sed -e '/xforms.forms/d'| grep -v -e "src/support/package.C$$" |\
+            grep -v -e "src/support/package.C$$" |\
             sort | uniq ) > $@-t \
        && mv $@-t $@
 
-l10n_pots: xforms_l10n.pot qt_l10n.pot layouts_l10n.pot languages_l10n.pot ui_l10n.pot
+l10n_pots: qt4_l10n.pot layouts_l10n.pot languages_l10n.pot ui_l10n.pot
        cat $^ | \
        msguniq -o $(DOMAIN).po && rm -f  $^
 
-xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd
+
+qt4_l10n.pot: $(top_srcdir)/src/frontends/qt4/ui/*.ui
        LC_ALL=C ; export LC_ALL ; \
        $(AWK) -v top_srcdir="$(top_srcdir)" ' \
                function fixupfilename() \
@@ -385,48 +386,26 @@ xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd
                        return substr(FILENAME, length(top_srcdir "/") + 1);\
                }\
                BEGIN { \
-                       print "#, fuzzy"; \
-                       print "msgid \"\""; \
-                       print "msgstr \"\""; \
-                       print "\"Content-Type: text/plain; charset=ISO-8859-1\\n\""; \
-                       print "\"Content-Transfer-Encoding: 8bit\\n\""; \
-                       print "\n"; \
-                       skip=0; \
-               } \
-               /style: 15/ { \
-                       skip=1; \
+                       previousline=""; \
                } \
-               /label: / { \
-                       if (NF > 1 && skip == 0) { \
-                               line=$$0;\
-                               sub(/label: /,"",line);\
-                               printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", fixupfilename(), FNR, line);\
-                       }\
-                       skip=0; \
-               }' \
-       ${top_srcdir}/src/frontends/xforms/forms/*.fd > $@
-
-qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui
-       LC_ALL=C ; export LC_ALL ; \
-       $(AWK) -v top_srcdir="$(top_srcdir)" ' \
-               function fixupfilename() \
-               {\
-                       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",\
+               { \
+                       if (!(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/qt2/ui/*.ui > $@
+       ${top_srcdir}/src/frontends/qt4/ui/*.ui > $@
 
 layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc
        LC_ALL=C ; export LC_ALL ; \
@@ -500,7 +479,7 @@ ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui
                        printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
                                fixupfilename(), FNR, line); \
                } \
-               /^[^#]*Toolbar/ { \
+               /^[^#]*Toolbar[^s]/ { \
                        line=$$0; \
                        sub(/[^"]*"/, "", line); \
                        sub(/".*/, "", line); \
@@ -516,7 +495,7 @@ ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui
                }' \
        ${top_srcdir}/lib/ui/*.ui > $@
 
-i18n.php3: $(POFILES)
+i18n.php: $(POFILES)
        (cd $(srcdir) ; ./postats.sh $(POFILES)) >$@
 
 force: