For now ResourceLoader will still internally deal with timestamps,
especially because they are easier to max() on the client side
(on the server we could make a hash of different hashes, on the
client that's a bit annoying).
However ResourceLoaderModule#getHashMtime will abstract the logic
we already use in ResourceLoaderLanguageDataModule and have
encouraged others to use, which is to put the timestamp and
hash in Memcached, and use that to observer the hash change and
update the timestamp when it does.
Updated ResourceLoaderLanguageDataModule to make use of this.
Change-Id: Ib051ef41ba239084671c30fd275b8d94099d5d52
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays
Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
* Use the plurals.xml of CLDR for the plural rules of languages
* Use plurals-mediawiki.xml to override or extend the rules inside MW
* Remove the convertPlural method in each LanguageXX.php
* Parse and load the xml files in LocalisationCache
* Use the CLDRPluralRuleEvaluator.php for parsing the cldr plural rules
(This is taken from Translate extension and might require a replacement
parser without using eval)
* Add getPluralRules() to make the CLDR plural rules available to JS.
PS3: More method documentation, cleanup
Change-Id: I58a9cdfe60c7b9027bf031c91370472054f04ae2
Use the new ResourceLoaderLanguageDataModule for passing the digit
transform table and digit separators (comma or dot) from the PHP
classes. And remove the duplicative javascript files so we no longer
have to maintain changes to MessagesXYZ.php and languages/xyz.js.
Change-Id: Icf63ebf927f993fe04518c4afe3a0b6959f5b1bd
* ResourceLoaderLanguageDataModule uses this but it looked
a bit like an error when looking at the function signature
of setData.
This is the power of mw.Map.
* Fixed indention as well.
* Added missing semi colon.
Change-Id: I1e9e8254862ae08e9a11e55dd42d7e851a56a3cc
* Previously mediawiki.language.data depended on mediawiki.language,
making any module using langauge data having to explicitly define
it as a dependency. This is not good. We should abstract the data
generation part and for the users of the module.
mediawiki.language should take care of having the required data.
* So, reversing the dependency so that mediawiki.language depends on
mediawiki.language.data. Then a simple dependency declaration with
"mediawiki.language" is enough to have associated data available.
This supersedes change set I810fb0a5
Change-Id: Iede836bb3e2fd700cb7c58caeebe9ec2e0043dfb
This add GRAMMAR support to the mediawiki.jqueryMsg module:
1. make jqueryMsg understand GRAMMAR(case insensitive)
2. mw.language get convertGrammar, can be overridden per language as in
php
3. Introduce resourceloader module ResourceLoaderLanguageDataModule
4. Language.php get a method to filter wgGrammerForms for the current
contentLanguage.
5. Qunit tests
6. This code was originally written in jsgrammar branch of svn and had
reviewed during the last slush time.
Change-Id: I90dd0b2f0cb30fd30539896c292829adc4fc7364