Skip to content

Commit

Permalink
Modify package.json and README for new package
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Jan 14, 2021
1 parent 92688de commit b61d9a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# banana-i18n - Javascript Internationalization library
# orange-i18n - Javascript Internationalization library

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wikimedia/orange-i18n/blob/master/LICENSE)
[![npm version](https://img.shields.io/npm/v/orange-i18n.svg?style=flat)](https://www.npmjs.com/package/orange-i18n)

Orange-i18n is a fork of [**banana-i18n**](https://www.npmjs.com/package/banana-i18n) intended for use in gadgets on Wikimedia sites.

PATCHES:
1. Replaced use of `Intl.PluralRules` with `mw.libs.pluralruleparser` and a pluralrules.json data file
- `Intl.PluralRules` is not supported in IE 11 and Safari <13, for which MediaWiki still provides Grade A support.
- 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))

Originally created for [Twinkle](https://github.com/wikimedia-gadgets/twinkle-core) by @siddharthvp (SD0001).

[![Build Status](https://secure.travis-ci.org/wikimedia/banana-i18n.png)](http://travis-ci.org/wikimedia/banana-i18n)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wikimedia/banana-18n/blob/master/LICENSE)
[![npm version](https://img.shields.io/npm/v/banana-i18n.svg?style=flat)](https://www.npmjs.com/package/banana-i18n)
The original README of banana-i18n follows below this line.

----

# banana-i18n - Javascript Internationalization library

banana-i18n is a javascript internationalization library that uses "banana" format - A JSON based localization file format.

Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "banana-i18n",
"version": "2.0.0",
"name": "orange-i18n",
"version": "1.0.0",
"description": "Banana Internationalization library",
"main": "dist/banana-i18n.js",
"type": "module",
Expand All @@ -14,13 +14,9 @@
"i18n",
"l10n"
],
"author": {
"name": "Santhosh Thottingal",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "git+https://github.com/wikimedia/banana-i18n.git"
"url": "git+https://github.com/wikimedia-gadgets/orange-i18n.git"
},
"license": "MIT",
"devDependencies": {
Expand Down

0 comments on commit b61d9a7

Please sign in to comment.