diff options
author | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2009-11-06 18:49:42 +0100 |
---|---|---|
committer | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2009-11-06 18:49:42 +0100 |
commit | f7b0017f219d649a3acb3d650cb6d4fbb79b9956 (patch) | |
tree | 338f73cbbca2e277c79cc659a00cee5d2a12bb7c /scripts/update_translations.php | |
parent | 769e5b7622445cf49cbaf5a416fb6b250b072866 (diff) |
Do not export codes twice
Diffstat (limited to 'scripts/update_translations.php')
-rwxr-xr-x | scripts/update_translations.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/update_translations.php b/scripts/update_translations.php index baa377cac..580c472ee 100755 --- a/scripts/update_translations.php +++ b/scripts/update_translations.php @@ -47,6 +47,8 @@ $codeMap = array( 'zh_TW' => 'zh-hant' ); +$doneCodes = array(); + foreach ($languages as $language) { $code = $language['lang']; @@ -56,6 +58,13 @@ foreach ($languages as $language) { continue; } + // Do not export codes twice (happens for 'nb') + if( in_array( $code, $doneCodes ) ) { + continue; + } else { + $doneCodes[] = $code; + } + // Convert code if needed if( isset( $codeMap[$code] ) ) { $twnCode = $codeMap[$code]; |