Skip to content

Commit

Permalink
tweak readme
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Feb 27, 2021
1 parent eb30043 commit 01197a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ PATCHES:
- The JSON data file is from version 1.2 of banana-i18n which used it along with the [cldrpluralruleparser](https://www.npmjs.com/package/cldrpluralruleparser) npm package. cldrpluralruleparser is equivalent to mediawiki.libs.pluralruleparser. The former is kept as a dev dependency for mocking the latter in tests.
2. Added support for `{{formatnum:}}` operation - this converts the default [Arabic numerals](https://en.wikipedia.org/wiki/Arabic_numerals) to locale-specific numerals
- The data for numerals was already present in the repo. Code for formatnum parsing is copied from mediawiki.jqueryMsg, in which this functionality is present. ([Link](https://github.com/wikimedia/mediawiki/blob/8dbcddb333435b2deb7975632ebdead29b25dd83/resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js#L1445))
3. Added support for the [mw.language.listToText](https://doc.wikimedia.org/mediawiki-core/master/js/source/mediawiki.language.html#mw-language-method-listToText) functionality (['a', 'b', 'c'] --> "a, b and c" in a language-agnostic way). This feature is available with the custom builds (see below) only.
3. Added support for `{{list:}}` operation which provides [mw.language.listToText](https://doc.wikimedia.org/mediawiki-core/master/js/source/mediawiki.language.html#mw-language-method-listToText) functionality (['a', 'b', 'c'] —> "a, b and c" in a language-agnostic way). This feature is available with the custom builds (see below) only.
- This needs the knowledge of how different languages separate words – this can be done using the MediaWiki i18n messages `word-separator`, `comma-separator` and `and` which we fetch using the MediaWiki API at the build step.
4. Added TypeScript type definitions.

Run `npm run build` for a full build.
Expand Down

0 comments on commit 01197a3

Please sign in to comment.