Closed Sven-Lyco closed 3 months ago
Okay, I should have read better.
I have customized the LanguageCode
in src/types/LangaugeCode.ts
:
import { z } from "zod";
export const LanguageCode = {
de: "de",
} as const;
export const LanguageCodeEnumSchema = z.nativeEnum(LanguageCode);
export type LangaugeCodeEnum = z.infer<typeof LanguageCodeEnumSchema>;
And now it works. Maybe it would be an improvement to give a hint about the language settings or the possibility to change the language
This is a good find. The history URL has a languageCode
property which I naively set to only allow "en"
.
It might be worth considering to remove the reliance of languageCode
by:
languageCode: "en"
to all requests, see useConveneHistory's getHistoryByCardPoolType methodWe do not have a reliable way to display localized language results at the moment since we hard code a lot of English values for comparison, so it's best to make this website English only for now until we find a better way.
Is that a workable solution? Regardless, I'd love your help in resolving this, @Sven-Lyco.
This is a good find. The history URL has a
languageCode
property which I naively set to only allow"en"
.It might be worth considering to remove the reliance of
languageCode
by:* removing it from the data schema & the functions that use it/extract it * just hard coding `languageCode: "en"` to all requests, see [useConveneHistory's getHistoryByCardPoolType method](https://github.com/Luzefiru/wuwatracker/blob/main/src/hooks/useConveneHistory.ts)
We do not have a reliable way to display localized language results at the moment since we hard code a lot of English values for comparison, so it's best to make this website English only for now until we find a better way.
Is that a workable solution? Regardless, I'd love your help in resolving this, @Sven-Lyco.
I forked your project and will try a different things, but it will take time
I forked your project and will try a different things, but it will take time
Sure thing! I'm looking forward to what other methods you'll find to help support other languages. I'll merge the temporary fix for now since it's affecting users at the moment.
On that note, there's a Data mine repository with all the available languages for experimentation.
Will close this issue now since it works on your machine now. Thank you for raising this issue!🍻
Bug Description
When clicking on Import to import the history, the application crashes
How to Reproduce
A reproduction repository is greatly appreciated. Steps to reproduce the behavior:
Expected Behavior
The UI does not crash and the import is successful
Screenshots
import Site
ERROR
Platform/OS
Desktop (please complete the following information):