Ver código fonte

Add CMakeL10n rules.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/10/head
Slávek Banko 1 ano atrás
pai
commit
e532d9345d
38 arquivos alterados com 281 adições e 0 exclusões
  1. +96
    -0
      CMakeL10n.txt
  2. +3
    -0
      arts/CMakeL10n.txt
  3. +3
    -0
      arts/kde/CMakeL10n.txt
  4. +3
    -0
      arts/kde/mcop-dcop/CMakeL10n.txt
  5. +3
    -0
      arts/knotify/CMakeL10n.txt
  6. +3
    -0
      interfaces/CMakeL10n.txt
  7. +3
    -0
      interfaces/tdemediaplayer/CMakeL10n.txt
  8. +3
    -0
      interfaces/tdemediaplayer/tdefileaudiopreview/CMakeL10n.txt
  9. +11
    -0
      kate/CMakeL10n.txt
  10. +3
    -0
      kate/plugins/CMakeL10n.txt
  11. +3
    -0
      kate/plugins/autobookmarker/CMakeL10n.txt
  12. +3
    -0
      kate/plugins/insertfile/CMakeL10n.txt
  13. +3
    -0
      kate/plugins/isearch/CMakeL10n.txt
  14. +3
    -0
      kate/plugins/kdatatool/CMakeL10n.txt
  15. +3
    -0
      kate/plugins/wordcompletion/CMakeL10n.txt
  16. +3
    -0
      kdoctools/CMakeL10n.txt
  17. +3
    -0
      libtdescreensaver/CMakeL10n.txt
  18. +3
    -0
      tdeabc/CMakeL10n.txt
  19. +3
    -0
      tdeabc/formats/CMakeL10n.txt
  20. +3
    -0
      tdeabc/plugins/CMakeL10n.txt
  21. +3
    -0
      tdeabc/plugins/dir/CMakeL10n.txt
  22. +3
    -0
      tdeabc/plugins/file/CMakeL10n.txt
  23. +3
    -0
      tdeabc/plugins/ldaptdeio/CMakeL10n.txt
  24. +3
    -0
      tdeabc/plugins/net/CMakeL10n.txt
  25. +3
    -0
      tdeabc/plugins/sql/CMakeL10n.txt
  26. +3
    -0
      tdecmshell/CMakeL10n.txt
  27. +8
    -0
      tdeio/CMakeL10n.txt
  28. +3
    -0
      tdeio/tdeioexec/CMakeL10n.txt
  29. +8
    -0
      tdeprint/CMakeL10n.txt
  30. +3
    -0
      tdeprint/cups/CMakeL10n.txt
  31. +40
    -0
      tdeprint/cups/cupsdconf2/CMakeL10n.txt
  32. +3
    -0
      tdestyles/CMakeL10n.txt
  33. +3
    -0
      tdestyles/highcontrast/CMakeL10n.txt
  34. +3
    -0
      tdestyles/highcontrast/config/CMakeL10n.txt
  35. +3
    -0
      tdestyles/plastik/CMakeL10n.txt
  36. +3
    -0
      tdestyles/plastik/config/CMakeL10n.txt
  37. +3
    -0
      tdeui/CMakeL10n.txt
  38. +22
    -0
      tdeui/colors/CMakeL10n.txt

+ 96
- 0
CMakeL10n.txt Ver arquivo

@@ -0,0 +1,96 @@
#################################################
#
# (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 )


##### set directory for POT files ###############

set( POT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../tde-i18n/template/messages/tdelibs" )


##### verify tqt3 sources #######################

if( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/tqt3/src )
tde_message_fatal( "TQt3 source code is required but not found" )
endif( )


##### prepare tqt3/src/xml/qxml.cpp #############

if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/tqt3/src/xml/qxml.cpp )
# hide "#define" to allow strings to be extracted using xgettext
file( READ ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/tqt3/src/xml/qxml.cpp _tqt_qxml )
string( REGEX REPLACE "\n(#define[^\n]*)(QT_TRANSLATE_NOOP)" "\n/*\\1*/\\2" _tqt_qxml ${_tqt_qxml} )
file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/tqt3/src/xml/qxml.cpp.tde_l10n "${_tqt_qxml}" )
endif( )


##### generate tdeabc/addressee files ###########

execute_process(
COMMAND perl ./makeaddressee
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tdeabc/scripts
)


##### create translation templates ##############

tde_l10n_create_template(
CATALOG "tdelibs"
SOURCES
"."
"tdecore/tde-config.cpp.cmake"
"../dependencies/tqt3/src"
"../dependencies/tqt3/src/xml/qxml.cpp.tde_l10n"
EXCLUDES
"/test/" "/tests/"
"^arts/kde/mcop-dcop/"
"^arts/knotify/"
"^interfaces/tdemediaplayer/tdefileaudiopreview/"
"^kate/"
"^kdoctools/"
"^libtdescreensaver/"
"^tdeabc/formats/"
"^tdeabc/plugins/"
"^tdecmshell/"
"^tdecore/tdeconfig_compiler/example/"
"^tdeio/"
"^tdeioslave/"
"^tdeprint/"
"^tdeui/colors/"
"^tdestyles/.*/config/"
"/dependencies/tqt3/src/xml/qxml.cpp$"
KEYWORDS
tr tr:1,2
translate translate:1,2
QT_TRANSLATE_NOOP QT_TRANSLATE_NOOP:1,2
)


##### clenaup tdeabc/addressee files ############

file( REMOVE
${CMAKE_CURRENT_SOURCE_DIR}/tdeabc/addressee.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tdeabc/addressee.h
${CMAKE_CURRENT_SOURCE_DIR}/tdeabc/field.cpp
)


##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
arts/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
arts/kde/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
arts/kde/mcop-dcop/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "kmcop" )

