From dafaae8db0795bcba2968a5e93a2d773b18a2f42 Mon Sep 17 00:00:00 2001 From: Stephan Brunker Date: Sat, 6 Jun 2020 14:59:30 +0200 Subject: [PATCH] langs/langsorter: update examples fix 'all' argument --- lang/langsorter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/langsorter.php b/lang/langsorter.php index 7edd3be63..87ab5d10d 100644 --- a/lang/langsorter.php +++ b/lang/langsorter.php @@ -4,7 +4,7 @@ // usage: php -f langsorter.php [arg1] [arg1] // arg1: language file to sort, for example de // arg2: folder, empty = language root folder, UTF-8 = subfolder -// or single argument -all to batch process all existing language files +// or single argument all to batch process all existing language files // rearranges the language file the same as is in the english file // missing definitions are copied from the english file // removed definitions going to be removed @@ -86,7 +86,8 @@ function synclang($dir, $lancode) { } // make changes, e.g. delete translations which have to be changed - unset($tardefs['IFRAME_SAVE']); + //unset($tardefs['IFRAME_SAVE']); reset a string to be copied from default + //$tardefs['SIGNATURE'] = ' "' . trim($tardefs['SIGNATURE'], 'n- "\\'); the target definition includes everthing after the colon echo "OK\r\n"; $output = array_slice($tararray, 0, $tarstart); @@ -181,7 +182,6 @@ function synclang($dir, $lancode) { while(($file = readdir($d)) !== false) { $matches = array(); preg_match('@serendipity_lang_([a-z]{2}[_]*[A-Z]*)\.inc\.php@', $file, $matches); - echo "{$matches[1]}\r\n"; if (empty($matches[1])) continue; if ($matches[1] == 'en') continue; echo "syncing language {$matches[1]}\r\n========================\r\n";