Python-i18n: add _n() as a gettext keyword, for plurals
This commit is contained in:
parent
a31c4b4cb3
commit
44262951a1
@ -59,7 +59,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} -p ${MODULE_DIR}/lang -d ${MODULE_NAME} ${MODULE_DIR}/*.py
|
${PYGETTEXT} -k _n -p ${MODULE_DIR}/lang -d ${MODULE_NAME} ${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 +71,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} -p lang -d python $SHARED_PYTHON
|
${PYGETTEXT} -k _n -p lang -d python $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