Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ jobs:
with:
path: galette-core/galette/plugins/plugin-maps

- name: Compile translations
run: |
cd galette-core
bin/console galette:compile-locales plugin-maps
- name: Init for PostgreSQL
env:
POSTGRES_HOST: localhost
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ webroot/images/*
!webroot/images/marker-galette-pro.png
tempcache/
tests/coverage/

# compiled translations, built by bin/console galette:compile-locales
lang/*/LC_MESSAGES/*.mo
9 changes: 9 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,15 @@ def add_libs(rel_name, galette_archive):
galette.extractall(path=src_dir)
galette.close()

# compile translations: MO files are not versioned
lang_dir = os.path.join(src_dir, rel_name, 'lang')
for pot in fnmatch.filter(os.listdir(lang_dir), '*.pot'):
domain = pot[:-len('.pot')]
for po in fnmatch.filter(os.listdir(lang_dir), '%s_*.po' % domain):
mo_dir = os.path.join(lang_dir, po[len(domain) + 1:-len('.po')], 'LC_MESSAGES')
os.makedirs(mo_dir, exist_ok=True)
run('msgfmt --check -o "%s" "%s"' % (os.path.join(mo_dir, domain + '.mo'), os.path.join(lang_dir, po)))

npm_dir = os.path.join(src_dir, rel_name)
npm_cmd = 'npm install --prefix %s' % npm_dir
print(npm_cmd)
Expand Down
16 changes: 1 addition & 15 deletions lang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,7 @@ po :
done

mo :
@echo "Generating MO files:"
@for l in ${LANGUAGES}; do \
for d in ${DOMAINS}; do \
mkdir -p ${INSTALLDIR}/$${l}/LC_MESSAGES; \
echo " formatting ${INSTALLDIR}/$${l}/LC_MESSAGES/$${d}.mo."; \
msgfmt $${d}_$${l}.po -o ${INSTALLDIR}/$${l}/LC_MESSAGES/$${d}.mo.new; \
if diff -qI 'PO-Revision-Date:.*' ${INSTALLDIR}/$${l}/LC_MESSAGES/$${d}.mo.new ${INSTALLDIR}/$${l}/LC_MESSAGES/$${d}.mo > /dev/null; then \
echo " $${d}.mo NOT updated."; \
rm ${INSTALLDIR}/$${l}/LC_MESSAGES/$${d}.mo.new; \
else \
echo " $${d}.mo UPDATED."; \
mv ${INSTALLDIR}/$${l}/LC_MESSAGES/$${d}.mo.new ${INSTALLDIR}/$${l}/LC_MESSAGES/$${d}.mo; \
fi; \
done \
done
cd ../../../../ && bin/console galette:compile-locales plugin-maps

extract : twig ${PHP_SOURCES} Makefile
xgettext ${PHP_SOURCES} --keyword=_T:1,2t --keyword=__:1,2t --keyword=_Tn:1,2,4t --keyword=_Tx:1c,2,3t --keyword=_Tnx:1c,2,3,5t -L PHP --from-code=UTF-8 --add-comments=TRANS --force-po -o maps.pot;
Expand Down
Binary file removed lang/ar.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/br.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/ca.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/de_DE.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/en_US/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/es.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/fr_FR.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/it_IT.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/nb_NO.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/oc.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/ota.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/pt.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/pt_BR.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/ru.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/si.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/sl.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/sl/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/ta.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/tr.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Binary file removed lang/uk.utf8/LC_MESSAGES/maps.mo
Binary file not shown.
Loading