Move translations to a new directory layout.

Add support for LINGUAS for listing translations to install.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/3/head
Slávek Banko 4 years ago
parent 623c7976ee
commit ed85ba6235
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -70,8 +70,8 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined"
add_subdirectory( src )
add_subdirectory( images )
tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations )
##### write configure files

@ -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()

@ -1,3 +1,3 @@
##### create translation templates ##############
tde_l10n_create_template( "bookreader" )
tde_l10n_create_template( "messages/bookreader" )

@ -0,0 +1 @@
tde_auto_add_subdirectories()

@ -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( )

@ -0,0 +1,98 @@
# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2019-01-13 19:07+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 ""
#: bookmarksdlg.cpp:114
msgid "Bookmarks editor"
msgstr ""
#: bookmarksdlg.cpp:118
msgid "F1"
msgstr ""
#: bookmarksdlg.cpp:121
msgid "Ca&ncel"
msgstr ""
#: bookmarksdlg.cpp:122
msgid "Alt+N"
msgstr ""
#: bookreader.cpp:315
msgid "General"
msgstr ""
#: main.cpp:28
msgid "A TDE Application"
msgstr ""
#: main.cpp:32
msgid "Document to open"
msgstr ""
#: main.cpp:38
msgid "BooKreader"
msgstr ""
#: bookreader.kcfg:9
#, no-c-format
msgid "The font used to display the contents of books."
msgstr ""
#: bookreader.kcfg:13
#, no-c-format
msgid "This is an offset of paragraph's first line in pixels"
msgstr ""
#: bookreader.kcfg:17
#, no-c-format
msgid "This is a default encoding"
msgstr ""
#: bookreader.kcfg:20
#, no-c-format
msgid "This is ..."
msgstr ""
#: settingsdlg.ui:16
#, no-c-format
msgid "Form1"
msgstr ""
#: settingsdlg.ui:81
#, no-c-format
msgid "Paragraph Offset"
msgstr ""
#: settingsdlg.ui:107
#, no-c-format
msgid "Default encoding"
msgstr ""
#: settingsdlg.ui:125
#, no-c-format
msgid "Load last URL on startup"
msgstr ""

@ -0,0 +1,101 @@
# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2019-01-13 19:07+0100\n"
"PO-Revision-Date: 2019-08-30 14:45+0000\n"
"Last-Translator: Slávek Banko <slavek.banko@axis.cz>\n"
"Language-Team: Czech <https://mirror.git.trinitydesktop.org/weblate/projects/"
"applications/kbookreader/cs/>\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"
#: _translatorinfo:1
msgid ""
"_: NAME OF TRANSLATORS\n"
"Your names"
msgstr "Slávek Banko"
#: _translatorinfo:2
msgid ""
"_: EMAIL OF TRANSLATORS\n"
"Your emails"
msgstr "slavek.banko@axis.cz"
#: bookmarksdlg.cpp:114
msgid "Bookmarks editor"
msgstr "Editor záložek"
#: bookmarksdlg.cpp:118
msgid "F1"
msgstr "F1"
#: bookmarksdlg.cpp:121
msgid "Ca&ncel"
msgstr "Z&rušit"
#: bookmarksdlg.cpp:122
msgid "Alt+N"
msgstr "Alt+N"
#: bookreader.cpp:315
msgid "General"
msgstr "Obecné"
#: main.cpp:28
msgid "A TDE Application"
msgstr "Aplikace TDE"
#: main.cpp:32
msgid "Document to open"
msgstr "Dokument k otevření"
#: main.cpp:38
msgid "BooKreader"
msgstr "BooKreader"
#: bookreader.kcfg:9
#, no-c-format
msgid "The font used to display the contents of books."
msgstr "Písmo použité k zobrazení obsahu knih."
#: bookreader.kcfg:13
#, no-c-format
msgid "This is an offset of paragraph's first line in pixels"
msgstr "Odsazení prvního řádku odstavce v pixelech"
#: bookreader.kcfg:17
#, no-c-format
msgid "This is a default encoding"
msgstr "Určuje výchozí kódování"
#: bookreader.kcfg:20
#, no-c-format
msgid "This is ..."
msgstr "Toto je …"
#: settingsdlg.ui:16
#, no-c-format
msgid "Form1"
msgstr "Form1"
#: settingsdlg.ui:81
#, no-c-format
msgid "Paragraph Offset"
msgstr "Odsazení odstavce"
#: settingsdlg.ui:107
#, no-c-format
msgid "Default encoding"
msgstr "Výchozí kódování"
#: settingsdlg.ui:125
#, no-c-format
msgid "Load last URL on startup"
msgstr "Načíst poslední adresu URL při spuštění"

