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] Typing for i18next is too rigid #6313

Open
bombillazo opened this issue Sep 9, 2024 · 2 comments
Open

[FEAT] Typing for i18next is too rigid #6313

bombillazo opened this issue Sep 9, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@bombillazo
Copy link
Contributor

Describe the bug

We are using i18next for our translations, and the Refine i18n provider uses a generic interface for the translate function.

i18next allows for array keys but that is currently incompatible with the current i18nProvider translate function type.

Steps To Reproduce

N/A

Expected behavior

We should be able to handle translations via the refine hook with array key translations

Packages

  • @refinedev/core

Additional Context

No response

@bombillazo bombillazo added the bug Something isn't working label Sep 9, 2024
@aliemir
Copy link
Member

aliemir commented Sep 12, 2024

Hey @bombillazo thank you for the report. I think we can work on allowing customization of the translation key type with module augmentation 🤔 We already had some plans on this and this will be a good addition to the set of customization we can offer.

Until we have something to show for it, I think as a workaround you can pass the array key in an object using the second argument.

@aliemir aliemir added enhancement New feature or request and removed bug Something isn't working labels Sep 12, 2024
@aliemir aliemir changed the title [BUG] Typing for i18next is too rigid [FEAT] Typing for i18next is too rigid Sep 12, 2024
Copy link

stale bot commented Nov 11, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Nov 11, 2024
@stale stale bot closed this as completed Nov 18, 2024
@BatuhanW BatuhanW reopened this Nov 18, 2024
@stale stale bot removed the wontfix This will not be worked on label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants