i18n: smash things back from unspecified charset to UTF-8
This commit is contained in:
parent
15c2a96640
commit
f63b44c984
@ -60,6 +60,7 @@ for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do
|
||||
if [ -d ${MODULE_DIR}/lang ]; then
|
||||
# Convert PO files to MO files
|
||||
for POFILE in $(find ${MODULE_DIR} -name "*.po") ; do
|
||||
sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' $POFILE
|
||||
msgfmt -o ${POFILE%.po}.mo $POFILE
|
||||
done
|
||||
git add --verbose ${MODULE_DIR}/lang/*
|
||||
@ -69,6 +70,7 @@ for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do
|
||||
done
|
||||
|
||||
for POFILE in $(find lang -name "python.po") ; do
|
||||
sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' $POFILE
|
||||
msgfmt -o ${POFILE%.po}.mo $POFILE
|
||||
done
|
||||
git add --verbose lang/python*
|
||||
|
10
ci/txpush.sh
10
ci/txpush.sh
@ -56,8 +56,10 @@ for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do
|
||||
MODULE_NAME=$(basename ${MODULE_DIR})
|
||||
if [ -d ${MODULE_DIR}/lang ]; then
|
||||
${PYGETTEXT} -p ${MODULE_DIR}/lang -d ${MODULE_NAME} -o ${MODULE_NAME}.pot ${MODULE_DIR}/*.py
|
||||
if [ -f ${MODULE_DIR}/lang/${MODULE_NAME}.pot ]; then
|
||||
tx set -r calamares.${MODULE_NAME} --source -l en ${MODULE_DIR}/lang/${MODULE_NAME}.pot
|
||||
POTFILE="${MODULE_DIR}/lang/${MODULE_NAME}.pot"
|
||||
if [ -f "$POTFILE" ]; then
|
||||
sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' "$POTFILE"
|
||||
tx set -r calamares.${MODULE_NAME} --source -l en "$POTFILE"
|
||||
tx push --source --no-interactive -r calamares.${MODULE_NAME}
|
||||
fi
|
||||
else
|
||||
@ -68,6 +70,8 @@ done
|
||||
|
||||
if test -n "$SHARED_PYTHON" ; then
|
||||
${PYGETTEXT} -p lang -d python -o python.pot $SHARED_PYTHON
|
||||
tx set -r calamares.python --source -l en lang/python.pot
|
||||
POTFILE="lang/python.pot"
|
||||
sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' "$POTFILE"
|
||||
tx set -r calamares.python --source -l en "$POTFILE"
|
||||
tx push --source --no-interactive -r calamares.python
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user