User "Krinkle" posted a comment on MediaWiki.r102205.
Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/102205#c25620
Commit summary:
[TsIntuition] Minor fixes in acceptableLanguages()
* Adding an example of the static utility function to demo/demo6
* Moving the function out of the TsIntuition class into TsIntuitionUtil where
the other static utility functions are, renaming to getAcceptableLanguages
* Improving documentation/variable naming a little bit
* Whitespace / curly braces fixes
* Although I'm not 100% sure about this, I've added a FIXME about the q-val
defaulting to 1. It needs a look-ahead technique to be more solid, right now
low-level accept-languages are getting too high. Example:
-- code
getAcceptableLanguages: ( 'nl-be,nl;q=0.7,en-us,en;q=0.3' ):
array(4) {
["nl-be"]=>
string(1) "1" // should be 0.7
["en-us"]=>
string(1) "1" // should be 0.3
["nl"]=>
string(3) "0.7"
["en"]=>
string(3) "0.3"
}
-- /code
See demo6 for more this in action
* Follows-up r100234
Comment:
<pre>
+ // @FIXME: In case "nl-be,nl;q=0.7,en-us,en;q=0.3",
"en" gets defaulted to '1',
</pre>
should be
<pre>
// @FIXME: In case "nl-be,nl;q=0.7,en-us,en;q=0.3",
"en-us" gets defaulted to '1',
</pre>
That was a typo
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview