langs/langsorter: update examples fix 'all' argument
This commit is contained in:
parent
3d975cd562
commit
dafaae8db0
@ -4,7 +4,7 @@
|
|||||||
// usage: php -f langsorter.php [arg1] [arg1]
|
// usage: php -f langsorter.php [arg1] [arg1]
|
||||||
// arg1: language file to sort, for example de
|
// arg1: language file to sort, for example de
|
||||||
// arg2: folder, empty = language root folder, UTF-8 = subfolder
|
// 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
|
// rearranges the language file the same as is in the english file
|
||||||
// missing definitions are copied from the english file
|
// missing definitions are copied from the english file
|
||||||
// removed definitions going to be removed
|
// 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
|
// 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";
|
echo "OK\r\n";
|
||||||
$output = array_slice($tararray, 0, $tarstart);
|
$output = array_slice($tararray, 0, $tarstart);
|
||||||
@ -181,7 +182,6 @@ if ($lancode != 'all') {
|
|||||||
while(($file = readdir($d)) !== false) {
|
while(($file = readdir($d)) !== false) {
|
||||||
$matches = array();
|
$matches = array();
|
||||||
preg_match('@serendipity_lang_([a-z]{2}[_]*[A-Z]*)\.inc\.php@', $file, $matches);
|
preg_match('@serendipity_lang_([a-z]{2}[_]*[A-Z]*)\.inc\.php@', $file, $matches);
|
||||||
echo "{$matches[1]}\r\n";
|
|
||||||
if (empty($matches[1])) continue;
|
if (empty($matches[1])) continue;
|
||||||
if ($matches[1] == 'en') continue;
|
if ($matches[1] == 'en') continue;
|
||||||
echo "syncing language {$matches[1]}\r\n========================\r\n";
|
echo "syncing language {$matches[1]}\r\n========================\r\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user