POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
-$(POFILES) $(GMOFILES)
+$(POFILES) $(GMOFILES) xforms_l10n.pot qt_l10n.pot layouts_l10n.pot \
+languages_l10n.pot ui_l10n.pot
POTFILE_IN_DEPS = $(shell find $(top_srcdir)/src -name Makefile.am)
$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in l10n_pots
$(XGETTEXT) --join-existing --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--escape --add-comments --keyword=_ --keyword=N_ \
- --files-from=$(srcdir)/POTFILES.in \
+ --keyword=qt_ --files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(PACKAGE).po \
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
- && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
+ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot || true)
install: install-exec install-data
install-exec:
&& ( cd $(top_srcdir); \
grep -l "_(\".*\")" `find src -name \*.[hHC] -print` |\
sed -e '/xforms.forms/d' | \
- sort -f -n | uniq ) > $@-t \
- && echo "src/ext_l10n.h" >> $@-t \
+ LC_COLLATE=C sort | uniq ) > $@-t \
&& mv $@-t $@
-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 lyxtmp.pot
+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
-xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd
+$(srcdir)/xforms_l10n.pot: $(top_srcdir)/src/frontends/xforms/forms/*.fd
awk ' \
BEGIN { \
print "#, fuzzy"; \
}' \
`find $(top_srcdir)/src/frontends/xforms/forms -name \*.fd` > $@
-qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui
+$(srcdir)/qt_l10n.pot: $(top_srcdir)/src/frontends/qt2/ui/*.ui
awk ' \
/<string>/ { \
line=$$0; \
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` > $@
-layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc
+$(srcdir)/layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc
awk ' \
/^Style / { \
line=$$0; \
} \
' `find $(top_srcdir)/lib/layouts -regex ".*\.\(layout\|inc\)"` > $@
-languages_l10n.pot: $(top_srcdir)/lib/languages
+$(srcdir)/languages_l10n.pot: $(top_srcdir)/lib/languages
awk ' \
/^#/ { \
next; \
} \
' $(top_srcdir)/lib/languages > $@
-default_ui_l10n.pot: $(top_srcdir)/lib/ui/default.ui
+$(srcdir)/ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui
awk ' \
- /SubMenu/ { \
+ /^[^#]*Submenu/ { \
line=$$0; \
sub(/[^"]*"/, "", line); \
sub(/".*/, "", line); \
printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
FILENAME, FNR, line); \
} \
- /Item/ { \
+ /^[^#]*Toolbar/ { \
line=$$0; \
sub(/[^"]*"/, "", line); \
sub(/".*/, "", line); \
printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
FILENAME, FNR, line); \
} \
- ' $(top_srcdir)/lib/ui/default.ui > $@
+ /^[^#]*Item/ { \
+ line=$$0; \
+ sub(/[^"]*"/, "", line); \
+ sub(/".*/, "", line); \
+ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
+ FILENAME, FNR, line); \
+ } \
+ ' $(top_srcdir)/lib/ui/*.ui > $@
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.