Copy translations to a new directory layout.

Use common rules for build and install translations.
Added translation of .desktop files.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit f404beea52)
r14.0.x
Slávek Banko 3 years ago
parent 8bd05d698b
commit f21f9ca5b0
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -20,4 +20,11 @@ include( TDEL10n )
##### create translation templates ##############
tde_l10n_create_template( "qtcurve" )
tde_l10n_create_template( "messages/qtcurve/" )
tde_l10n_create_template(
CATALOG "desktop_files/qtcurve-desktops"
SOURCES
style/*.themerc
colors/*.kcsrc
)

@ -88,7 +88,7 @@ add_subdirectory( style )
add_subdirectory( themes )
add_subdirectory( colors )
tde_conditional_add_subdirectory( BUILD_CONFIG_MODULE config )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
##### write configure files #####################

@ -1 +1,4 @@
install(FILES QtCurve.kcsrc DESTINATION ${DATA_INSTALL_DIR}/tdedisplay/color-schemes)
tde_create_translated_desktop(
SOURCE QtCurve.kcsrc
DESTINATION ${DATA_INSTALL_DIR}/tdedisplay/color-schemes
)

@ -1,5 +1,6 @@
[Color Scheme]
Name=QtCurve
activeBackground=169,195,228
activeBlend=169,195,228
activeForeground=255,255,255

@ -1,5 +0,0 @@
file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
if( _srcs )
tde_create_translation( LANG auto OUTPUT_NAME qtcurve )
endif( )

@ -1,48 +0,0 @@
#!/bin/sh
BASEDIR=".." # root of translatable sources
PROJECT="qtcurve" # project name
BUGADDR="http://sourceforge.net/tracker/?group_id=50231&atid=459007" # MSGID-Bugs
WDIR=`pwd` # working dir
echo "Preparing rc files"
cd ${BASEDIR}
# we use simple sorting to make sure the lines do not jump around too much from system to system
find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list
xargs --arg-file=${WDIR}/rcfiles.list extractrc > ${WDIR}/rc.cpp
# additional string for TDEAboutData
echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> ${WDIR}/rc.cpp
echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> ${WDIR}/rc.cpp
cd ${WDIR}
echo "Done preparing rc files"
echo "Extracting messages"
cd ${BASEDIR}
# see above on sorting
find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${WDIR}/infiles.list
echo "rc.cpp" >> ${WDIR}/infiles.list
cd ${WDIR}
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 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
--msgid-bugs-address="${BUGADDR}" \
--files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot || { echo "error while calling xgettext. aborting."; exit 1; }
#Fix charset...
cat ${PROJECT}.pot | sed s^charset=CHARSET^charset=UTF-8^g > ${PROJECT}.pot-new
mv ${PROJECT}.pot-new ${PROJECT}.pot
echo "Done extracting messages"
echo "Merging translations"
catalogs=`find . -name '*.po'`
for cat in $catalogs; do
echo $cat
msgmerge -o $cat.new $cat ${PROJECT}.pot
mv $cat.new $cat
done
echo "Done merging translations"
echo "Cleaning up"
cd ${WDIR}
rm rcfiles.list
rm infiles.list
rm rc.cpp
echo "Done"

@ -29,10 +29,13 @@ link_directories(
##### other data ################################
install( FILES qtcurve.themerc DESTINATION ${DATA_INSTALL_DIR}/tdestyle/themes )
tde_create_translated_desktop(
SOURCE qtcurve.themerc
DESTINATION ${DATA_INSTALL_DIR}/tdestyle/themes
)
##### plastik ###################################
##### qtcurve ###################################
set( target qtcurve )

@ -1,6 +1,9 @@
[Misc]
Name=QtCurve
Comment=Highly configurable style
ConfigPage=tdestyle_qtcurve_config
[KDE]
WidgetStyle=QtCurve

@ -0,0 +1,27 @@
# SOME DESCRIPTIVE TITLE.
# This file is put in the public domain.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-02 09:40+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. Name
#: style/qtcurve.themerc:2 colors/QtCurve.kcsrc:2
msgid "QtCurve"
msgstr ""
#. Comment
#: style/qtcurve.themerc:4
msgid "Highly configurable style"
msgstr ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save