aboutsummaryrefslogtreecommitdiff
path: root/update-po.sh
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-09-05 12:56:25 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-09-05 12:56:25 +0200
commite9534394c942cde1d043ce45f88f617b2018224f (patch)
tree0ecf0458b8b968eb8872deae2c73cd178b2fa97f /update-po.sh
parent0ef8ce7677688b51ac69b3ba797f4d718f909f2f (diff)
parent9e5b57ca293414e51f82f70dd374b70798d08d44 (diff)
downloadayatana-indicator-printers-e9534394c942cde1d043ce45f88f617b2018224f.tar.gz
ayatana-indicator-printers-e9534394c942cde1d043ce45f88f617b2018224f.tar.bz2
ayatana-indicator-printers-e9534394c942cde1d043ce45f88f617b2018224f.zip
Merge branch 'tari01-pr/move-to-cmake'
Attributes GH PR #17: https://github.com/AyatanaIndicators/ayatana-indicator-printers/pull/17
Diffstat (limited to 'update-po.sh')
-rwxr-xr-xupdate-po.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/update-po.sh b/update-po.sh
index 5f9e9fd..b0470a0 100755
--- a/update-po.sh
+++ b/update-po.sh
@@ -16,23 +16,23 @@ set -x
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
-GETTEXT_DOMAIN=$(cat configure.ac | grep -E "^GETTEXT_PACKAGE=" | sed -e 's/GETTEXT_PACKAGE=//')
+GETTEXT_DOMAIN=$(cat CMakeLists.txt | grep 'set.*(.*GETTEXT_PACKAGE' | sed -r -e 's/.*\"([^"]+)\"\)/\1/')
cp po/${GETTEXT_DOMAIN}.pot po/${GETTEXT_DOMAIN}.pot~
cd po/
cat LINGUAS | while read lingua; do
- if [ ! -e ${lingua}.po ]; then
- msginit --input=${GETTEXT_DOMAIN}.pot --locale=${lingua} --no-translator --output-file=$lingua.po
- else
- intltool-update --gettext-package ${GETTEXT_DOMAIN} $(basename ${lingua})
- fi
-
- sed -e 's/\.xml\.in\.h:/.xml.in:/g' \
- -e 's/\.ini\.in\.h:/.ini.in:/g' \
- -e 's/\.xml\.h:/.xml:/g' \
- -e 's/\.ini\.h:/.ini:/g' \
- -i ${lingua}.po
+ if [ ! -e ${lingua}.po ]; then
+ msginit --input=${GETTEXT_DOMAIN}.pot --locale=${lingua} --no-translator --output-file=$lingua.po
+ else
+ intltool-update --gettext-package ${GETTEXT_DOMAIN} $(basename ${lingua})
+ fi
+
+ sed -e 's/\.xml\.in\.h:/.xml.in:/g' \
+ -e 's/\.ini\.in\.h:/.ini.in:/g' \
+ -e 's/\.xml\.h:/.xml:/g' \
+ -e 's/\.ini\.h:/.ini:/g' \
+ -i ${lingua}.po
done
cd - 1>/dev/null