- awk ' \
- /^#/ { \
- next; \
- } \
- { \
- lang=$$3; \
- gsub(/\"/, "", lang); \
- printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
- FILENAME, FNR, lang); \
- } \
- ' $(top_srcdir)/lib/languages > $@
-
-default_ui_l10n.pot: $(top_srcdir)/lib/ui/default.ui
- awk ' \
- /SubMenu/ { \
- 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/default.ui > $@
+ 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: