diff options
-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]; |