Language selector for items in webui #407

Closed
AMelonInsideLemon wants to merge 5 commits from webui-lang into main
AMelonInsideLemon commented 2024-06-25 21:47:12 -07:00 (Migrated from github.com)
No description provided.
Sainan reviewed 2024-06-25 21:58:43 -07:00
@ -88,3 +88,3 @@
const req = $.get("/custom/getItemLists");
const req = $.get(`/custom/getItemLists?lang=${localStorage.getItem("lang")}`);
req.done(data => {
window.archonCrystalUpgrades = data.archonCrystalUpgrades;

Is this not an issue when the localStorage does not have a "lang" field?

Is this not an issue when the localStorage does not have a "lang" field?

Also, I feel like it would be better to get the dict based on the language once and then do the lookups instead of having to find the dict for every single key we want to look up.

Also, I feel like it would be better to get the dict based on the language once and then do the lookups instead of having to find the dict for every single key we want to look up.
AMelonInsideLemon (Migrated from github.com) reviewed 2024-06-25 22:31:21 -07:00
@ -88,3 +88,3 @@
const req = $.get("/custom/getItemLists");
const req = $.get(`/custom/getItemLists?lang=${localStorage.getItem("lang")}`);
req.done(data => {
window.archonCrystalUpgrades = data.archonCrystalUpgrades;
AMelonInsideLemon (Migrated from github.com) commented 2024-06-25 22:31:21 -07:00

Nope, getString by default returns strings for en

Nope, getString by default returns strings for en
orzMaster (Migrated from github.com) reviewed 2024-06-26 00:16:21 -07:00
orzMaster (Migrated from github.com) commented 2024-06-26 00:14:31 -07:00
    const dict = getDict(req.query.lang?.toString());
```suggestion const dict = getDict(req.query.lang?.toString()); ```
OrdisPrime commented 2024-06-26 07:29:37 -07:00 (Migrated from github.com)

@Sainan let me know once you think this is ready to be merged

@Sainan let me know once you think this is ready to be merged

This will be a funny merge conflict with my PR, but yeah, I can take that burden, given that I at least know how to use Git.

This will be a funny merge conflict with my PR, but yeah, I can take that burden, given that I at least know how to use Git.

Pull request closed

Sign in to join this conversation.
No description provided.