]> git.lyx.org Git - lyx.git/blob - po/Rules-lyx
Don't allow newline characters in document settings.
[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/qt4/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              grep -v -e "src/support/Package.cpp$$" |\
17              sort | uniq ) > $@-t \
18         && mv $@-t $@
19
20 l10n_pots: qt4_l10n.pot layouts_l10n.pot languages_l10n.pot encodings_l10n.pot ui_l10n.pot external_l10n.pot formats_l10n.pot
21         cat $^ | \
22         msguniq -o $(DOMAIN).po && rm -f  $^
23
24
25 qt4_l10n.pot: $(top_srcdir)/src/frontends/qt4/ui/*.ui
26         LC_ALL=C ; export LC_ALL ; \
27         python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t qt4 ${top_srcdir}/src/frontends/qt4/ui/*.ui 
28
29 layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc \
30                 $(top_srcdir)/lib/layouts/*.module
31         LC_ALL=C ; export LC_ALL ; \
32         python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t layouts ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module
33
34 $(top_srcdir)/lib/layouttranslations: $(POFILES) $(top_srcdir)/lib/layouts/*.layout \
35                 $(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/layouts/*.module
36         LC_ALL=C ; export LC_ALL ; \
37         python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t layouttranslations ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module
38
39 languages_l10n.pot: $(top_srcdir)/lib/languages
40         python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t languages ${top_srcdir}/lib/languages
41
42 encodings_l10n.pot: $(top_srcdir)/lib/encodings
43         python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t encodings ${top_srcdir}/lib/encodings
44
45 ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui $(top_srcdir)/lib/ui/*.inc
46         LC_ALL=C ; export LC_ALL ; \
47         python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t ui ${top_srcdir}/lib/ui/*.ui ${top_srcdir}/lib/ui/*.inc
48
49 external_l10n.pot: $(top_srcdir)/lib/external_templates
50         python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t external ${top_srcdir}/lib/external_templates
51
52 formats_l10n.pot: $(top_srcdir)/lib/configure.py
53         python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t formats ${top_srcdir}/lib/configure.py
54
55 # LyX specific code to generate l10n statistics for the web site
56 i18n.inc: $(POFILES) postats.py
57         (cd $(srcdir) ; python postats.py "$(VERSION)" $(POFILES)) >$@