Browse Source

Add CMakeL10n rules.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/6/head
Slávek Banko 1 year ago
parent
commit
1174bdb468
No known key found for this signature in database GPG Key ID: 608F5293A04BE668
7 changed files with 88 additions and 0 deletions
  1. +28
    -0
      CMakeL10n.txt
  2. +3
    -0
      kimagemapeditor/CMakeL10n.txt
  3. +3
    -0
      klinkstatus/CMakeL10n.txt
  4. +3
    -0
      klinkstatus/src/CMakeL10n.txt
  5. +3
    -0
      kommander/CMakeL10n.txt
  6. +3
    -0
      kxsldbg/CMakeL10n.txt
  7. +45
    -0
      quanta/CMakeL10n.txt

+ 28
- 0
CMakeL10n.txt View File

@@ -0,0 +1,28 @@
#################################################
#
# (C) 2019 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/tdewebdev" )


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

tde_l10n_auto_add_subdirectories()

+ 3
- 0
kimagemapeditor/CMakeL10n.txt View File

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

tde_l10n_create_template( "kimagemapeditor" )

+ 3
- 0
klinkstatus/CMakeL10n.txt View File

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

tde_l10n_auto_add_subdirectories( )

+ 3
- 0
klinkstatus/src/CMakeL10n.txt View File

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

tde_l10n_create_template( "klinkstatus" )

+ 3
- 0
kommander/CMakeL10n.txt View File

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

tde_l10n_create_template( "kommander" )

+ 3
- 0
kxsldbg/CMakeL10n.txt View File

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

tde_l10n_create_template( "kxsldbg" )

+ 45
- 0
quanta/CMakeL10n.txt View File

@@ -0,0 +1,45 @@
##### prepare strings from data files ###########

message( STATUS "Prepare to extract strings from quanta data files..." )

## extra resources
unset( _resources_l10n )
file( GLOB_RECURSE _resources_files
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/data/toolbars/*.actions
${CMAKE_CURRENT_SOURCE_DIR}/data/toolbars/*.toolbar
${CMAKE_CURRENT_SOURCE_DIR}/*.kmdr
)
list( SORT _resources_files )
foreach( _resource_file ${_resources_files} )
tde_l10n_prepare_xml( "${_resource_file}" )
list( APPEND _resources_l10n "${_resource_file}.tde_l10n" )
endforeach( )

## chars
file( READ "${CMAKE_CURRENT_SOURCE_DIR}/data/chars" _chars_file )
string( REPLACE "\"" "\\\"" _chars_l10n "${_chars_file}" )
string( REGEX REPLACE
"(^|\n)([^\n]+)"
"\\1i18n(\"\\2\");"
_chars_l10n "${_chars_l10n}"
)
file( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/data/chars.tde_l10n" "${_chars_l10n}" )


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

tde_l10n_create_template(
CATALOG "quanta"
SOURCES
"."
"../lib"
${_resources_l10n}
"data/chars.tde_l10n"
"data/tips"
ATTRIBUTES
"data/toolbars/*.actions:action,text"
"data/toolbars/*.toolbar:action,text"
"data/config/actions.rc:action,text"
"*.tag:tag,comment"
)

Loading…
Cancel
Save