diff options
author | Slávek Banko <[email protected]> | 2018-12-11 17:58:11 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2018-12-11 17:58:11 +0100 |
commit | f3600bef760f4d15a4838d613da53771f8c0e435 (patch) | |
tree | 00e948ba41ccfdfb7a7eecc1da37cbb722a108f6 | |
parent | c023e223b2ac394d7e457e7fd993c30b214ee22e (diff) | |
download | klcddimmer-f3600bef760f4d15a4838d613da53771f8c0e435.tar.gz klcddimmer-f3600bef760f4d15a4838d613da53771f8c0e435.zip |
Add CMakeL10n rules.
Create translation template.
Add CMake rules to build translations.
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | CMakeL10n.txt | 23 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 15 | ||||
-rw-r--r-- | po/CMakeLists.txt | 6 | ||||
-rw-r--r-- | po/klcddimmer.pot | 221 | ||||
-rw-r--r-- | src/CMakeL10n.txt | 3 |
6 files changed, 270 insertions, 0 deletions
diff --git a/CMakeL10n.txt b/CMakeL10n.txt new file mode 100644 index 0000000..a525b71 --- /dev/null +++ b/CMakeL10n.txt @@ -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( ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55340cf..de2f490 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" option( BUILD_ALL "Build all" ON ) option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) ##### configure checks @@ -68,6 +69,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) add_subdirectory( src ) tde_conditional_add_subdirectory( BUILD_DOC doc ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) ##### write configure files diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index fbc879f..f53c7a0 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -27,3 +27,18 @@ if( WITH_GCC_VISIBILITY ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") 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 ) diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..46fba83 --- /dev/null +++ b/po/CMakeLists.txt @@ -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( ) diff --git a/po/klcddimmer.pot b/po/klcddimmer.pot new file mode 100644 index 0000000..4a73426 --- /dev/null +++ b/po/klcddimmer.pot @@ -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 <[email protected]>\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 "" diff --git a/src/CMakeL10n.txt b/src/CMakeL10n.txt new file mode 100644 index 0000000..4d18ad1 --- /dev/null +++ b/src/CMakeL10n.txt @@ -0,0 +1,3 @@ +##### create translation templates ############## + +tde_l10n_create_template( "klcddimmer" ) |