next-translate icon indicating copy to clipboard operation
next-translate copied to clipboard

Variables rendered instead of actual strings (occurs randomly)

Open ravi-ojha opened this issue 1 year ago • 6 comments

What version of this package are you using? 2.5.3

What operating system, Node.js, and npm version? Ubuntu 22.04.3 LTS, Node 18.13.0, npm 8.19.3

What happened? In production, we see variables rendered instead of strings like this:

Screenshot from 2023-08-18 12-12-03

This started happening after we upgraded to Nextjs 13 and subsequently next-translate 2.5.3 with next-translate-plugin 2.5.3

This only happens when navigating on the client side, i.e. we click a link on a page that has all the strings rendered correctly, and the destination page loads but with string variables. The most annoying part is that it happens randomly. And usually happens after a deployment. It obviously goes away if we refresh the page, which suggests that there's a client-side issue.

We also use @ducanh2912/next-pwa however, I'm facing difficulties narrowing it down further.

What did you expect to happen? Strings rendered correctly

Are you willing to submit a pull request to fix this bug? Yes, if we can identify where the bug is.

ravi-ojha avatar Aug 18 '23 06:08 ravi-ojha

I am also experiencing these problems but with the app router. It has to be something with race condition.

BTW in i18n.js file I'am using "loadLocaleFrom" property with "import"

markky21 avatar Sep 20 '23 13:09 markky21

Any update on this?

iStorry avatar Oct 03 '23 00:10 iStorry

Having the same issue on the production deployment, app is fine in development but it just shows the strings once deployed

federicogomezlara avatar Oct 07 '23 10:10 federicogomezlara

Has anyone found a root cause/fix for this?

neilkuumar avatar Apr 02 '24 20:04 neilkuumar

@aralroca are we able to bump this issue? Any idea what might be causing it?

neilkumar-circle avatar Apr 17 '24 08:04 neilkumar-circle

Please share a repo reproducing the error, otherwise it is very difficult to know what is happening.

aralroca avatar Apr 17 '24 08:04 aralroca