summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-05-09 17:37:05 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-05-09 17:37:05 +0200
commit4ced9fd928bfdf8a44152492b504bba4e0f98da5 (patch)
treed28c24d301cddb605f9adef4c203c8969eaaddfe
parent5cd16d6fb9d4917676e165655e91d75f36339c4c (diff)
downloadtde-cmake-4ced9fd9.tar.gz
tde-cmake-4ced9fd9.zip
Update TDEL10n module
+ For _translatorinfo strings, replace the references to an intentionally non-existent source file and use instead comments explaining the purpose of these strings. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--modules/TDEL10n.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/TDEL10n.cmake b/modules/TDEL10n.cmake
index 1f7df76..5bf2279 100644
--- a/modules/TDEL10n.cmake
+++ b/modules/TDEL10n.cmake
@@ -646,6 +646,19 @@ macro( tde_l10n_create_template )
# update references for modified source files (".tde_l10n" extension)
string( REGEX REPLACE "\\.tde_l10n[0-9]*(:[0-9]+)" "\\1" _pot "${_pot}" )
+ # replace the references for _translatorinfo with instructions in the comment
+ string( REGEX REPLACE
+ "(^|\n)(#:[^\n]*) _translatorinfo:1($|[ \n])"
+ "\\1#. Instead of a literal translation, add your name to the end of the list (separated by a comma).\n\\2\\3\n#, ignore-inconsistent"
+ _pot "${_pot}"
+ )
+ string( REGEX REPLACE
+ "(^|\n)(#:[^\n]*) _translatorinfo:2($|[ \n])"
+ "\\1#. Instead of a literal translation, add your email to the end of the list (separated by a comma).\n\\2\\3\n#, ignore-inconsistent"
+ _pot "${_pot}"
+ )
+ string( REGEX REPLACE "(^|\n)#:($|\n)" "\\1" _pot "${_pot}" )
+
# save translation template
if( EXISTS "${_dest}${_catalog}.pot" )
file( READ "${_dest}${_catalog}.pot" _potOrig )