]> git.lyx.org Git - lyx.git/blob - po/Rules-lyx
Move Lexer to support/ directory (and lyx::support namespace)
[lyx.git] / po / Rules-lyx
1 # LyX specific code to generate lyx.pot
2
3 DISTFILES.common.extra2 = lyx_pot.py postats.py pocheck.pl Makefile.in \
4         Rules-lyx
5
6 POTFILE_IN_DEPS = $(shell find $(top_srcdir)/src -name Makefile.am)
7
8 $(DOMAIN).pot-update: l10n_pots
9
10 # The ui_*.h and moc_*.cpp filters must match the patterns in src/frontends/qt/Makefile.am
11 ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS)
12         LC_ALL=C ; export LC_ALL ; \
13         rm -f $@-t \
14         && ( cd $(top_srcdir); \
15              grep -l "_(\".*\")" `find src \( \( -name '*.h' -a ! -name 'ui_*.h' \) -o \( -name '*.cpp' -a ! -name 'moc_*.cpp' \) \) -print` |\
16              sort | uniq ) > $@-t \
17         && mv $@-t $@
18
19 l10n_pots: qt_l10n.pot layouts_l10n.pot languages_l10n.pot latexfonts_l10n.pot encodings_l10n.pot ui_l10n.pot external_l10n.pot formats_l10n.pot examples_templates_l10n.pot tabletemplates_l10n.pot
20         cat $^ | msguniq -o $(DOMAIN).po
21         rm $^
22
23 LYX_POT = LC_ALL=C ; export LC_ALL ; \
24   $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir)
25
26 qt_l10n.pot: $(top_srcdir)/src/frontends/qt/ui/*.ui
27         $(LYX_POT) -o $@ -t qt $^
28
29 layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout \
30                 $(top_srcdir)/lib/layouts/*.inc \
31                 $(top_srcdir)/lib/layouts/*.module \
32                 $(top_srcdir)/lib/citeengines/*.citeengine
33         $(LYX_POT) -o $@ -t layouts $^
34
35 # Read translatable strings from layouts and translations from the po files and
36 # create the layouttranslations file containing all LaTeX relevant translations
37 $(top_srcdir)/lib/layouttranslations: $(POFILES) $(top_srcdir)/lib/layouts/*.layout \
38                 $(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/layouts/*.module $(top_srcdir)/lib/citeengines/*.citeengine
39         $(LYX_POT) -o $@ -t layouttranslations ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module $(top_srcdir)/lib/citeengines/*.citeengine
40
41 languages_l10n.pot: $(top_srcdir)/lib/languages
42         $(LYX_POT) -o $@ -t languages $^
43
44 latexfonts_l10n.pot: $(top_srcdir)/lib/latexfonts
45         $(LYX_POT) -o $@ -t latexfonts $^
46
47 encodings_l10n.pot: $(top_srcdir)/lib/encodings
48         $(LYX_POT) -o $@ -t encodings $^
49
50 ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui $(top_srcdir)/lib/ui/*.inc
51         $(LYX_POT) -o $@ -t ui $^
52
53 external_l10n.pot: $(top_srcdir)/lib/xtemplates/*.xtemplate
54         $(LYX_POT) -o $@ -t external $^
55
56 formats_l10n.pot: $(top_srcdir)/lib/configure.py
57         $(LYX_POT) -o $@ -t formats $^
58
59 examples_templates_l10n.pot: $(top_srcdir)/lib/examples/* \
60                 $(top_srcdir)/lib/templates/*
61         $(LYX_POT) -o $@ -t examples_templates $^
62
63 tabletemplates_l10n.pot: $(top_srcdir)/lib/tabletemplates/*.lyx
64         $(LYX_POT) -o $@ -t tabletemplates $^
65
66 # LyX specific code to generate l10n statistics for the web site
67 i18n.inc: $(POFILES) postats.py
68         $(PYTHON) $(srcdir)/postats.py "$(VERSION)" $(POFILES) >$@