Python-i18n: pygettext is deprecated
- Use xgettext -L python instead - Mark _n as a plural-forms translation function - Explicit output to .pot files (instead of default .po)
This commit is contained in:
parent
a4f4d417a2
commit
71fe0f6f03
10
ci/txpush.sh
10
ci/txpush.sh
@ -47,11 +47,7 @@ tx push --source --no-interactive -r calamares.fdo
|
|||||||
# - python modules without lang/, which use one shared catalog
|
# - python modules without lang/, which use one shared catalog
|
||||||
#
|
#
|
||||||
|
|
||||||
# Arch
|
PYGETTEXT="xgettext --keyword=_n:1,2 -L python"
|
||||||
# PYGETTEXT=/usr/lib/python3.5/Tools/i18n/pygettext.py
|
|
||||||
|
|
||||||
# Ubuntu
|
|
||||||
PYGETTEXT=pygettext3
|
|
||||||
|
|
||||||
SHARED_PYTHON=""
|
SHARED_PYTHON=""
|
||||||
for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do
|
for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do
|
||||||
@ -59,7 +55,7 @@ for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do
|
|||||||
if test -n "$FILES" ; then
|
if test -n "$FILES" ; then
|
||||||
MODULE_NAME=$(basename ${MODULE_DIR})
|
MODULE_NAME=$(basename ${MODULE_DIR})
|
||||||
if [ -d ${MODULE_DIR}/lang ]; then
|
if [ -d ${MODULE_DIR}/lang ]; then
|
||||||
${PYGETTEXT} -k _n -p ${MODULE_DIR}/lang -d ${MODULE_NAME} ${MODULE_DIR}/*.py
|
${PYGETTEXT} -p ${MODULE_DIR}/lang -d ${MODULE_NAME} -o ${MODULE_NAME}.pot ${MODULE_DIR}/*.py
|
||||||
if [ -f ${MODULE_DIR}/lang/${MODULE_NAME}.pot ]; then
|
if [ -f ${MODULE_DIR}/lang/${MODULE_NAME}.pot ]; then
|
||||||
tx set -r calamares.${MODULE_NAME} --source -l en ${MODULE_DIR}/lang/${MODULE_NAME}.pot
|
tx set -r calamares.${MODULE_NAME} --source -l en ${MODULE_DIR}/lang/${MODULE_NAME}.pot
|
||||||
tx push --source --no-interactive -r calamares.${MODULE_NAME}
|
tx push --source --no-interactive -r calamares.${MODULE_NAME}
|
||||||
@ -71,7 +67,7 @@ for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if test -n "$SHARED_PYTHON" ; then
|
if test -n "$SHARED_PYTHON" ; then
|
||||||
${PYGETTEXT} -k _n -p lang -d python $SHARED_PYTHON
|
${PYGETTEXT} -p lang -d python -o python.pot $SHARED_PYTHON
|
||||||
tx set -r calamares.python --source -l en lang/python.pot
|
tx set -r calamares.python --source -l en lang/python.pot
|
||||||
tx push --source --no-interactive -r calamares.python
|
tx push --source --no-interactive -r calamares.python
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user