-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Plural translations (with count paramater) does not match server-rendered HTML #281
Comments
@QuiiBz Thanks for such a quick response! I'm using latest chrome. Could you try Are you able to open this? |
Thanks for fixing the sandbox link. Indeed the issue isn't related to the browser, but that the backend's |
Just to clarify, you was able to reproduce it as well, right? Should it be fixed on package lvl? Big thanks for taking a look 🙏 |
Yeah I was able to reproduce with the steps you mentioned, I'll take a look asap to fix it at the package-level. |
UPD after some debugging and investigation: It started working with But still not sure why server side initial result is different. Code looks fine. |
I just tried and I'm not able to reproduce the bug with the provided CodeSandbox, with |
Issue also exists in Closing this since it's not a pckg issue. Thanks for your support! |
Describe the bug
Plural translations (with count paramater) which uses "Intl.PluralRules" API determined incorrectly on server ("ua" locale).
locale.ts file
{ 'test#one': '{count} #one', 'test#other': '{count} #other', }
Issue
<p>{t('test', { count: 21 })}</p>
#other
is returned from server-rendered html and then transformed to#one
on client side.To Reproduce
/ua/client
url (like in screenshot below).Expected behavior
Plural translations should be same on both server and client.
About
next-international version:
1.1.3
Next.js version:
14.0.1
Video
https://github.com/QuiiBz/next-international/assets/32720808/89b4c9aa-8abb-4834-b2c2-01546a03f11e
Screenshots
The text was updated successfully, but these errors were encountered: