From: Siebrand Mazeland Date: Fri, 6 Nov 2009 17:49:42 +0000 (+0100) Subject: Do not export codes twice X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f7b0017f219d649a3acb3d650cb6d4fbb79b9956;p=quix0rs-gnu-social.git Do not export codes twice --- diff --git a/scripts/update_translations.php b/scripts/update_translations.php index baa377caca..580c472eef 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];