File: Makefile.am

package info (click to toggle)
cockpit 356-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 317,176 kB
  • sloc: javascript: 775,374; python: 41,133; ansic: 33,875; cpp: 11,141; sh: 3,534; makefile: 581; xml: 262
file content (53 lines) | stat: -rwxr-xr-x 1,988 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# The full list of various input and output file types
PO_INPUTS = $(wildcard $(srcdir)/po/*.po)

# Extract translate attribute, Glade style, angular-gettext HTML translations
po/cockpit.html.pot: $(srcdir)/package-lock.json
	$(AM_V_GEN) mkdir -p $(dir $@) && \
	$(srcdir)/pkg/lib/html2po -d $(srcdir) -o $@ \
		$$(cd $(srcdir) && find pkg/ -name '*.html')

# Extract cockpit style javascript translations
po/cockpit.js.pot:
	$(AM_V_GEN) mkdir -p $(dir $@) && \
	xgettext --default-domain=cockpit --output=- --language=C --keyword= \
		--keyword=_:1,1t --keyword=_:1c,2,2t --keyword=C_:1c,2 \
		--keyword=N_ --keyword=NC_:1c,2 \
		--keyword=gettext:1,1t --keyword=gettext:1c,2,2t \
		--keyword=ngettext:1,2,3t --keyword=ngettext:1c,2,3,4t \
		--keyword=gettextCatalog.getString:1,3c --keyword=gettextCatalog.getPlural:2,3,4c \
		--from-code=UTF-8 --directory=$(srcdir) \
		$$( cd $(srcdir) && find pkg/ ! -name 'test-*' -name '*.[jt]s' -o -name '*.[jt]sx') | \
		sed '/^#/ s/, c-format//' > $@

po/cockpit.manifest.pot:
	$(AM_V_GEN) mkdir -p $(dir $@) && \
	$(srcdir)/pkg/lib/manifest2po -d $(srcdir) -o $@ \
		$$(cd $(srcdir) && find pkg/ -name 'manifest.json')

po/cockpit.appstream.pot:
	$(AM_V_GEN) mkdir -p $(dir $@) && \
	GETTEXTDATADIRS=$(srcdir)/po xgettext --output=$@ --directory=$(srcdir) \
		$$(cd $(srcdir) && find pkg/ src/ -name '*.appdata.xml.in' -o -name '*.metainfo.xml.in')

po/cockpit.polkit.pot:
	$(AM_V_GEN) mkdir -p $(dir $@) && \
	GETTEXTDATADIRS=$(srcdir)/po xgettext --output=$@ --directory=$(srcdir) \
		$$(cd $(srcdir) && find src/ -name '*.policy.in')

# Combine the above pot files into one
po/cockpit.pot: po/cockpit.html.pot po/cockpit.js.pot po/cockpit.manifest.pot po/cockpit.appstream.pot po/cockpit.polkit.pot
	$(AM_V_GEN) mkdir -p $(dir $@) && \
	msgcat --sort-output --output-file=$@ $^

CLEANFILES += \
	dist/shell/*.po \
	src/ws/*.po \
	po/cockpit*.pot \
	$(NULL)

EXTRA_DIST += \
	$(PO_INPUTS) \
	po/its/polkit.its \
	po/its/polkit.loc \
	$(NULL)