Skip to content

Bug: pluralize utility does not respect enableFallback: true options #99

@eugenet8k

Description

@eugenet8k

Description

A follow up to #39.

How to reproduce

    i18n = new I18n({
      enableFallback: true,
      en: {
        labels: {
          name: 'Name',
          total: {one: '%{count} name', other: '%{count} names'},
        },
      },
      ru: {
        labels: {
          name: 'Имя',
          total: {one: undefined, other: undefined},
        },
      },
    })

What do you expect

> i18n.t('labels.total', {count: 5, locale: 'ru'})

5 names

What happened instead

> i18n.t('labels.total', {count: 5, locale: 'ru'})

[missing "ru.labels.total.other" translation]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions