-
-l10n_pots: $(srcdir)/xforms_l10n.pot $(srcdir)/qt_l10n.pot $(srcdir)/layouts_l10n.pot $(srcdir)/languages_l10n.pot $(srcdir)/ui_l10n.pot
- cat $(srcdir)/xforms_l10n.pot $(srcdir)/qt_l10n.pot $(srcdir)/layouts_l10n.pot $(srcdir)/languages_l10n.pot $(srcdir)/ui_l10n.pot | \
- msguniq -o $(PACKAGE).po
-
-$(srcdir)/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) { \
- line=$$0;\
- sub(/label: /,"",line);\
- printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", FILENAME, FNR, line);\
- }\
- }' \
- `find $(top_srcdir)/src/frontends/xforms/forms -name \*.fd` > $@
-
-$(srcdir)/qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui
- awk ' \
- /<string>/ { \
- line=$$0; \
- sub(/.*<string>/, "", line); \
- sub(/<\/string>.*/, "", line); \
- gsub(/&/, "\\&", 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` > $@
-
-$(srcdir)/layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc
- awk ' \
- /^Style / { \
- line=$$0; \
- sub(/Style /, "", line); \
- printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
- FILENAME, FNR, line); \
- } \
- /GuiName/ { \
- line=$$0; \
- sub(/[[:space:]]*GuiName[[:space:]]*/, "", line); \
- printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
- FILENAME, FNR, line); \
- } \
- ' `find $(top_srcdir)/lib/layouts -regex ".*\.\(layout\|inc\)"` > $@
-
-$(srcdir)/languages_l10n.pot: $(top_srcdir)/lib/languages
- awk ' \
- /^#/ { \
- next; \
- } \
- { \
- match($$0,"\"[^\"]*\""); \
- lang=substr($$0,RSTART,RLENGTH); \
- gsub(/\"/, "", lang); \
- printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
- FILENAME, FNR, lang); \
- } \
- ' $(top_srcdir)/lib/languages > $@
-
-$(srcdir)/ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui
- awk ' \
- /^[^#]*Submenu/ { \
- line=$$0; \
- sub(/[^"]*"/, "", line); \
- sub(/".*/, "", line); \
- printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
- FILENAME, FNR, line); \
- } \
- /^[^#]*Toolbar/ { \
- line=$$0; \
- sub(/[^"]*"/, "", line); \
- sub(/".*/, "", line); \
- printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
- FILENAME, FNR, line); \
- } \
- /^[^#]*Item/ { \
- line=$$0; \
- sub(/[^"]*"/, "", line); \
- sub(/".*/, "", line); \
- printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
- FILENAME, FNR, line); \
- } \
- ' $(top_srcdir)/lib/ui/*.ui > $@
+l10n_pots: xforms_l10n.pot qt_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
+ LC_ALL=C ; export LC_ALL ; \
+ awk -v top_srcdir="$(top_srcdir)" ' \
+ function fixupfilename() \
+ {\
+ 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; \
+ } \
+ /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(/&/, "\\&", 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 > $@
+
+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)" ' \
+ function fixupfilename() \
+ {\
+ return substr(FILENAME, length(top_srcdir "/") + 1);\
+ }\
+ /^Style / { \
+ line=$$0; \
+ sub(/Style /, "", line); \
+ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
+ fixupfilename(), FNR, line); \
+ } \
+ /GuiName/ { \
+ line=$$0; \
+ sub(/[[:space:]]*GuiName[[:space:]]*/, "", line); \
+ gsub(/"/, "", line); \
+ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
+ fixupfilename(), FNR, line); \
+ } \
+ /ListName/ { \
+ line=$$0; \
+ sub(/[[:space:]]*ListName[[:space:]]*/, "", line); \
+ gsub(/"/, "", line); \
+ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
+ fixupfilename(), FNR, line); \
+ }' \
+ ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc > $@
+
+languages_l10n.pot: $(top_srcdir)/lib/languages
+ awk -v top_srcdir="$(top_srcdir)" ' \
+ function fixupfilename() \
+ {\
+ return substr(FILENAME, length(top_srcdir "/") + 1);\
+ }\
+ /^#/ { \
+ next; \
+ } \
+ { \
+ match($$0,"\"[^\"]*\""); \
+ lang=substr($$0,RSTART,RLENGTH); \
+ gsub(/\"/, "", lang); \
+ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
+ fixupfilename(), FNR, lang); \
+ }' \
+ ${top_srcdir}/lib/languages > $@
+
+ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui
+ LC_ALL=C ; export LC_ALL ; \
+ awk -v top_srcdir="$(top_srcdir)" ' \
+ function fixupfilename() \
+ {\
+ return substr(FILENAME, length(top_srcdir "/") + 1);\
+ }\
+ /^[^#]*Submenu/ { \
+ line=$$0; \
+ sub(/[^"]*"/, "", line); \
+ sub(/".*/, "", line); \
+ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
+ fixupfilename(), FNR, line); \
+ } \
+ /^[^#]*Toolbar/ { \
+ line=$$0; \
+ sub(/[^"]*"/, "", line); \
+ sub(/".*/, "", line); \
+ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
+ fixupfilename(), FNR, line); \
+ } \
+ /^[^#]*Item/ { \
+ line=$$0; \
+ sub(/[^"]*"/, "", line); \
+ sub(/".*/, "", line); \
+ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
+ fixupfilename(), FNR, line); \
+ }' \
+ ${top_srcdir}/lib/ui/*.ui > $@
+
+i18n.php3: $(POFILES)
+ (cd $(srcdir) ; ./postats.sh $(POFILES)) >$@
+
+force: