Closed SamTV12345 closed 9 months ago
Thanks! are we able to delete the other translation files now, or do we need to duplicate the content?
TODO: delete the files the new ones were derived from and see if anything breaks ;)
TODO: delete the files the new ones were derived from and see if anything breaks ;)
Done :D
thanks I'll double-check locally things seem to work. Also did you check on default locale (e.g. browser locale is china, so chinese is the default lang?)
@SamTV12345 so good news is the language translations work without the old files. I think there's a problem in defaulting locale, as I checked a couple browsers, and I get chinese default ;) mind having a look?
I'll have a look at it.
@SamTV12345 so good news is the language translations work without the old files. I think there's a problem in defaulting locale, as I checked a couple browsers, and I get chinese default ;) mind having a look?
I couldn't unfortunately recreate the issue. If you find some time could you please try my version and open the browser devtools and paste the output?
checking now, thanks
are you only testing via npm run start
? I think maybe this could be why are you not seeing the issue. Can you try building the server with the instructions at the end of zipkin-server/README.md and see if you also have an issue with language selection? At the end of the day, this is how the UI is served, so the ultimate test.
as this PR was raised from master, I can't help adjust it (rebase etc). Try to get into the habit of raising changes from a branch besides master so easier to collaborate (e.g. git checkout -b fix-i18n; do stuff; git push origin fix-i18n)
here's the change to get sourcemap in the prod build which may help lead to identification of the cause. Locally, dev mode (npm run start
) I get english, but in prod same browser ends up chinese but only for the lens ui
diff --git a/zipkin-lens/vite.config.ts b/zipkin-lens/vite.config.ts
index 90eacd181..28fc661cc 100644
--- a/zipkin-lens/vite.config.ts
+++ b/zipkin-lens/vite.config.ts
@@ -66,6 +66,7 @@ export default defineConfig(() => {
entryFileNames: `static/js/[name].[hash].js`,
},
},
+ sourcemap: true,
},
}
})
so actually there is progress. Now, in a private window I default to english. There must be some cookie being interpreted as chinese default somewhere. I'll try to track it down. Meanwhile, @SamTV12345 can you fix the tests?
not entirely sure why, but updating to latest versions works. I'll raise another PR and pick your changes in, to close this. Thanks!
This pull request fixes the language selector. Unfortunately the po files don't work with react-i18next so I had to convert them into json files.
Closes #3723