X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=po%2FMakefile.in.in;h=f351b95aad95b55c98311828f7d0afcc78d86cac;hb=5e3b997b852fc96eef2387934b600262d3037745;hp=880aeeda7b14317eac118272c5028554a0da044f;hpb=8b60b23552d993cfe15dedec8d1c387f8ded577d;p=lyx.git diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 880aeeda7b..f351b95aad 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -31,6 +31,8 @@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) +AWK = @AWK@ + GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ @@ -366,8 +368,8 @@ ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS) LC_ALL=C ; export LC_ALL ; \ rm -f $@-t \ && ( cd $(top_srcdir); \ - grep -l "_(\".*\")" `find src -regex ".*\\.\\(C\\|c\\|h\\|C\\.in\\)" -print` |\ - sed -e '/xforms.forms/d' | grep -v -e "src/support/path_defines.C$$" |\ + grep -l "_(\".*\")" `find src \( -name '*.[Cch]' -o -name '*.C.in' \) -print` |\ + sed -e '/xforms.forms/d'| grep -v -e "src/support/package.C$$" |\ sort | uniq ) > $@-t \ && mv $@-t $@ @@ -377,7 +379,7 @@ l10n_pots: xforms_l10n.pot qt_l10n.pot layouts_l10n.pot languages_l10n.pot ui_l1 xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd LC_ALL=C ; export LC_ALL ; \ - awk -v top_srcdir="$(top_srcdir)" ' \ + $(AWK) -v top_srcdir="$(top_srcdir)" ' \ function fixupfilename() \ {\ return substr(FILENAME, length(top_srcdir "/") + 1);\ @@ -404,9 +406,9 @@ xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd }' \ ${top_srcdir}/src/frontends/xforms/forms/*.fd > $@ -qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui +qt_l10n.pot: $(top_srcdir)/src/frontends/qt3/ui/*.ui LC_ALL=C ; export LC_ALL ; \ - awk -v top_srcdir="$(top_srcdir)" ' \ + $(AWK) -v top_srcdir="$(top_srcdir)" ' \ function fixupfilename() \ {\ return substr(FILENAME, length(top_srcdir "/") + 1);\ @@ -418,17 +420,17 @@ qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui gsub(/&/, "\\&", line); \ gsub(/</, "<", line); \ gsub(/>/, ">", line); \ - gsub(/\"/, "\\\"", line); \ + gsub(/"/, "\\\"", line); \ if (length(line) > 0) {\ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n",\ fixupfilename(), FNR, line); \ } \ }' \ - ${top_srcdir}/src/frontends/qt2/ui/*.ui > $@ + ${top_srcdir}/src/frontends/qt3/ui/*.ui > $@ layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc LC_ALL=C ; export LC_ALL ; \ - awk -v top_srcdir="$(top_srcdir)" ' \ + $(AWK) -v top_srcdir="$(top_srcdir)" ' \ function fixupfilename() \ {\ return substr(FILENAME, length(top_srcdir "/") + 1);\ @@ -436,9 +438,19 @@ layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/* /^Style / { \ line=$$0; \ sub(/Style /, "", line); \ + gsub(/"/, "", line); \ + gsub(/_/, " ", line); \ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \ fixupfilename(), FNR, line); \ } \ + /LabelString[A-Za-z]*/ { \ + line=$$0; \ + sub(/[[:space:]]*LabelString[A-Za-z]*[[:space:]]*/, "", line); \ + gsub(/"/, "", line); \ + if (line != "") \ + printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \ + fixupfilename(), FNR, line); \ + } \ /GuiName/ { \ line=$$0; \ sub(/[[:space:]]*GuiName[[:space:]]*/, "", line); \ @@ -453,10 +465,11 @@ layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/* printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \ fixupfilename(), FNR, line); \ }' \ - ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc > $@ + ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc \ + | sed 's/\\/\\\\/g' > $@ languages_l10n.pot: $(top_srcdir)/lib/languages - awk -v top_srcdir="$(top_srcdir)" ' \ + $(AWK) -v top_srcdir="$(top_srcdir)" ' \ function fixupfilename() \ {\ return substr(FILENAME, length(top_srcdir "/") + 1);\ @@ -467,7 +480,7 @@ languages_l10n.pot: $(top_srcdir)/lib/languages { \ match($$0,"\"[^\"]*\""); \ lang=substr($$0,RSTART,RLENGTH); \ - gsub(/\"/, "", lang); \ + gsub(/"/, "", lang); \ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \ fixupfilename(), FNR, lang); \ }' \ @@ -475,7 +488,7 @@ languages_l10n.pot: $(top_srcdir)/lib/languages ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui LC_ALL=C ; export LC_ALL ; \ - awk -v top_srcdir="$(top_srcdir)" ' \ + $(AWK) -v top_srcdir="$(top_srcdir)" ' \ function fixupfilename() \ {\ return substr(FILENAME, length(top_srcdir "/") + 1);\ @@ -503,6 +516,9 @@ ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui }' \ ${top_srcdir}/lib/ui/*.ui > $@ +i18n.php: $(POFILES) + (cd $(srcdir) ; ./postats.sh $(POFILES)) >$@ + force: # Tell versions [3.59,3.63) of GNU make not to export all variables.