37 'sr-ec' => Language::factory(
'sr-ec' ),
38 'sr-cyrl' => Language::factory(
'sr-cyrl' ),
40 foreach ( $langs as
$code => $l ) {
41 $p = $l->getParentLanguage();
42 $this->
assertTrue( $p !==
null,
'parent language exists' );
43 $this->
assertEquals(
'sr', $p->getCode(),
'sr is parent language' );
46 $this->
assertTrue( $p->hasVariant( $l->getCode() ) );
49 $this->
assertTrue( $l->hasVariant(
'sr-ec' ),
'sr-ec exists' );
51 foreach ( [
'sr-EC',
'sr-Cyrl',
'sr-cyrl',
'sr-bogus' ] as $v ) {
52 $this->
assertFalse( $l->hasVariant( $v ),
"$v is not a variant of $code" );
64 'sr-EC' => Language::factory(
'sr-EC' ),
65 'sr-Cyrl' => Language::factory(
'sr-Cyrl' ),
66 'sr-bogus' => Language::factory(
'sr-bogus' ),
68 foreach ( $langs as
$code => $l ) {
69 $p = $l->getParentLanguage();
70 $this->
assertTrue( $p ===
null,
'no parent for bogus language' );
73 foreach ( [
'sr',
'sr-ec',
'sr-EC',
'sr-Cyrl',
'sr-cyrl',
'sr-bogus' ] as $v ) {
75 $this->
assertFalse( $l->hasVariant( $v ),
"no variant $v" );
87 'Cyrillic guessing characters'
91 'Latin guessing characters'
100 'шђчћжШЂЧЋЖ - šđčćž',
101 'Mostly Cyrillic characters'
104 'šđč枊ĐČĆŽ - шђчћж',
105 'Mostly Latin characters'
114 '4 Latin: šđčć | 4 Cyrillic: шђчћ',
118 '4 Latin: šđčć | 4 Cyrillic: шђчћ',
193 $forms = [
'one',
'few',
'other' ];
226 $forms = [
'one',
'other' ];
240 # #### HELPERS #####################################################
303 return $this->
convertTo( $text,
'sr-ec' );
307 return $this->
convertTo( $text,
'sr-el' );
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
Helping class to run tests using a clean language instance.
testPlural( $result, $value)
providePlural Language::convertPlural
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
assertConverted( $text, $variant, $msg='')
Wrapper to verify a text is different once converted to a variant.
static providePluralTwoForms()
testHasVariantBogus()
Language::hasVariant.
testEasyConversions()
LanguageConverter::convertTo.
assertCyrillic( $text, $msg='')
Verifiy the given Cyrillic text is not converted when using using the Cyrillic variant and converted ...
convertToCyrillic( $text)
testConversionToCyrillic()
assertUnConverted( $text, $variant, $msg='')
Wrapper to verify text stay the same after applying conversion.
testMixedConversions()
LanguageConverter::convertTo.
convertTo( $text, $variant)
Wrapper for converter::convertTo() method.
assertLatin( $text, $msg='')
Verifiy the given Latin text is not converted when using using the Latin variant and converted to Cyr...
testConversionToLatin()
LanguageConverter::convertTo.
testHasVariants()
Language::hasVariants.
testHasVariant()
Language::hasVariant.
testPluralTwoForms( $result, $value)
providePluralTwoForms Language::convertPlural
testSameAmountOfLatinAndCyrillicGetConverted()
LanguageConverter::convertTo.
Serbian (Српски / Srpski)
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