@ -0,0 +1,102 @@
# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2019-01-13 19:07+0100\n"
"PO-Revision-Date: 2019-12-17 15:56+0000\n"
"Last-Translator: Chris <xchrisx@uber.space>\n"
"Language-Team: German <https://mirror.git.trinitydesktop.org/weblate/"
"projects/applications/kbookreader/de/>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.9.1\n"
#: _translatorinfo:1
msgid ""
"_: NAME OF TRANSLATORS\n"
"Your names"
msgstr "Chris (TDE)"
#: _translatorinfo:2
msgid ""
"_: EMAIL OF TRANSLATORS\n"
"Your emails"
msgstr "(Keine Email)"
#: bookmarksdlg.cpp:114
msgid "Bookmarks editor"
msgstr "Lesezeicheneditor"
#: bookmarksdlg.cpp:118
msgid "F1"
msgstr "F1"
#: bookmarksdlg.cpp:121
msgid "Ca&ncel"
msgstr "&Abbrechen"
#: bookmarksdlg.cpp:122
msgid "Alt+N"
msgstr "Alt+N"
#: bookreader.cpp:315
msgid "General"
msgstr "Allgemein"
#: main.cpp:28
msgid "A TDE Application"
msgstr "Ein TDE-Programm"
#: main.cpp:32
msgid "Document to open"
msgstr "Zu öffnendes Dokument"
#: main.cpp:38
msgid "BooKreader"
msgstr "BooKreader"
#: bookreader.kcfg:9
#, no-c-format
msgid "The font used to display the contents of books."
msgstr ""
"Legt die Schriftart fest, mit welcher der Inhalt von Büchern angezeigt wird."
#: bookreader.kcfg:13
#, no-c-format
msgid "This is an offset of paragraph's first line in pixels"
msgstr "Dies ist ein Versatz der ersten Zeile des Absatzes in Pixel"
#: bookreader.kcfg:17
#, no-c-format
msgid "This is a default encoding"
msgstr "Dies ist eine Standardkodierung"
#: bookreader.kcfg:20
#, no-c-format
msgid "This is ..."
msgstr "Dies ist ..."
#: settingsdlg.ui:16
#, no-c-format
msgid "Form1"
msgstr "Form1"
#: settingsdlg.ui:81
#, no-c-format
msgid "Paragraph Offset"
msgstr "Absatzversatz"
#: settingsdlg.ui:107
#, no-c-format
msgid "Default encoding"
msgstr "Standardkodierung"
#: settingsdlg.ui:125
#, no-c-format
msgid "Load last URL on startup"
msgstr "Letzte Adresse beim Starten laden"

@ -0,0 +1,101 @@
# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2019-01-13 19:07+0100\n"
"PO-Revision-Date: 2019-07-31 21:06+0000\n"
"Last-Translator: Heimen Stoffels <vistausss@outlook.com>\n"
"Language-Team: Dutch <https://mirror.git.trinitydesktop.org/weblate/projects/"
"applications/kbookreader/nl/>\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.7.1\n"
#: _translatorinfo:1
msgid ""
"_: NAME OF TRANSLATORS\n"
"Your names"
msgstr "Heimen Stoffels"
#: _translatorinfo:2
msgid ""
"_: EMAIL OF TRANSLATORS\n"
"Your emails"
msgstr "vistausss@outlook.com"
#: bookmarksdlg.cpp:114
msgid "Bookmarks editor"
msgstr "Bladwijzerbeheer"
#: bookmarksdlg.cpp:118
msgid "F1"
msgstr "F1"
#: bookmarksdlg.cpp:121
msgid "Ca&ncel"
msgstr "A&nnuleren"
#: bookmarksdlg.cpp:122
msgid "Alt+N"
msgstr "Alt+N"
#: bookreader.cpp:315
msgid "General"
msgstr "Algemeen"
#: main.cpp:28
msgid "A TDE Application"
msgstr "Een TDE-toepassing"
#: main.cpp:32
msgid "Document to open"
msgstr "Te openen document"
#: main.cpp:38
msgid "BooKreader"
msgstr "BoeKlezer"
#: bookreader.kcfg:9
#, no-c-format
msgid "The font used to display the contents of books."
msgstr "Het lettertype dat gebruikt woord voor de inhoud van boeken."
#: bookreader.kcfg:13
#, no-c-format
msgid "This is an offset of paragraph's first line in pixels"
msgstr "Dit is een compensatie van de eerste alinearegel in pixels"
#: bookreader.kcfg:17
#, no-c-format
msgid "This is a default encoding"
msgstr "Dit is een standaardencodering"
#: bookreader.kcfg:20
#, no-c-format
msgid "This is ..."
msgstr "Dit is ..."
#: settingsdlg.ui:16
#, no-c-format
msgid "Form1"
msgstr "Form1"
#: settingsdlg.ui:81
#, no-c-format
msgid "Paragraph Offset"
msgstr "Alineacompensatie"
#: settingsdlg.ui:107
#, no-c-format
msgid "Default encoding"
msgstr "Standaardencodering"
#: settingsdlg.ui:125
#, no-c-format
msgid "Load last URL on startup"
msgstr "Recentste url openen bij opstarten"
Loading…
Cancel
Save