Page MenuHomePhabricator

Add support for {{GRAMMAR:}} to the mediawiki.jqueryMsg module
Closed, ResolvedPublic

Description

Add support for grammar in js message parsing

jqueryMsg parser does not support GRAMMAR and language specific grammar rules are not available at javascript.

Atached patch tries to resolve this:

  1. make jqueryMsg understand GRAMMAR. Depend on the patch at Bug 33653
  2. Make SITENAME with value mw.config.get( 'wgSiteName' ) available in parser without the need of module users explicitly adding it.
  3. mw.language get convertGrammar, can be overridden per language as in php
  4. Make global variable wgGrammarForms available at js by adding to ResourceLoader default variables.
  5. Language.php get a method to filter wgGrammerForms for the current contentLanguage.
  6. Qunit tests

Not committing the code now, because core code is in 'slush'


Version: 1.18.x
Severity: normal

Attached:

Details

Reference
bz33658

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:07 AM
bzimport set Reference to bz33658.

Extra keyword won't hurt :).

Typo: noders. New methods should have @since tag. Patch is reviewed.

In r111627 I created a branch for this. We can put the basic implementation in there, and it will also contain a JavaScript implementation of the existing grammar classes and QUnit tests for them.

Once we've worked everything out, have it coded and reviewed, we can merge the branch into trunk.