Skip to content

Commit

Permalink
langs/langsorter: update examples fix 'all' argument
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbrunker committed Jun 6, 2020
1 parent 3d975cd commit dafaae8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lang/langsorter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit dafaae8

Please sign in to comment.