From 4c180ccef67d6886563a0fa7acb16493819084ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Mon, 16 Dec 2002 22:56:32 +0000 Subject: [PATCH] fix a qt extraction bug git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5831 a592a061-630c-0410-9148-cb99ea01b6c8 --- po/.cvsignore | 2 ++ po/ChangeLog | 5 +++++ po/Makefile.in.in | 26 ++++++++++++++------------ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/po/.cvsignore b/po/.cvsignore index d2a9c2db00..c2db6c85c5 100644 --- a/po/.cvsignore +++ b/po/.cvsignore @@ -10,3 +10,5 @@ lyx.pot layouts_l10n.pot qt_l10n.pot xforms_l10n.pot +default_ui_l10n.pot +languages_l10n.pot diff --git a/po/ChangeLog b/po/ChangeLog index 515d65c1a4..d7a7cb20ed 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,8 @@ +2002-12-16 Lars Gullik Bjønnes + + * Makefile.in.in (qt_l10n.pot): Fix a bug that resulted in too few + strings being extracted. + 2002-12-14 Lars Gullik Bjønnes * Makefile.in.in (languages_l10n.pot): new target diff --git a/po/Makefile.in.in b/po/Makefile.in.in index d4115264be..c291589b65 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -206,15 +206,18 @@ ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS) l10n_pots: xforms_l10n.pot qt_l10n.pot layouts_l10n.pot languages_l10n.pot default_ui_l10n.pot - cat xforms_l10n.pot qt_l10n.pot layouts_l10n.pot languages_l10n.pot default_ui_l10n.pot | \ - msguniq -o $(PACKAGE).po + cat xforms_l10n.pot qt_l10n.pot layouts_l10n.pot languages_l10n.pot default_ui_l10n.pot > lyxtmp.pot && \ + msguniq -o $(PACKAGE).po lyxtmp.pot xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd awk ' \ 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"; \ } \ /label: / { \ if (NF > 1) { \ @@ -228,16 +231,15 @@ xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui awk ' \ // { \ - if (NF > 1) { \ - line=$$0; \ - sub(/.*/, "", line); \ - sub(/<\/string>.*/, "", line); \ - gsub(/&/, "\\&", line); \ - gsub(/</, "<", line); \ - gsub(/>/, ">", line); \ - printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n",\ - FILENAME, FNR, line); \ - } \ + line=$$0; \ + sub(/.*/, "", line); \ + sub(/<\/string>.*/, "", line); \ + gsub(/&/, "\\&", line); \ + gsub(/</, "<", line); \ + gsub(/>/, ">", line); \ + if (length(line) > 0) \ + printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n",\ + FILENAME, FNR, line); \ }' \ `find $(top_srcdir)/src/frontends/qt2/ui -name \*.ui` > $@ -- 2.39.2