https://www.mediawiki.org/wiki/Special:Code/MediaWiki/115778
Revision: 115778
Author: krinkle
Date: 2012-10-31 03:00:54 +0000 (Wed, 31 Oct 2012)
Log Message:
-----------
Cosmetics
Modified Paths:
--------------
trunk/tools/ToolserverI18N/TsIntuition.php
Modified: trunk/tools/ToolserverI18N/TsIntuition.php
===================================================================
--- trunk/tools/ToolserverI18N/TsIntuition.php 2012-10-30 11:55:44 UTC (rev
115777)
+++ trunk/tools/ToolserverI18N/TsIntuition.php 2012-10-31 03:00:54 UTC (rev
115778)
@@ -1271,7 +1271,7 @@
$acceptableLanguages =
TsIntuitionUtil::GetAcceptableLanguages();
foreach ( $acceptableLanguages as $acceptLang => $qVal
) {
- if ( $acceptLang == '*' ) {
+ if ( $acceptLang === '*' ) {
/**
* We pick the first available language
which is not in $acceptableLanguages.
@@ -1280,10 +1280,9 @@
* or be missing from
availableLanguages.
* The order will be the one in the
i18n file: en, af, ar...
*/
-
foreach ( $this->availableLanguages as
$availableLang => $true ) {
if ( !isset(
$acceptableLanguages[$availableLang] ) ) {
- $n = strchr(
$availableLang, '-' );
+ $n = strstr(
$availableLang, '-' );
// Assumption: We won't
have translations for languages with several dashes on its language tag
if ( $n !== false &&
!isset( $acceptableLanguages[ substr( $availableLang, 0, $n - 1 ) ] ) ) {
// zh-hans
should not be picked for "fr,*;q=0.3,zh;q=0.1" if we have non-Chinese
translations.
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits