update Messages.sh

v0.6
audoban 8 years ago
parent b37c1dd85a
commit f9cce494cd

@ -17,6 +17,8 @@ TEMPLATESHELL="shell.metadata.desktop.template" # shell desktop template
PROJECTAPP="latte-dock" # project name
TEMPLATEAPP="latte-dock.desktop.template" # app desktop template
NOTIFYRC="lattedock.notifyrc.template" # notifyrc template
function ki18n_xgettext
{
cd "$BASEDIR/$1"
@ -56,6 +58,13 @@ function ki18n_xgettext
"${WDIR}/../desktop-templates/${TEMPLATE}" -o "${WDIR}/${PROJECTNAME}.pot" || \
{ echo "error while calling xgettext. aborting."; exit 1; }
if [[ $1 == "app" ]] ; then
xgettext --from-code=UTF-8 --language=Desktop --join-existing --msgid-bugs-address="${BUGADDR}" \
-k -kName -kGenericName -kComment \
"${WDIR}/../desktop-templates/${NOTIFYRC}" -o "${WDIR}/${PROJECTNAME}.pot" || \
{ echo "error while calling xgettext. aborting."; exit 1; }
fi
echo -e "-- Merging translations for $TARGET"
catalogs=$(find "${WDIR}" -name '*.po')
for cat in $catalogs; do
@ -79,6 +88,7 @@ ki18n_xgettext plasmoid "$PROJECTPLASMOID" "$TEMPLATEPLASMOID"
ki18n_xgettext app "$PROJECTAPP" "$TEMPLATEAPP" shell
# The msg of shell package is merged with app
# ki18n_xgettext shell "$PROJECTSHELL" "$TEMPLATESHELL"

@ -9,6 +9,7 @@ PROJECTCONTAINMENT="$(pwd)/containment/metadata.desktop.cmake" # containment pat
PROJECTPLASMOID="$(pwd)/plasmoid/metadata.desktop.cmake" # plasmoid path
PROJECTSHELL="$(pwd)/shell/metadata.desktop.cmake" # shell path
PROJECTAPP="$(pwd)/app/latte-dock.desktop.cmake" # app path
NOTIFYRC="$(pwd)/app/lattedock.notifyrc" # global notify config
function generate_desktop_file
{
@ -32,3 +33,5 @@ generate_desktop_file plasmoid plasmoid.metadata.desktop.template "$PROJECTPLASM
generate_desktop_file shell shell.metadata.desktop.template "$PROJECTSHELL"
generate_desktop_file app latte-dock.desktop.template "$PROJECTAPP"
generate_desktop_file app lattedock.notifyrc "$NOTIFYRC"

Loading…
Cancel
Save