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
10 changes: 10 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ jobs:
with:
path: galette-core/galette/plugins/plugin-events

- name: Compile translations
run: |
cd galette-core
bin/console galette:compile-locales plugin-events

- name: Init for PostgreSQL
env:
POSTGRES_HOST: localhost
Expand Down Expand Up @@ -276,6 +281,11 @@ jobs:
path: galette-core/galette/plugins/plugin-events
fetch-depth: 0

- name: Compile translations
run: |
cd galette-core
bin/console galette:compile-locales plugin-events

- name: Find previous release
run: |
cd galette-core/galette/plugins/plugin-events
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ webroot/js/*bundle*
dist/
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-events

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 events.pot;
Expand Down
Binary file removed lang/ar.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/ar/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/br.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/br/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/ca.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/ca/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/de_DE.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/de_DE/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/en_US/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/es.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/es/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/fr_FR.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/fr_FR/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/it_IT.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/it_IT/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/nb_NO.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/nb_NO/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/oc.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/oc/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/ota.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/ota/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/pt.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/pt/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/pt_BR.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/pt_BR/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/ru.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/ru/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/si.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/si/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/sl.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/sl/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/ta.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/ta/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/tr.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/tr/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/uk.utf8/LC_MESSAGES/events.mo
Binary file not shown.
Binary file removed lang/uk/LC_MESSAGES/events.mo
Binary file not shown.
Loading