+ 3
- 0
arts/knotify/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "knotify" )

+ 3
- 0
interfaces/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
interfaces/tdemediaplayer/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
interfaces/tdemediaplayer/tdefileaudiopreview/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdefileaudiopreview" )

+ 11
- 0
kate/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,11 @@
##### create translation templates ##############

tde_l10n_create_template(
CATALOG "katepart"
SOURCES data part plugins
ATTRIBUTES
"data/*.xml:language,section,Language Section"
"data/*.xml:language,name,Language"
)

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
kate/plugins/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
kate/plugins/autobookmarker/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdetexteditor_autobookmarker" )

+ 3
- 0
kate/plugins/insertfile/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdetexteditor_insertfile" )

+ 3
- 0
kate/plugins/isearch/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdetexteditor_isearch" )

+ 3
- 0
kate/plugins/kdatatool/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdetexteditor_kdatatool" )

+ 3
- 0
kate/plugins/wordcompletion/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdetexteditor_docwordcompletion" )

+ 3
- 0
kdoctools/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdeio_help" )

+ 3
- 0
libtdescreensaver/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "libtdescreensaver" )

+ 3
- 0
tdeabc/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
tdeabc/formats/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdeabcformat_binary" )

+ 3
- 0
tdeabc/plugins/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
tdeabc/plugins/dir/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdeabc_dir" )

+ 3
- 0
tdeabc/plugins/file/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdeabc_file" )

+ 3
- 0
tdeabc/plugins/ldaptdeio/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdeabc_ldaptdeio" )

+ 3
- 0
tdeabc/plugins/net/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdeabc_net" )

+ 3
- 0
tdeabc/plugins/sql/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdeabc_sql" )

+ 3
- 0
tdecmshell/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdecmshell" )

+ 8
- 0
tdeio/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,8 @@
##### create translation templates ##############

tde_l10n_create_template(
CATALOG "tdeio"
SOURCES "." "../tdeioslave"
)

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
tdeio/tdeioexec/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdeioexec" )

+ 8
- 0
tdeprint/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,8 @@
##### create translation templates ##############

tde_l10n_create_template(
CATALOG "tdeprint"
EXCLUDES "^cups/cupsdconf2/"
)

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
tdeprint/cups/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 40
- 0
tdeprint/cups/cupsdconf2/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,40 @@
##### prepare cupsd.conf.template as C source ###

set( _conf_context "Do not translate the keyword between brackets (e.g. ServerName, ServerAdmin, etc.)" )
file( READ ${CMAKE_CURRENT_SOURCE_DIR}/cupsd.conf.template _conf_template )
string( REGEX REPLACE "[^\n]" "" _conf_len "${_conf_template}" )
string( LENGTH "+${_conf_len}" _conf_len )
unset( _conf_comment )
unset( _conf_l10n )
set( _conf_pos 0 )
while( _conf_pos LESS ${_conf_len} )
string( REGEX REPLACE "^([^\n]*)\n(.*)" "\\1" _conf_line "${_conf_template}" )
string( REGEX REPLACE "^([^\n]*)\n(.*)" "\\2" _conf_template "${_conf_template}" )
math( EXPR _conf_pos "${_conf_pos}+1" )
if( _conf_comment )
if( "${_conf_line}" MATCHES "^\\$\\$" OR "${_conf_line}" MATCHES "^@@" )
unset( _conf_comment )
set( _conf_line ");" )
else( )
string( REGEX REPLACE "\\\"" "\\\\\"" _conf_line "${_conf_line}" )
string( REGEX REPLACE "^# +(.*)$" "\"\\1\\\\n\"" _conf_line "${_conf_line}" )
endif( )
else( )
if( "${_conf_line}" MATCHES "^%%" AND NOT "${_conf_line}" STREQUAL "%%header" )
set( _conf_comment 1 )
set( _conf_line "i18n(\"${_conf_context}\"," )
else( )
set( _conf_line "" )
endif( )
endif( )
set( _conf_l10n "${_conf_l10n}${_conf_line}\n" )
endwhile( )
file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/cupsd.conf.template.tde_l10n "${_conf_l10n}" )


##### create translation templates ##############

tde_l10n_create_template(
CATALOG "cupsdconf"
SOURCES "." cupsd.conf.template.tde_l10n
)

+ 3
- 0
tdestyles/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
tdestyles/highcontrast/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
tdestyles/highcontrast/config/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdestyle_highcontrast_config" )

+ 3
- 0
tdestyles/plastik/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
tdestyles/plastik/config/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_create_template( "tdestyle_plastik_config" )

+ 3
- 0
tdeui/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,3 @@
##### create translation templates ##############

tde_l10n_auto_add_subdirectories( )

+ 22
- 0
tdeui/colors/CMakeL10n.txt Ver arquivo

@@ -0,0 +1,22 @@
##### prepare rgb.txt as C source ###############

file( READ "${CMAKE_CURRENT_SOURCE_DIR}/rgb.txt" _colorsRC )
string( REGEX REPLACE
"([ \t]*([0-9]+[ \t]+)([0-9]+[ \t]+)([0-9]+[ \t]+))([^ \t\n]+)(\n|$)"
"\\1/* xgettext: no-c-format */i18n(\"color\", \"\\5\");\\6"
_colorsRC ${_colorsRC}
)
string( REGEX REPLACE
"[^\n]*gr[ae]y[^\n]*(\n|$)"
"\\1"
_colorsRC ${_colorsRC}
)
file( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/rgb.txt.tde_l10n" "${_colorsRC}" )


##### create translation templates ##############

tde_l10n_create_template(
CATALOG "tdelibs_colors"
SOURCES rgb.txt.tde_l10n
)

Carregando…
Cancelar
Salvar