added localize script to create POT files

This commit is contained in:
Ivailo Monev 2014-12-06 21:15:28 +00:00
parent c4da2cac8b
commit fb6cc5f6cd
2 changed files with 41 additions and 0 deletions

View file

@ -4,6 +4,12 @@ set -e
packs=("ariya-icons" "kdelibs" "kde-baseapps" "kde-workspace" "kde-extraapps" "kde-l10n")
cwd="$(pwd)"
if ! type -p git ;then
echo "Git is not installed"
exit 1
fi
for p in "${packs[@]}";do
if [ -d "$p/.git" ];then
echo "Updating sources of $p..."

35
localize.sh Executable file
View file

@ -0,0 +1,35 @@
#!/bin/bash
set -e
message="$1"
cwd="$(pwd)"
if [ -z "$message" ];then
echo "Pass a path to Messages.sh"
exit 1
elif [ "$(basename $message)" != "Messages.sh" ];then
echo "Path passed is not Messages.sh"
exit 1
elif ! type -p extractrc ;then
echo "extractrc is not in your PATH"
exit 1
elif ! type -p xgettext ;then
echo "xgettext is not in your PATH"
exit 1
fi
# the address is temporary
gargs="--from-code=UTF-8 -C -kde \
-ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
-kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 \
-kki18np:1,2 -kki18ncp:1c,2,3 --msgid-bugs-address=xakepa10@gmail.com"
export EXTRACTRC="perl $(type -p extractrc)" XGETTEXT="$(type -p xgettext) $gargs"
export podir="$cwd"
cd "$(dirname $message)"
source "Messages.sh"
rm -f rc.cpp
echo "All done, use msgmerge to merge the POT files."
echo "You can find them at: $podir"