Commit graph

23 commits

Author SHA1 Message Date
Siebrand Mazeland
03b2b42084 Make languages/classes pass phpcs-strict
Change-Id: I0985f3c7e4b36338c68a4a63cfba4eaa4af567c0
2014-04-22 14:13:02 +02:00
umherirrender
55e8a9abfd Fixed some @params documentation (languages)
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
2014-04-17 13:32:54 +00:00
Santhosh Thottingal
1441f511a2 Update plural rules to CLDR 24
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: e571717e06

Bug: 56931
Change-Id: I9930b290d004667a3bb09e5c1663ec2c9c27d8a6
2014-01-03 11:53:10 +05:30
Pavel Selitskas
81fc875c0b Handle explicit plural forms in custom convertPlural in language classes
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
2013-12-03 12:50:02 +00:00
umherirrender
3c7bcf4658 Fixed spacing in languages folder
Added spaces before if
Added some braces for one line statements

Change-Id: I980771894369499646532b13b801db6447381773
2013-04-17 21:10:02 +02:00
Alexandre Emsenhuber
a9d92e0960 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I162f57c994765189681ac3fb30f889e648c6c6a1
2012-06-10 19:40:03 +02:00
Amir E. Aharoni
8c5c8d1b8f Follow up to r109021, corrected the comment, and added a translation from Russian. 2012-01-16 10:45:01 +00:00
Amir E. Aharoni
3af279116e Improved the comment about the two-forms plural shortcut. 2012-01-16 09:46:56 +00:00
Sam Reed
b6b807b2bc More documentation! 2011-05-29 16:32:05 +00:00
Sam Reed
6869bd5893 More documentation! 2011-05-29 15:59:47 +00:00
Sam Reed
117fb34efc Some language love 2011-05-29 15:21:03 +00:00
Platonides
82fb370dfc Changes to doc-comments. /* to /** in language folder. 2011-05-22 22:05:18 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Alexandre Emsenhuber
954ef59e62 * (bug 24804) Corrected commafying in Polish and Ukrainian 2010-08-21 14:57:08 +00:00
Sam Reed
e476b51e3a Stylize languages/*, languages/classes/*, but not languages/messages/* 2010-07-29 09:43:18 +00:00
Siebrand Mazeland
62546832cc Update plural forms per http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html. Complete per Date: 2009/05/12 11:24:52 for languages currently supported in MediaWiki.
Added FIXME where CLDR definition is different from MediaWiki's.
2009-10-02 18:30:23 +00:00
Niklas Laxström
01c4f7905d * Update plural for uk 2008-05-23 17:40:06 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Siebrand Mazeland
555019a2c6 remove EOL whitespace, and excess empty lines 2008-05-17 17:10:18 +00:00
Alexandre Emsenhuber
675a2245dd Doc cleanup:
* Remove deprecated "@package MediaWiki" from comments
* Kill ending ?> tag in AdminSettings.sample
* remove uneeded comment in SpecialPage.php
* update some links to docs/skin.txt instead of skin.txt
2008-03-18 16:56:52 +00:00
Niklas Laxström
6d97bfde47 * Reworked convertPlural so that it accepts variable number of arguments nicely
* Should also fix bug 11991
2007-11-18 20:15:49 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Raimond Spekking
c6208e5d82 * (bug 9130) Update Ukrainian messages
patches by Gutsul
2007-02-28 21:19:50 +00:00