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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add keyPrefix support for react-i18next #1176

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

carlosmfreitas2409
Copy link

This pull request adds keyPrefix support to react-i81next inside useTranslation hook.

This pull request was inspired by #770, but with code and functionality improvements.

As said in this comment (#770 (comment)), there was a problem that the keyPrefix went before the namespace and that the first keyPrefix in the file overwrote the later keyPrefix. Both were fixed.

IntelliSense
The completion is showing according to the keyPrefix. I also made an improvement to only show items from the current or default namespace, because in my opinion, it doesn't make sense to show items that are not within the current namespace.

closes #719
closes #770

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support keyPrefix options from react-i18next
1 participant