9 protected function setUp() {
12 'wgExtensionMessagesFiles' => [],
23 ->setConstructorArgs( [ [
'store' =>
'detect' ] ] )
24 ->setMethods( [
'getMessagesDirs' ] )
26 $lc->expects( $this->
any() )->method(
'getMessagesDirs' )
28 [
"$IP/tests/phpunit/data/localisationcache" ]
38 $cache->getItem(
'ar',
'pluralRules' ),
39 $cache->getItem(
'arz',
'pluralRules' ),
40 'arz plural rules (undefined) fallback to ar (defined)'
44 $cache->getItem(
'ar',
'compiledPluralRules' ),
45 $cache->getItem(
'arz',
'compiledPluralRules' ),
46 'arz compiled plural rules (undefined) fallback to ar (defined)'
50 $cache->getItem(
'ksh',
'pluralRules' ),
51 $cache->getItem(
'de',
'pluralRules' ),
52 'ksh plural rules (defined) dont fallback to de (defined)'
56 $cache->getItem(
'ksh',
'compiledPluralRules' ),
57 $cache->getItem(
'de',
'compiledPluralRules' ),
58 'ksh compiled plural rules (defined) dont fallback to de (defined)'
71 $lc->getItem(
'ba',
'messages' ),
72 'Fallbacks are only used to fill missing data'
80 'LocalisationCacheRecacheFallback' => [
86 if (
$code ===
'ru' ) {
87 $cache[
'messages'][
'present-ba'] =
'ru-override';
88 $cache[
'messages'][
'present-ru'] =
'ru-override';
89 $cache[
'messages'][
'present-en'] =
'ru-override';
100 'present-ru' =>
'ru-override',
101 'present-en' =>
'ru-override',
103 $lc->
getItem(
'ba',
'messages' ),
104 'Updates provided by hooks follow the normal fallback order.'
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
they could even be mouse clicks or menu items whatever suits your program You should also get your if any
Database Cache LocalisationCache.
getMockLocalisationCache()
testRecacheFallbacksWithHooks()
Class for caching the contents of localisation files, Messages*.php and *.i18n.php.
recache( $code)
Load localisation data for a given language for both core and extensions and save it to the persisten...
getItem( $code, $key)
Get a cache item.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not it can be in the form of< username >< more info > e g for bot passwords intended to be added to log contexts Fields it might only if the login was with a bot password it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))