summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSiebrand Mazeland <s.mazeland@xs4all.nl>2009-11-06 18:49:42 +0100
committerSiebrand Mazeland <s.mazeland@xs4all.nl>2009-11-06 18:49:42 +0100
commitf7b0017f219d649a3acb3d650cb6d4fbb79b9956 (patch)
tree338f73cbbca2e277c79cc659a00cee5d2a12bb7c /scripts
parent769e5b7622445cf49cbaf5a416fb6b250b072866 (diff)
Do not export codes twice
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update_translations.php9
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];