Skip to content

Parser not using default-namespace when multiple-namespaces are provided #5

@hschmied

Description

@hschmied

The following scenario the parsing-process correctly creates 3 keys in the localization namespace file ...

  const {t, i18n} = useTranslation('localization', {useSuspense: true});
  ...
  <Text>{t('localization:test_dragonfruit')}</Text>
  <Text>{t('localization:test_elderberries')}</Text>
  <Text>{t('test_fig')}</Text>

In this scenario, though, the last key is not written into the localization namespace, but a separate one (translation.json) ...

  const {t, i18n} = useTranslation(['localization', 'app', 'common'], {useSuspense: true});
  ...
  <Text>{t('localization:test_dragonfruit')}</Text>
  <Text>{t('localization:test_elderberries')}</Text>
  <Text>{t('test_fig')}</Text>

Expected behavior: when multiple namespaces are provided, ideally the parser identifies the first namespace as default and writes the key into the corresponding file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions