Add i18n for HTML and manifest
This commit is contained in:
parent
7ce7b2b40b
commit
47e02ef136
6 changed files with 452 additions and 3 deletions
15
Makefile
15
Makefile
|
|
@ -17,7 +17,7 @@ po/POTFILES.js.in:
|
|||
mkdir -p $(dir $@)
|
||||
find src/ -name '*.js' -o -name '*.jsx' -o -name '*.es6' > $@
|
||||
|
||||
po/$(PACKAGE_NAME).pot: po/POTFILES.js.in
|
||||
po/$(PACKAGE_NAME).js.pot: po/POTFILES.js.in
|
||||
xgettext --default-domain=cockpit --output=$@ --language=C --keyword= \
|
||||
--keyword=_:1,1t --keyword=_:1c,2,1t --keyword=C_:1c,2 \
|
||||
--keyword=N_ --keyword=NC_:1c,2 \
|
||||
|
|
@ -26,6 +26,19 @@ po/$(PACKAGE_NAME).pot: po/POTFILES.js.in
|
|||
--keyword=gettextCatalog.getString:1,3c --keyword=gettextCatalog.getPlural:2,3,4c \
|
||||
--from-code=UTF-8 --files-from=$^
|
||||
|
||||
po/POTFILES.html.in:
|
||||
mkdir -p $(dir $@)
|
||||
find src -name '*.html' > $@
|
||||
|
||||
po/$(PACKAGE_NAME).html.pot: po/POTFILES.html.in
|
||||
po/html2po -f $^ -o $@
|
||||
|
||||
po/$(PACKAGE_NAME).manifest.pot:
|
||||
po/manifest2po src/manifest.json -o $@
|
||||
|
||||
po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po/$(PACKAGE_NAME).manifest.pot
|
||||
msgcat --sort-output --output-file=$@ $^
|
||||
|
||||
# Update translations against current PO template
|
||||
update-po: po/$(PACKAGE_NAME).pot
|
||||
for lang in $(LINGUAS); do \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue