Skip to content

Commit

Permalink
fix: number format keys missing compared the Intl.Number object (#1048)
Browse files Browse the repository at this point in the history
* fix: number format keys missing compared the Intl.Number object

* fix: chromedriver version
  • Loading branch information
jevillard committed Nov 18, 2020
1 parent 6ace404 commit 3970a7a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 19 deletions.
12 changes: 9 additions & 3 deletions gitbook/en/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,23 @@
If the second `key` argument specified as an object, it should have the following properties:
- `key {Path}`: optional, number format
- `locale {Locale}`: optional, locale
- `style {string}`: optional, number format option
- `compactDisplay {string}`: optional, number format option
- `currency {string}`: optional, number format option
- `currencyDisplay {string}`: optional, number format option
- `currencySign {string}`: optional, number format option
- `localeMatcher {string}`: optional, number format option
- `notation {string}`: optional, number format option
- `numberingSystem {string}`: optional, number format option
- `signDisplay {string}`: optional, number format option
- `style {string}`: optional, number format option
- `unit {string}`: optional, number format option
- `unitDisplay {string}`: optional, number format option
- `useGrouping {string}`: optional, number format option
- `minimumIntegerDigits {string}`: optional, number format option
- `minimumFractionDigits {string}`: optional, number format option
- `maximumFractionDigits {string}`: optional, number format option
- `minimumSignificantDigits {string}`: optional, number format option
- `maximumSignificantDigits {string}`: optional, number format option
- `localeMatcher {string}`: optional, number format option
- `formatMatcher {string}`: optional, number format option

Any specified number format options will have priority over `numberFormats` of `VueI18n` constructor.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"babel-plugin-istanbul": "^6.0.0",
"babel-preset-power-assert": "^3.0.0",
"buble": "^0.19.3",
"chromedriver": "^85.0.0",
"chromedriver": "^87.0.0",
"core-js": "^3.6.5",
"cross-env": "^7.0.2",
"cross-spawn": "^7.0.3",
Expand Down
15 changes: 10 additions & 5 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@
*/

export const numberFormatKeys = [
'style',
'compactDisplay',
'currency',
'currencyDisplay',
'currencySign',
'localeMatcher',
'notation',
'numberingSystem',
'signDisplay',
'style',
'unit',
'unitDisplay',
'useGrouping',
'minimumIntegerDigits',
'minimumFractionDigits',
'maximumFractionDigits',
'minimumSignificantDigits',
'maximumSignificantDigits',
'localeMatcher',
'formatMatcher',
'unit'
'maximumSignificantDigits'
]

/**
Expand Down
12 changes: 9 additions & 3 deletions vuepress/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,23 @@ If the second `format` argument specified as an object, it should have the follo

* `key {Path}`: optional, number format
* `locale {Locale}`: optional, locale
* `style {string}`: optional, number format option
* `compactDisplay {string}`: optional, number format option
* `currency {string}`: optional, number format option
* `currencyDisplay {string}`: optional, number format option
* `currencySign {string}`: optional, number format option
* `localeMatcher {string}`: optional, number format option
* `notation {string}`: optional, number format option
* `numberingSystem {string}`: optional, number format option
* `signDisplay {string}`: optional, number format option
* `style {string}`: optional, number format option
* `unit {string}`: optional, number format option
* `unitDisplay {string}`: optional, number format option
* `useGrouping {string}`: optional, number format option
* `minimumIntegerDigits {string}`: optional, number format option
* `minimumFractionDigits {string}`: optional, number format option
* `maximumFractionDigits {string}`: optional, number format option
* `minimumSignificantDigits {string}`: optional, number format option
* `maximumSignificantDigits {string}`: optional, number format option
* `localeMatcher {string}`: optional, number format option
* `formatMatcher {string}`: optional, number format option

Any specified number format options will have priority over `numberFormats` of `VueI18n` constructor.

Expand Down
12 changes: 9 additions & 3 deletions vuepress/ru/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,23 @@ sidebar: auto

- `key {Path}`: опционально, форматируемое число
- `locale {Locale}`: опционально, локализация
- `style {string}`: опционально, опция форматирования чисел
- `compactDisplay {string}`: опционально, опция форматирования чисел
- `currency {string}`: опционально, опция форматирования чисел
- `currencyDisplay {string}`: опционально, опция форматирования чисел
- `currencySign {string}`: опционально, опция форматирования чисел
- `localeMatcher {string}`: опционально, опция форматирования чисел
- `notation {string}`: опционально, опция форматирования чисел
- `numberingSystem {string}`: опционально, опция форматирования чисел
- `signDisplay {string}`: опционально, опция форматирования чисел
- `style {string}`: опционально, опция форматирования чисел
- `unit {string}`: опционально, опция форматирования чисел
- `unitDisplay {string}`: опционально, опция форматирования чисел
- `useGrouping {string}`: опционально, опция форматирования чисел
- `minimumIntegerDigits {string}`: опционально, опция форматирования чисел
- `minimumFractionDigits {string}`: опционально, опция форматирования чисел
- `maximumFractionDigits {string}`: опционально, опция форматирования чисел
- `minimumSignificantDigits {string}`: опционально, опция форматирования чисел
- `maximumSignificantDigits {string}`: опционально, опция форматирования чисел
- `localeMatcher {string}`: опционально, опция форматирования чисел
- `formatMatcher {string}`: опционально, опция форматирования чисел

Любые указанные опции форматирования числа будут иметь приоритет над значениями `numberFormats` из конструктора `VueI18n`.

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3049,10 +3049,10 @@ chrome-trace-event@^1.0.2:
dependencies:
tslib "^1.9.0"

chromedriver@^85.0.0:
version "85.0.1"
resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-85.0.1.tgz#2e1b571845253368fcd112108f23eb9c778f7982"
integrity sha512-z8je3U4tXFZnx7AloRabM4Ep1lpFJvHxLoGuRvLg33Qy0UKk/z6OXmHUO2z6DKE0Oe6CFpjj/bdhuQ8dfvq9ug==
chromedriver@^87.0.0:
version "87.0.0"
resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-87.0.0.tgz#e8390deed8ada791719a67ad6bf1116614f1ba2d"
integrity sha512-PY7FnHOQKfH0oPfSdhpLx5nEy5g4dGYySf2C/WZGkAaCaldYH8/3lPPucZ8MlOCi4bCSGoKoCUTeG6+wYWavvw==
dependencies:
"@testim/chrome-version" "^1.0.7"
axios "^0.19.2"
Expand Down

0 comments on commit 3970a7a

Please sign in to comment.