mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-22 16:33:48 +01:00
generate_lang_file: ignore LSformat string with simple string substitution
This commit is contained in:
parent
7b7ff7e629
commit
823006937a
1 changed files with 9 additions and 0 deletions
|
@ -377,6 +377,15 @@ function _cli_add_str_to_translate($msg, $context=null) {
|
|||
if (!is_null($lang) && _($msg) != "$msg")
|
||||
return;
|
||||
|
||||
// It is a LSformat string with a simple substitution (for instance: "%{test}")?
|
||||
if (preg_match("/^%[{(][^{(]+[})]$/", $msg)) {
|
||||
$LSlang_cli_logger -> trace(
|
||||
"_cli_add_str_to_translate($msg, $context): LSformat string with a simple substitution, ".
|
||||
"ignore it"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Message already exists ?
|
||||
if (array_key_exists($msg, $data)) {
|
||||
if ($context && !in_array($context, $data[$msg]['contexts']))
|
||||
|
|
Loading…
Reference in a new issue