mirror of
https://github.com/24eme/signaturepdf
synced 2026-03-14 13:55:44 +01:00
add makefile to update language (#48)
This commit is contained in:
parent
2265e019d1
commit
d827609225
3 changed files with 535 additions and 481 deletions
23
Makefile
23
Makefile
|
|
@ -1,4 +1,8 @@
|
|||
.PHONY: test
|
||||
.PHONY: test all
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
all: update
|
||||
|
||||
node_modules/jest/bin/jest.js:
|
||||
npm install jest
|
||||
|
|
@ -8,3 +12,20 @@ node_modules/puppeteer:
|
|||
|
||||
test: node_modules/jest/bin/jest.js node_modules/puppeteer
|
||||
./node_modules/jest/bin/jest.js
|
||||
|
||||
update:
|
||||
# Extraction des phrases traductibles...
|
||||
@xgettext --from-code=utf-8 --output=./locale/application.pot templates/*.php
|
||||
|
||||
# Mise a jour des fichiers .po...
|
||||
@for lang in $$(find locale -mindepth 1 -maxdepth 1 -type d); do \
|
||||
po_file="$$lang/LC_MESSAGES/application.po"; \
|
||||
msgmerge --update -N "$$po_file" ./locale/application.pot; \
|
||||
done
|
||||
|
||||
# Creation des fichiers .mo...
|
||||
@for lang in $$(find locale -mindepth 1 -maxdepth 1 -type d); do \
|
||||
po_file="$$lang/LC_MESSAGES/application.po"; \
|
||||
rm -f "$$lang/LC_MESSAGES/application.mo"; \
|
||||
msgfmt "$$po_file" --output-file="$$lang/LC_MESSAGES/application.mo"; \
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue