You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What operating system, Node.js, and npm version?
node 16.20.0
npm 8.19.4
next 13.4.19
What happened?
locales of pages getting mixed. This issue could be also replicated in demo project(next-vernac)clone [email protected]:aralroca/next-translate.git
Make a server component and add any promise to it as below
import useTranslation from "next-translate/useTranslation";
export default async function Title() {
const { t, lang } = useTranslation("common");
const res = await delay();
return (
<>
{t("title")}
</>
);
}
function delay() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(1);
}, 0.8);
});
}
Now call this title in page.js.
Simultaneously hit two locales of this page(localhost:3000 and localhost:3000/es) fastly. To hit 2 request at same time on local i did following
one request from browser and one using script, the lcoales will get mixed on english page spanish will be visible
What did you expect to happen?
The locales should remain same.
Are you willing to submit a pull request to fix this bug?
no
The text was updated successfully, but these errors were encountered:
Hi, the workarounds I found was adding retries to our playwright tests or using the built version of our app to run the tests instead of the dev server
What version of this package are you using?
2.0.1
What operating system, Node.js, and npm version?
node 16.20.0
npm 8.19.4
next 13.4.19
What happened?
locales of pages getting mixed. This issue could be also replicated in demo project(next-vernac)clone [email protected]:aralroca/next-translate.git
Make a server component and add any promise to it as below
import useTranslation from "next-translate/useTranslation";
export default async function Title() {
const { t, lang } = useTranslation("common");
const res = await delay();
return (
<>
{t("title")}
</>
);
}
function delay() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(1);
}, 0.8);
});
}
Now call this title in page.js.
Simultaneously hit two locales of this page(localhost:3000 and localhost:3000/es) fastly. To hit 2 request at same time on local i did following
one request from browser and one using script, the lcoales will get mixed on english page spanish will be visible
What did you expect to happen?
The locales should remain same.
Are you willing to submit a pull request to fix this bug?
no
The text was updated successfully, but these errors were encountered: