From 4727194f5446a2f3749ffbcd493131b33e8b77ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 12 Dec 2019 13:19:47 +0100 Subject: [PATCH] MOBILE-3213 scripts: Detect wrong 2.4 version on langs --- scripts/lang_functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lang_functions.php b/scripts/lang_functions.php index af1e2ab3b..0fa57b1f4 100644 --- a/scripts/lang_functions.php +++ b/scripts/lang_functions.php @@ -232,6 +232,10 @@ function build_lang($lang, $keys) { // Prevent double. $text = str_replace(array('{{{', '}}}'), array('{{', '}}'), $text); } else { + // @TODO: Remove that line when core.cannotconnect and core.login.invalidmoodleversion are completelly changed to use $a + if (($key == 'core.cannotconnect' || $key == 'core.login.invalidmoodleversion') && strpos($text, '2.4') != false) { + $text = str_replace('2.4', '{{$a}}', $text); + } $local++; }