Skip to content

Commit

Permalink
fix(cli): Use proper full locale list for --no-cardinals
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Sep 2, 2019
1 parent 743f06a commit c8a1cff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/cli/src/print-plurals.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import printUMD from './print-umd'

export default function printPluralsModule(args) {
const MakePlural = getCompiler(args)
const { locale, maxRepeat, umd } = args
const { cardinals, locale, maxRepeat, umd } = args
const locales =
locale.length === 0 ? Object.keys(MakePlural.rules.cardinal) : locale.sort()
locale.length === 0
? Object.keys(MakePlural.rules[cardinals ? 'cardinal' : 'ordinal'])
: locale.sort()

const localesByFn = {}
for (const lc of locales) {
Expand Down

0 comments on commit c8a1cff

Please sign in to comment.