aboutsummaryrefslogtreecommitdiffstats
path: root/languages/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* | Typo fixes and non-code tweaksRicordisamoa2014-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Skipped replacements: * prefered → preferred * prolly → probably Skipped files: * resources/lib/jquery.ui/jquery.ui.mouse.js * resources/lib/jquery/jquery.form.js Change-Id: Ib7923f362ddfca1b892bf5d601785d6b5aa5d44c
* | Don't fiddle with $wgLanguageCode in KkConverterThis, that and the other2014-11-111-5/+0
| | | | | | | | | | | | | | | | This was causing problems with the setlang= and uselang= parameters in the URL being ignored on kkwiki. Bug: 64440 Change-Id: I4e2a20c707fd4b9b8a581a9d14e04b6cfc8b4b5c
* | Cleanup some docs (languages)umherirrender2014-08-096-11/+11
|/ | | | | | | - Makes beginning of @param in capital - Removed return void Change-Id: Ie05436c1ef886cb23c62ccde95384f253f83694c
* Remove $wgTitle from LanguageConverter subclasseswithoutaname2014-07-235-100/+0
| | | | | | | | | | $wgTitle was simply used in these classes to prevent conversion of prefixed names for files. Now that we have $wgNamespaceAliases that is rendered moot, so this will instead return just the parent class call for autoconvert(). Bug: 57562 Change-Id: I26f8a8aa0be3822056f286f2e15201cbe4d592bf
* Add grammar forms for RussianAmir E. Aharoni2014-07-041-0/+4
| | | | | | This adds support for the Russian name of Wikimedia Commons. Change-Id: If531e9ff8f46ac5294b117eec43172b4975e2ad6
* Make languages/classes pass phpcs-strictSiebrand Mazeland2014-04-2219-87/+153
| | | | Change-Id: I0985f3c7e4b36338c68a4a63cfba4eaa4af567c0
* Fixed some @params documentation (languages)umherirrender2014-04-1743-174/+174
| | | | | | | | Swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Change-Id: I7a4dec6a8de96ee21ef34e52bb755f723aa3b0e6
* Removed unneeded spaces and colons in @param and friendsumherirrender2014-04-081-3/+3
| | | | | | | | Also swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Change-Id: Ic36c8c7820a6c2d603f1138130670c6bf6a1ca59
* Fixed spacingumherirrender2014-03-201-1/+1
| | | | | | | | - Added spaces after if/foreach/catch - Added new line before end of file - Added or removed spaces before/after parenthesis, comma - Added spaces around string concat Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f
* Shorter lines in LanguageUz.php commentsrobin2014-03-091-2/+6
| | | | | | Follows up gerrit change 116914 Change-Id: I75215416277eb8f5d9e16a1bf91637c673be0a48
* Fix Uzbek converterrobin2014-03-051-3/+12
| | | | | | | | | | Improve the Latin to Cyrillic conversion of "e" per https://meta.wikimedia.org/w/index.php?title=User_talk:SPQRobin&oldid=7720901#Request The code of this change is inspired on LanguageKk.php As far as I tested, it works as intended Change-Id: I20f293c8d1f753af7b5344543ec2ce459edcba0c
* Update Russian(ru) plural rules to CLDR 24Santhosh Thottingal2014-01-031-58/+3
| | | | | | | | | | | | | | Russian (ru) plural rules have a major change. The 'few' form is merged with the 'other' form. The current forms are 'one', 'many', 'other'. In MW ru plural rules were overridden using convertPlural methdod in LanguagesRu.php with 3 forms. Effectively forms[1] and forms[2] are swapped. Followup: I9930b290d004667a3bb09e5c1663ec2c9c27d8a6 Bug: 56931 Change-Id: Ia5779e42315d3f41f52dce2bfffaee0a4297d23b
* Update plural rules to CLDR 24Santhosh Thottingal2014-01-036-308/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated plurals.xml with new data from CLDR 24. This data is according to UTS #35 Rev 33. Update the CLDRPluralRuleParser.js to version 1.1 from upstream https://github.com/santhoshtr/CLDRPluralRuleParser Changes to the plural rules: * Hebrew override removed since CLDR 24 matches with MW plural rules. * Updated the syntax of overridden rules to TR35 Rev 33 for Lower Sorbian (dsb), Upper Sorbian (hsb), Belarusian in Taraskievica orthography (be_tarask), Old Church Slavonic (cu), Bhojpuri (bho), Samogitian (sgs). * Removed Manx (gv) override. See I46ab3dadc7fe08c1e60bbd81a1ee841e166e9608. * Removed the overriden convertPlural method for Serbian from LanguageSr.php, since CLDR 24 matches with MW rules. Updated and added more tests. Tests updated for Serbocroatian (sh), too. Old CLDR versions had 4 plural rules and MW had only 3. In CLDR 24, the form 'many' was removed and it became identical to the MW. Same for Bosnian (bs) and Croatian (hr). Also for variants sr-ec and sr-el * Macedonian (mk) used to count 11 as 'other' form. CLDR 24 counts it as 'one'. Not overriding, using CLDR 24 here. Updated the tests. MW will not override this. * Armenian (hy) used to count 0 as 'other'. Now it is 'one' form. Updated the tests. MW will not override this. * Latvian (lv) used to count only 0 as 'zero' form, but CLDR 24, any number satisifying the following formula is counted as zero: n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19 Examples: 0, 10~20, 30, 40, 50, 60, 100. Updated the tests accordingly. Not overriding it in MW. Users will see different plural form for the above numbers. * Removed Ukranian custom plural rule since it match with MW * Russian (ru) plural rules have a major change. The 'few' form is merged with the 'other' form. The current forms are 'one', 'many', 'other'. In MW ru plural rules were overridden using convertPlural methdod in LanguagesRu.php with 3 forms. Effectively forms[1] and forms[2] are swapped. This will affect the messages, and such messages must be reviewed and updated. This change is not included in this patch and wil be done separately. Russian is the only remaining language class with convertPlural method overridden. Notable impact on the exising messages: * For languages ru, uk, be_tarask, sr, For the special case of two plural forms and first mapped to 1 and rest to the other form, syntax like {{plural:$1|1=one|other}} should be used. For further information regarding each of the above language changes, see 1. http://unicode.org/cldr/trac/ticket/3727 2. http://goo.gl/H2HEz CLDR 24 can handle fractions. Ideally it should start working in MW without any code changes, but MW language test suite does not have enough tests to confirm. Followup: e571717e06667228ec8d689be067e00bdd06d34d Bug: 56931 Change-Id: I9930b290d004667a3bb09e5c1663ec2c9c27d8a6
* Merge "Correct the plural forms for Manx (Gaelg)"jenkins-bot2013-12-171-59/+0
|\
| * Correct the plural forms for Manx (Gaelg)Santhosh Thottingal2013-12-111-59/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported the plural rules from CLDR 24 as an override to CLDR 23 rules exising in MediaWiki. The syntax for plural rules changed in CLDR 24, so modified the syntax to fit the CLDR 23 syntax Once we are ready with the updated parsers for CLDR 24(See bug 56931), we should remove the override. Since we remove the custom plural forms in MW in favor of CLDR, the following changes comes into effect: 1. 'few' form used as 'zero' form in MW. Practially that make 'one' form used as 'two' form and 'two' used as 'few' form. This breaks existing gv {{PURAL}} usage as dicussed in the bug report 2. CLDR defines 'few' form as n % 100 = 0,20,40,60 but MW adds 80 also to that list, ie n % 100 = 0,20,40,60, 80. So with this patch, 80 is no longer considered as 'few' plural form. Bug: 47099 Change-Id: I46ab3dadc7fe08c1e60bbd81a1ee841e166e9608
* | Fixed spacingumherirrender2013-12-152-54/+54
|/ | | | | | | | - Removed double spaces in arrays - Added space after for - Added spaces around string concat Change-Id: Ifbcaf35f9bfef1f97226a38b5bd74c237f61c99e
* Make explicit plural forms work for RussianSanthosh Thottingal2013-12-041-0/+4
| | | | | | | | | | Russian has overridden convertPlural method, that was not taking care of explicit plural forms. Follow up: I2a9f93567087babb896999f1214d3c56afc67c96 Bug: 54514 Change-Id: Ia977fa544b1d0e40222c7296b7145dcd6f93ecc2
* Handle explicit plural forms in custom convertPlural in language classesPavel Selitskas2013-12-038-0/+32
| | | | | | | | | | | | A new protected method looks for explicitly defined forms. Every overriden language class is required to use this method. Includes tests. Redoing old patch I6dc759e3dfb05d6673209ba00da6592a384d5300 Bug: 46422 Change-Id: I2a9f93567087babb896999f1214d3c56afc67c96
* Fixed spacingumherirrender2013-12-012-2/+2
| | | | | | | | | | - Place commas correct - Moved comments - Add space after if/foreach/catch - Reformat some conditions - Removed trailing spaces/tabs Change-Id: I40ccda72c418c4a33fcd675773cb08d971510cdb
* Use lowercase key wordsumherirrender2013-11-232-4/+4
| | | Change-Id: I57569b7082a0decc8128ecadd8ec5d1a5c327673
* Fixed spacingumherirrender2013-11-213-3/+0
| | | | | | | | - Removed trailing spaces in comments - Removed multiple empty lines - Removed space after object operator Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2
* Merge "Remove convertPlural methods already served by CLDR plural system"jenkins-bot2013-10-0210-415/+0
|\
| * Remove convertPlural methods already served by CLDR plural systemSanthosh Thottingal2013-09-1110-415/+0
| | | | | | | | | | | | | | There are some more language classes with convertPlural methods, but they need some careful removal. Change-Id: Idbcb397f750fb463608de4396018dadb6fccc9a7
* | Remove LanguageEo::checkTitleEncoding()Kevin Israel2013-09-231-24/+0
|/ | | | | | | | | In 2005, the code to perform the conversion from the Esperanto x-system to Unicode was recognized as problematic and commented out (bug 1512, r10997). Hence this function has done nothing useful in the last eight years. Change-Id: I9f4351c638645024b17a828144bba8575db14195
* Merge "No spaces after (casts)"jenkins-bot2013-09-041-2/+2
|\
| * No spaces after (casts)MatmaRex2013-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | Also removed some unnecessary ones. I think I've caught them all. The spaceless version already appears in core ~300 times (after accounting for false positives when grepping). Some consistency would be nice. Change-Id: I607655b5f4366e66dc78730d5fd2f57ed8776cae
* | Add/update comments for grepshirayuki2013-08-311-0/+2
|/ | | | Change-Id: I6402a593872480cac4b76492957771529c1adeb8
* 4-digits numbers in Spanish should not have a group separatorNemo bis2013-07-281-0/+42
| | | | | Bug: 51157 Change-Id: I4fabf9569c38e5da7b20d70206445dd77a73b4a4
* phpcs: More require/include is not a functionTimo Tijhof2013-05-219-18/+18
| | | | | | | | | | | | | Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81. Also updated usage in text in documentation and the installer LocalSettingsGenerator. Most of them were handled by this regex: - find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$ - replace: $1 $2; Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
* Added space after switch/Removed spaces after unsetumherirrender2013-04-261-2/+2
| | | | | | While at it, added/removed some other spaces in the same files Change-Id: I84d8001aa123a008807ad5eb76f396aed7c899a4
* Fixed spacing in languages folderumherirrender2013-04-1735-302/+404
| | | | | | | Added spaces before if Added some braces for one line statements Change-Id: I980771894369499646532b13b801db6447381773
* Added spaces before and removed spaces after 'array'umherirrender2013-04-141-2/+2
| | | | | | Fix some other spacing while at it Change-Id: I13f81533eaf40e06c13cf377c0f08ef5cef01d00
* Added/Removed spaces around string concatenationumherirrender2013-04-133-12/+12
| | | | | | | | | And added/removed spaces around some other tokens, like +, -, *, /, <, >, =, ! Fixed windows newline style Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
* Get rid of preg_replace( '/.../e', ... )Kevin Israel2013-04-092-39/+2
| | | | | | | | | This is deprecated as of PHP 5.5, and the remaining uses are quite silly. Tim said I should remove his easter egg from Special:Version, as it already was broken, and a new one can be added in a separate commit. Change-Id: I0f09f4efc7afe5933c8317462026a475530a5324
* Fix case of some Title methodsAlexandre Emsenhuber2013-03-265-5/+5
| | | | Change-Id: I1a37ffb0e8cde4deac027721b0e463585b58d634
* Allow the retrieval of the plural rule type for a given numberKaldari2013-03-201-49/+0
| | | | | | | | | | For example, find out which rule type should be applied for 5 items in Arabic. The result would be 'few'. This implementation should be non-disruptive and completely backwards compatible (which is the main reason it isn't a lot simpler). Change-Id: I3d72e4105f6244b0695116940e62a2ddef66eb66
* Merge "Remove custom plurals for Nso and Sl in favour of CLDR"jenkins-bot2013-03-202-67/+0
|\
| * Remove custom plurals for Nso and Sl in favour of CLDRSanthosh Thottingal2013-03-202-67/+0
| | | | | | | | | | | | | | | | | | Nso - Northern Sotho Sl - Slovenian Plural rules were not changed. They are same in CLDR and MW Change-Id: I0e0c84352de2de8f58af5a9147ba18b0fe1fb39a
* | Remove spaces in function signatureumherirrender2013-03-184-7/+7
|/ | | | Change-Id: I45aea7a7af88cd913b2f485913620a8af0ab2fed
* Move plural rules of Samogitian(sgs) to plurals-mediawiki.xmlSanthosh Thottingal2013-03-181-52/+0
| | | | | | | | | | * CLDR does not define plural rules for sgs. * Port the plural rules present in LanguageSgs.php to CLDR plural definition syntax * Remove LanguageSgs.php * Update the tests, reorder/rename the plural form names Change-Id: I44658402d69a6805cdfd189fe780eadee94056c7
* Merge "Remove Lithuanian override of plural rules"jenkins-bot2013-03-041-56/+0
|\
| * Remove Lithuanian override of plural rulesSanthosh Thottingal2013-03-041-56/+0
| | | | | | | | | | | | Same rules defined in CLDR plural rules Change-Id: I2420720fe7dc42bb196bdd442839e41bf7b7c766
* | Remove custom Latvian(lv) language plural rulesSanthosh Thottingal2013-03-041-51/+0
|/ | | | | | CLDR is now in sync with MW plural rules. So no need of custom plural logic Change-Id: I399f99ddd40eea67e981d5710658ba635f115a31
* Update plural rules from CLDR, and correct Armenian plural rulesSanthosh Thottingal2013-02-141-13/+0
| | | | | | | | | * Upgrade to revision 8007, Contains minor change - Armenian(hy) is added * Remove MW custom plural logic from LanguageHy.php * Add qunit test case * Correct phpunit testcase Change-Id: If78436fa1597e6f3b7f050c5eede4521018904c0
* Russian grammar updatesAmir E. Aharoni2013-02-111-35/+60
| | | | | | | | | * Replace == with === * Add support for the prepositional case * Add support for Wikidata * Add tests Change-Id: Ic02bfb9ce88e93775036f3d15921cedca602237c
* (bug 44748) Load default variant tables before using themMarius Hoch2013-02-072-0/+2
| | | | Change-Id: I69c4348e66279763fccec77a68c47ebc87d33008
* Follow-up Idf308e82 (e88b0fb): use wfMessage() and numParams()Alexandre Emsenhuber2013-01-041-1/+1
| | | | | | So that it matches Language::formatDuration(). Change-Id: I7144640c93e95290600997d370a33d946897ef70
* Add LanguageZh_hans::formatDuration() for Chinese.Liangent2012-12-221-0/+27
| | | | Change-Id: Idf308e82887fc1d964e08b28904e026d0b2e4217
* Clean up Language::markNoConversion().Liangent2012-11-187-103/+0
| | | | | | | | | | | | | | | * IRIs are getting more and more widely used these days so Chinese characters are also needed to be prevented from being converted in text of external links. * So now all markNoConversion() functions in languages with variants do the same thing. Merge them into a single function in the Language class and drop implementations in individual languages. * By the way rephrase phpdoc of that function, and (bug 24798) fix the link detection regex to use wfUrlProtocolsWithoutProtRel(). Protocol-relative regex is excluded to avoid false positives. * Add parser test for it. Change-Id: I2ec0ac2b9b11221584adb72555168498de209d57
* Cleanup Hebrew grammar code a little.Amir E. Aharoni2012-11-111-6/+5
| | | | | | Added comments and changed == to ===. Change-Id: I3124bfd7341b1b3b46bb3e5215001d6967845f48