Add CMakeL10n rules.

Create translation template.
Add CMake rules to build translations.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/2/head
Slávek Banko 5 years ago
parent c023e223b2
commit f3600bef76
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668

@ -0,0 +1,23 @@
#################################################
#
# (C) 2018 Slávek Banko
# slavek.banko (AT) axis.cz
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
cmake_minimum_required( VERSION 2.8 )
##### include our cmake modules #################
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEL10n )
##### create translation templates ##############
tde_l10n_auto_add_subdirectories( )

@ -48,6 +48,7 @@ option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden"
option( BUILD_ALL "Build all" ON ) option( BUILD_ALL "Build all" ON )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
##### configure checks ##### configure checks
@ -68,6 +69,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
add_subdirectory( src ) add_subdirectory( src )
tde_conditional_add_subdirectory( BUILD_DOC doc ) tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
##### write configure files ##### write configure files

@ -27,3 +27,18 @@ if( WITH_GCC_VISIBILITY )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
endif( WITH_GCC_VISIBILITY ) endif( WITH_GCC_VISIBILITY )
##### gettext
if( BUILD_TRANSLATIONS )
include( FindGettext )
if( GETTEXT_FOUND )
set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE}
CACHE FILEPATH "path to msgfmt executable" )
endif( GETTEXT_FOUND )
if( NOT MSGFMT_EXECUTABLE )
tde_message_fatal( "msgfmt is required but was not found on your system." )
endif( NOT MSGFMT_EXECUTABLE )
endif( BUILD_TRANSLATIONS )

@ -0,0 +1,6 @@
# build translations if some are already available
file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
if( _srcs )
tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )
endif( )

@ -0,0 +1,221 @@
# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2018-12-11 17:56+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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: _translatorinfo:1
msgid ""
"_: NAME OF TRANSLATORS\n"
"Your names"
msgstr ""
#: _translatorinfo:2
msgid ""
"_: EMAIL OF TRANSLATORS\n"
"Your emails"
msgstr ""
#: brightnesschooser.cpp:83 brightnesschooser.ui:16 progpreferences.ui:16
#: progpreferences.cpp:120
#, no-c-format
msgid "Form1"
msgstr ""
#: brightnesschooser.cpp:84 brightnesschooser.ui:74
#, no-c-format
msgid "0"
msgstr ""
#: brightnesschooser.cpp:85 brightnesschooser.ui:88
#, no-c-format
msgid "set the brightness and click OK or press ENTER"
msgstr ""
#: brightnesschooser.cpp:86 brightnesschooser.ui:125
#, no-c-format
msgid "&OK"
msgstr ""
#: brightnesschooser.cpp:87 brightnesschooser.ui:128
#, no-c-format
msgid "Alt+O"
msgstr ""
#: klcddimmer.cpp:100
msgid "Applet for LCD brightness adjustment"
msgstr ""
#: klcddimmer.cpp:114
msgid "This is a help box"
msgstr ""
#: klcddimmer.cpp:123
msgid "Program"
msgstr ""
#: klcddimmer.cpp:171
msgid "&About KLcdDimmer"
msgstr ""
#: klcddimmer.cpp:173
msgid "&Configure KLcdDimmer..."
msgstr ""
#: progpreferences.ui:43 progpreferences.cpp:121
#, no-c-format
msgid "program"
msgstr ""
#: progpreferences.ui:51 progpreferences.ui:54 progpreferences.cpp:122
#: progpreferences.cpp:123
#, no-c-format
msgid "the program to set the brightness"
msgstr ""
#: progpreferences.ui:72 progpreferences.cpp:124
#, no-c-format
msgid "set argument"
msgstr ""
#: progpreferences.ui:80 progpreferences.cpp:125
#, no-c-format
msgid "the argument to pass to the program<br>to set the brightness"
msgstr ""
#: progpreferences.ui:84 progpreferences.cpp:126
#, no-c-format
msgid ""
"the argument to pass to the program<br>\n"
"to set the brightness"
msgstr ""
#: progpreferences.ui:102 progpreferences.cpp:128
#, no-c-format
msgid "get argument"
msgstr ""
#: progpreferences.ui:110 progpreferences.cpp:129
#, no-c-format
msgid "the argument to pass to the program<br>to get the brightness"
msgstr ""
#: progpreferences.ui:117 progpreferences.cpp:130
#, no-c-format
msgid ""
"the argument to pass to the program<br>\n"
"to get the brightness.\n"
"<p>\n"
"This can be left empty if the program does not support\n"
"a \"get\" argument."
msgstr ""
#: progpreferences.ui:135 progpreferences.cpp:135
#, no-c-format
msgid "minimum value"
msgstr ""
#: progpreferences.ui:160 progpreferences.cpp:136
#, no-c-format
msgid "the minimum value for the brightness"
msgstr ""
#: progpreferences.ui:163 progpreferences.ui:209 progpreferences.ui:255
#: progpreferences.cpp:137 progpreferences.cpp:140 progpreferences.cpp:143
#, no-c-format
msgid "brightness"
msgstr ""
#: progpreferences.ui:181 progpreferences.cpp:138
#, no-c-format
msgid "maximum value"
msgstr ""
#: progpreferences.ui:206 progpreferences.cpp:139
#, no-c-format
msgid "the maximum value for the brightness"
msgstr ""
#: progpreferences.ui:227 progpreferences.cpp:141
#, no-c-format
msgid "step"
msgstr ""
#: progpreferences.ui:252 progpreferences.cpp:142
#, no-c-format
msgid "step value<br>to increment/decrement the brightness"
msgstr ""
#: progpreferences.ui:265 progpreferences.cpp:144
#, no-c-format
msgid "S&ave the current brightness value"
msgstr ""
#: progpreferences.ui:268 progpreferences.cpp:145
#, no-c-format
msgid "Alt+A"
msgstr ""
#: progpreferences.ui:271 progpreferences.cpp:146
#, no-c-format
msgid ""
"When closing, it saves the current brightness value<br>so that it can be "
"restored<br>when the applet starts."
msgstr ""
#: progpreferences.ui:276 progpreferences.cpp:147
#, no-c-format
msgid ""
"When closing, it saves the current brightness value<br>\n"
"so that it can be restored<br>\n"
"when the applet starts."
msgstr ""
#: preferences.kcfg:7
#, no-c-format
msgid "program to adjust lcd brightness"
msgstr ""
#: preferences.kcfg:11
#, no-c-format
msgid "argument to set the brighness"
msgstr ""
#: preferences.kcfg:15
#, no-c-format
msgid "argument to get the brighness"
msgstr ""
#: preferences.kcfg:19
#, no-c-format
msgid "minimum value for brightness"
msgstr ""
#: preferences.kcfg:23
#, no-c-format
msgid "maximum value for brightness"
msgstr ""
#: preferences.kcfg:27
#, no-c-format
msgid "step to increment"
msgstr ""
#: preferences.kcfg:31
#, no-c-format
msgid "save the current value"
msgstr ""
#: preferences.kcfg:35
#, no-c-format
msgid "the current brightness value"
msgstr ""

@ -0,0 +1,3 @@
##### create translation templates ##############
tde_l10n_create_template( "klcddimmer" )
Loading…
Cancel
Save