Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support keyPrefix option of useTranslation #485

Closed
incleaf opened this issue Dec 1, 2021 · 2 comments
Closed

Support keyPrefix option of useTranslation #485

incleaf opened this issue Dec 1, 2021 · 2 comments

Comments

@incleaf
Copy link
Contributor

incleaf commented Dec 1, 2021

馃殌 Feature Proposal

Input

function Component() {
  const { t } = useTranslation('foo', { keyPrefix: 'bar' })

  t('text1')
  t('text2')
}

Expected output

// foo.json
{
  "bar": {
    "text1": "",
    "text2": ""
  }
}

Actual output

// foo.json
{
  "text1": "",
  "text2": ""
}

Motivation

Currently keyPrefix option is not supported

@karellm
Copy link
Member

karellm commented Dec 1, 2021

You can make a PR and I will review it.

@karellm
Copy link
Member

karellm commented Apr 4, 2022

This is implemented in 6.3.0

@karellm karellm closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants