|
|
|
@ -14,9 +14,9 @@ PROJECTSHELL="plasma_shell_org.kde.latte.shell" # project name
|
|
|
|
|
PROJECTPATHSHELL="../../shell" # project path
|
|
|
|
|
WDIRSHELL="`pwd`/shell" # working dir
|
|
|
|
|
|
|
|
|
|
PROJECTCORONA="latte-dock" # project name
|
|
|
|
|
PROJECTPATHCORONA="../../corona" # project path
|
|
|
|
|
WDIRCORONA="`pwd`/corona" # working dir
|
|
|
|
|
PROJECTAPP="latte-dock" # project name
|
|
|
|
|
PROJECTPATHAPP="../../app" # project path
|
|
|
|
|
WDIRAPP="`pwd`/app" # working dir
|
|
|
|
|
|
|
|
|
|
echo "Preparing rc files for panel"
|
|
|
|
|
|
|
|
|
@ -156,49 +156,49 @@ echo "Done"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#---------------------- Corona Section ----------------#
|
|
|
|
|
echo "Preparing rc files for corona"
|
|
|
|
|
cd ../corona
|
|
|
|
|
echo "Preparing rc files for app"
|
|
|
|
|
cd ../app
|
|
|
|
|
|
|
|
|
|
# we use simple sorting to make sure the lines do not jump around too much from system to system
|
|
|
|
|
find "${PROJECTPATHSHELL}" -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > "${WDIRSCORONA}/rcfiles.list"
|
|
|
|
|
find "${PROJECTPATHCORONA}" -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort >> "${WDIRCORONA}/rcfiles.list"
|
|
|
|
|
xargs --arg-file="${WDIRCORONA}/rcfiles.list" extractrc > "${WDIRCORONA}/rc.cpp"
|
|
|
|
|
find "${PROJECTPATHSHELL}" -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > "${WDIRAPP}/rcfiles.list"
|
|
|
|
|
find "${PROJECTPATHAPP}" -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort >> "${WDIRAPP}/rcfiles.list"
|
|
|
|
|
xargs --arg-file="${WDIRAPP}/rcfiles.list" extractrc > "${WDIRAPP}/rc.cpp"
|
|
|
|
|
|
|
|
|
|
intltool-extract --quiet --type=gettext/ini ../../latte-dock.desktop.template
|
|
|
|
|
cat ../../latte-dock.desktop.template.h >> ${WDIRCORONA}/rc.cpp
|
|
|
|
|
cat ../../latte-dock.desktop.template.h >> ${WDIRAPP}/rc.cpp
|
|
|
|
|
rm ../../latte-dock.desktop.template.h
|
|
|
|
|
|
|
|
|
|
echo "Done preparing rc files for corona"
|
|
|
|
|
echo "Extracting messages for corona"
|
|
|
|
|
echo "Done preparing rc files for app"
|
|
|
|
|
echo "Extracting messages for app"
|
|
|
|
|
|
|
|
|
|
# see above on sorting
|
|
|
|
|
|
|
|
|
|
find "${PROJECTPATHSHELL}" -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.qml' -o -name '*.qml.cmake' | sort > "${WDIRCORONA}/infiles.list"
|
|
|
|
|
find "${PROJECTPATHCORONA}" -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.qml' -o -name '*.qml.cmake' | sort >> "${WDIRCORONA}/infiles.list"
|
|
|
|
|
echo "rc.cpp" >> "${WDIRCORONA}/infiles.list"
|
|
|
|
|
find "${PROJECTPATHSHELL}" -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.qml' -o -name '*.qml.cmake' | sort > "${WDIRAPP}/infiles.list"
|
|
|
|
|
find "${PROJECTPATHAPP}" -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.qml' -o -name '*.qml.cmake' | sort >> "${WDIRAPP}/infiles.list"
|
|
|
|
|
echo "rc.cpp" >> "${WDIRAPP}/infiles.list"
|
|
|
|
|
|
|
|
|
|
xgettext --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 -kN_:1 -kaliasLocale -kki18n:1 -kki18nc:1c,2 \
|
|
|
|
|
-kki18np:1,2 -kki18ncp:1c,2,3 --msgid-bugs-address="${BUGADDR}" --files-from=infiles.list \
|
|
|
|
|
-D "${BASEDIR}" -D "${WDIRCORONA}" -o "${PROJECTCORONA}.pot" || \
|
|
|
|
|
-D "${BASEDIR}" -D "${WDIRAPP}" -o "${PROJECTAPP}.pot" || \
|
|
|
|
|
{ echo "error while calling xgettext. aborting."; exit 1; }
|
|
|
|
|
echo "Done extracting messages for corona"
|
|
|
|
|
echo "Done extracting messages for app"
|
|
|
|
|
|
|
|
|
|
echo "Merging translations for corona"
|
|
|
|
|
echo "Merging translations for app"
|
|
|
|
|
catalogs=`find . -name '*.po'`
|
|
|
|
|
for cat in $catalogs; do
|
|
|
|
|
echo "$cat"
|
|
|
|
|
msgmerge -o "$cat.new" "$cat" "${WDIRCORONA}/${PROJECTCORONA}.pot"
|
|
|
|
|
msgmerge -o "$cat.new" "$cat" "${WDIRAPP}/${PROJECTAPP}.pot"
|
|
|
|
|
mv "$cat.new" "$cat"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
intltool-merge --quiet --desktop-style . ../../latte-dock.desktop.template "${PROJECTPATHCORONA}"/latte-dock.desktop
|
|
|
|
|
intltool-merge --quiet --desktop-style . ../../latte-dock.desktop.template "${PROJECTPATHAPP}"/latte-dock.desktop
|
|
|
|
|
|
|
|
|
|
echo "Done merging translations for corona"
|
|
|
|
|
echo "Cleaning up for corona"
|
|
|
|
|
#rm "${WDIRCORONA}/rcfiles.list"
|
|
|
|
|
#rm "${WDIRCORONA}/infiles.list"
|
|
|
|
|
#rm "${WDIRCORONA}/rc.cpp"
|
|
|
|
|
echo "Done merging translations for app"
|
|
|
|
|
echo "Cleaning up for app"
|
|
|
|
|
rm "${WDIRAPP}/rcfiles.list"
|
|
|
|
|
rm "${WDIRAPP}/infiles.list"
|
|
|
|
|
rm "${WDIRAPP}/rc.cpp"
|
|
|
|
|
echo "Done"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|