From 4ced9fd928bfdf8a44152492b504bba4e0f98da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 9 May 2020 17:37:05 +0200 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- modules/TDEL10n.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules/TDEL10n.cmake') 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 ) -- cgit v1.2.1