Skip to content
Closed
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 @@ -170,6 +170,11 @@ jobs:
with:
path: galette-core/galette/plugins/plugin-oauth2

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

- name: Install plugin dependencies
run: |
cd galette-core/galette/plugins/plugin-oauth2
Expand Down Expand Up @@ -278,6 +283,11 @@ jobs:
with:
path: galette-core/galette/plugins/plugin-oauth2

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

- name: Install plugin dependencies
run: |
cd galette-core/galette/plugins/plugin-oauth2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ tests/config/encryption-key.php
tests/config/config.yml
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)))

plugin_dir = os.path.join(src_dir, rel_name)

# development only, nothing a Galette installation needs
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-oauth2

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