diff options
author | Slávek Banko <[email protected]> | 2020-03-29 18:48:55 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-03-29 18:48:55 +0200 |
commit | b3acc061a5d9c0418cd982bc6414799e666c3bac (patch) | |
tree | b3c70b6b948a18018d27a430aae5a3af0f29bf32 | |
parent | 04f8bb9293204322541ae9b93f98aae26fef03a4 (diff) | |
download | kcpuload-b3acc061a5d9c0418cd982bc6414799e666c3bac.tar.gz kcpuload-b3acc061a5d9c0418cd982bc6414799e666c3bac.zip |
Move translations to a new directory layout.
Add support for LINGUAS for listing translations to install.
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | doc/CMakeLists.txt | 15 | ||||
-rw-r--r-- | src/CMakeL10n.txt | 2 | ||||
-rw-r--r-- | translations/CMakeLists.txt | 1 | ||||
-rw-r--r-- | translations/messages/CMakeLists.txt | 14 | ||||
-rw-r--r-- | translations/messages/de.po | 180 | ||||
-rw-r--r-- | translations/messages/kcpuload.pot | 180 |
7 files changed, 391 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c2fc422..2ab1909 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" add_subdirectory( src ) add_subdirectory( icons ) tde_conditional_add_subdirectory( BUILD_DOC doc ) -tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations ) ##### write configure files diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 6d0aa9f..70d6348 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1 +1,14 @@ -tde_auto_add_subdirectories( ) +file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * ) +string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" ) + +foreach( _dir ${_dirs} ) + if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} AND + EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}/CMakeLists.txt ) + if( "${_dir}" STREQUAL "en" OR + "${_dir}" STREQUAL "man" OR + "${_linguas}" MATCHES "^;*$" OR + ";${_linguas};" MATCHES ";${_dir};" ) + add_subdirectory( ${_dir} ) + endif( ) + endif() +endforeach() diff --git a/src/CMakeL10n.txt b/src/CMakeL10n.txt index 2ba2a8f..94931f2 100644 --- a/src/CMakeL10n.txt +++ b/src/CMakeL10n.txt @@ -1,3 +1,3 @@ ##### create translation templates ############## -tde_l10n_create_template( "kcpuload" ) +tde_l10n_create_template( "messages/kcpuload" ) diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt new file mode 100644 index 0000000..42b186a --- /dev/null +++ b/translations/CMakeLists.txt @@ -0,0 +1 @@ +tde_auto_add_subdirectories() diff --git a/translations/messages/CMakeLists.txt b/translations/messages/CMakeLists.txt new file mode 100644 index 0000000..75c89f8 --- /dev/null +++ b/translations/messages/CMakeLists.txt @@ -0,0 +1,14 @@ +file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po ) +string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" ) + +foreach( _po ${po_files} ) + get_filename_component( _lang ${_po} NAME_WE ) + if( "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_lang};" ) + if( "${_po}" MATCHES "^([^/]*)/.*" ) + string( REGEX REPLACE "^([^/]*)/.*" "\\1" _component "${_po}" ) + else( ) + set( _component "${PROJECT_NAME}" ) + endif( ) + tde_create_translation( FILES ${_po} LANG ${_lang} OUTPUT_NAME ${_component} ) + endif( ) +endforeach( ) diff --git a/translations/messages/de.po b/translations/messages/de.po new file mode 100644 index 0000000..1d6a880 --- /dev/null +++ b/translations/messages/de.po @@ -0,0 +1,180 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2019-01-13 19:08+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\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 "" + +#: kcpudock.cpp:19 kcpudock.cpp:28 +msgid "C" +msgstr "" + +#: kcpudock.cpp:24 +msgid "C 0" +msgstr "" + +#: kcpudock.cpp:26 +msgid "C 1" +msgstr "" + +#: kcpuload.cpp:69 +#, c-format +msgid "CPU %1" +msgstr "" + +#: kcpuload.cpp:85 +msgid "Enable S&MP" +msgstr "" + +#: kcpuload.cpp:86 +msgid "S&MP Enabled" +msgstr "" + +#: kcpuload.cpp:126 +msgid "Current CPU User: %1%" +msgstr "" + +#: kcpuload.cpp:129 +msgid "Current CPU System: %1%" +msgstr "" + +#: kcpuload.cpp:132 kcpuload.cpp:133 kcpuload.cpp:141 +msgid ", C%1: %2%" +msgstr "" + +#: kcpuload.cpp:135 +msgid "" +"%1.\n" +"%2." +msgstr "" + +#: kcpuload.cpp:138 +msgid "Current CPU usage: %1%" +msgstr "" + +#: kcpuload.cpp:143 +#, c-format +msgid "%1." +msgstr "" + +#: kcpuload.cpp:148 +msgid "" +"Current CPU User: %1%.\n" +"Current CPU System: %2%." +msgstr "" + +#: kcpuload.cpp:152 +msgid "Current CPU usage: %1%." +msgstr "" + +#: main.cpp:22 +msgid "A small CPU usage meter for Kicker (the TDE panel)." +msgstr "" + +#: main.cpp:24 +msgid "KCPULoad was first released on the 8th of August, 1999." +msgstr "" + +#: main.cpp:28 +msgid "KCPULoad" +msgstr "" + +#: main.cpp:57 +msgid "KCPULoad is already running!\n" +msgstr "" + +#: speeddialog.cpp:30 +msgid "Select Speed" +msgstr "" + +#: speeddialog.cpp:34 +msgid "Update interval in milliseconds:" +msgstr "" + +#: statpopup.cpp:57 +msgid "Color (%1)..." +msgstr "" + +#: statpopup.cpp:77 statpopup.cpp:327 +msgid "Inactive." +msgstr "" + +#: statpopup.cpp:133 +msgid "St&yle" +msgstr "" + +#: statpopup.cpp:335 +msgid "&Active" +msgstr "" + +#: statpopup.cpp:339 +msgid "&Clear" +msgstr "" + +#: statpopup.cpp:343 +msgid "&Speed..." +msgstr "" + +#: statpopup.cpp:348 +msgid "Sp&lit Graph" +msgstr "" + +#: statpopup.cpp:349 +msgid "Graph Sp&litting Enabled" +msgstr "" + +#: statpopup.cpp:355 +msgid "&Lines" +msgstr "" + +#: statpopup.cpp:358 +msgid "&Bars" +msgstr "" + +#: statpopup.cpp:361 +msgid "&Shaded" +msgstr "" + +#: statpopup.cpp:366 +msgid "So&ft Curves" +msgstr "" + +#: statpopup.cpp:367 +msgid "So&ft Curves Enabled" +msgstr "" + +#: statpopup.cpp:372 +msgid "Show &Labels" +msgstr "" + +#: statpopup.cpp:373 +msgid "&Labels Enabled" +msgstr "" + +#: statpopup.cpp:378 +msgid "Show &Grid" +msgstr "" + +#: statpopup.cpp:379 +msgid "&Grid Enabled" +msgstr "" diff --git a/translations/messages/kcpuload.pot b/translations/messages/kcpuload.pot new file mode 100644 index 0000000..5f5ec00 --- /dev/null +++ b/translations/messages/kcpuload.pot @@ -0,0 +1,180 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2019-01-13 19:08+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 "" + +#: kcpudock.cpp:19 kcpudock.cpp:28 +msgid "C" +msgstr "" + +#: kcpudock.cpp:24 +msgid "C 0" +msgstr "" + +#: kcpudock.cpp:26 +msgid "C 1" +msgstr "" + +#: kcpuload.cpp:69 +#, c-format +msgid "CPU %1" +msgstr "" + +#: kcpuload.cpp:85 +msgid "Enable S&MP" +msgstr "" + +#: kcpuload.cpp:86 +msgid "S&MP Enabled" +msgstr "" + +#: kcpuload.cpp:126 +msgid "Current CPU User: %1%" +msgstr "" + +#: kcpuload.cpp:129 +msgid "Current CPU System: %1%" +msgstr "" + +#: kcpuload.cpp:132 kcpuload.cpp:133 kcpuload.cpp:141 +msgid ", C%1: %2%" +msgstr "" + +#: kcpuload.cpp:135 +msgid "" +"%1.\n" +"%2." +msgstr "" + +#: kcpuload.cpp:138 +msgid "Current CPU usage: %1%" +msgstr "" + +#: kcpuload.cpp:143 +#, c-format +msgid "%1." +msgstr "" + +#: kcpuload.cpp:148 +msgid "" +"Current CPU User: %1%.\n" +"Current CPU System: %2%." +msgstr "" + +#: kcpuload.cpp:152 +msgid "Current CPU usage: %1%." +msgstr "" + +#: main.cpp:22 +msgid "A small CPU usage meter for Kicker (the TDE panel)." +msgstr "" + +#: main.cpp:24 +msgid "KCPULoad was first released on the 8th of August, 1999." +msgstr "" + +#: main.cpp:28 +msgid "KCPULoad" +msgstr "" + +#: main.cpp:57 +msgid "KCPULoad is already running!\n" +msgstr "" + +#: speeddialog.cpp:30 +msgid "Select Speed" +msgstr "" + +#: speeddialog.cpp:34 +msgid "Update interval in milliseconds:" +msgstr "" + +#: statpopup.cpp:57 +msgid "Color (%1)..." +msgstr "" + +#: statpopup.cpp:77 statpopup.cpp:327 +msgid "Inactive." +msgstr "" + +#: statpopup.cpp:133 +msgid "St&yle" +msgstr "" + +#: statpopup.cpp:335 +msgid "&Active" +msgstr "" + +#: statpopup.cpp:339 +msgid "&Clear" +msgstr "" + +#: statpopup.cpp:343 +msgid "&Speed..." +msgstr "" + +#: statpopup.cpp:348 +msgid "Sp&lit Graph" +msgstr "" + +#: statpopup.cpp:349 +msgid "Graph Sp&litting Enabled" +msgstr "" + +#: statpopup.cpp:355 +msgid "&Lines" +msgstr "" + +#: statpopup.cpp:358 +msgid "&Bars" +msgstr "" + +#: statpopup.cpp:361 +msgid "&Shaded" +msgstr "" + +#: statpopup.cpp:366 +msgid "So&ft Curves" +msgstr "" + +#: statpopup.cpp:367 +msgid "So&ft Curves Enabled" +msgstr "" + +#: statpopup.cpp:372 +msgid "Show &Labels" +msgstr "" + +#: statpopup.cpp:373 +msgid "&Labels Enabled" +msgstr "" + +#: statpopup.cpp:378 +msgid "Show &Grid" +msgstr "" + +#: statpopup.cpp:379 +msgid "&Grid Enabled" +msgstr "" |