Skip to content

Commit

Permalink
chore: Drop intl-pluralrules as unnecessary in modern environments
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Feb 28, 2024
1 parent 82cade5 commit af921d4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 21 deletions.
11 changes: 1 addition & 10 deletions fluent-bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,8 @@ The API reference is available at https://projectfluent.org/fluent.js/bundle.

- `Intl.DateTimeFormat` (standard, well-supported)
- `Intl.NumberFormat` (standard, well-supported)
- `Intl.PluralRules` (standard, new in ECMAScript 2018)

`Intl.PluralRules` may already be available in some engines. In most cases,
however, a polyfill will be required. We recommend [intl-pluralrules][].

```javascript
import "intl-pluralrules";
import { FluentBundle } from "@fluent/bundle";
```
- `Intl.PluralRules` (standard, well-supported)

See also the [Compatibility][] article on the `fluent.js` wiki.

[intl-pluralrules]: https://www.npmjs.com/package/intl-pluralrules
[compatibility]: https://github.com/projectfluent/fluent.js/wiki/Compatibility
2 changes: 1 addition & 1 deletion fluent-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ maximum flexibility, `@fluent/react` expects the developer to write a little
bit of a setup code related to language negotiation and translation fetching.
It makes `@fluent/react` unopinionated and suitable for many different
scenarios. You will likely also need to install a few other packages:
`@fluent/bundle`, `@fluent/langneg` and `intl-pluralrules`.
`@fluent/bundle` and `@fluent/langneg`.

Consult the [wiki][] for documentation on how to set up and use
`@fluent/react`.
Expand Down
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"esm": "^3.2.22",
"fuzzer": "^0.2.1",
"gh-pages": "^6.1.1",
"intl-pluralrules": "^1.0.0",
"mocha": "^10.2.0",
"prettier": "^3.2.5",
"prettyjson": "^1.2.1",
Expand Down
1 change: 0 additions & 1 deletion tools/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const fs = require("fs");
const program = require("commander");

require = require("esm")(module);
require("intl-pluralrules");
const Fluent = require("../fluent-bundle/esm/index.js");

program
Expand Down
1 change: 0 additions & 1 deletion tools/perf/benchmark.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const fs = require("fs");
const FluentBundle = require("../../fluent-bundle/index.js");
const FluentSyntax = require("../../fluent-syntax/index.js");
const { runTest } = require("./benchmark.common");
require("intl-pluralrules");

const env = {
readFile: path => {
Expand Down

0 comments on commit af921d4

Please sign in to comment.