MadeBaruna / paimon-moe

Your best Genshin Impact companion! Help you plan what to farm with ascension calculator and database. Also track your progress with todo and wish counter.
https://paimon.moe
MIT License
1.39k stars 268 forks source link

[Suggestion] Make hardcoded strings translatable (broader i18n) #265

Open lakejason0 opened 2 years ago

lakejason0 commented 2 years ago

See #270 .

Currently, several strings (like the toast Data has been synced!, and the banner's name (starting from here) in auto importer loading screen, also the cannot load dynamically loaded modules?) are hardcoded and therefore not translatable. I suggest them be translatable so that the website can be more accessible to non-English speakers.

Edit: In Furnishing the loading prompt isn't translatable (maybe it's like the error page?) , and the search placeholder (Select Character) isn't either. There are several toasts (here, and here) in the auto importer in my memory as well. And I'm not talking about "some places", it's more like "all places". I'd like to help but like idk how the language files are organized (like key naming for a string).

Edit 2: Footer links, and wish counter main page table header (Total | Percent |Pity AVG), table content ("Character", "Weapon"), wish counter details back button ("Wish Counter"), and the graph (Total, 5 Pity, 4 Pity), and many other charts

Edit 3: Fate calculator Days until pull, Stardust Wishes (left this month), in %s months (it's dayjs so we'll need to import all languages available and translate the string calculator.resin.timeFormat for each language) and all item names (idk where it actually lies); Todo delete button (I know it's under a refactor)

(Note: Currently all dayjs usage imports locale seperately, and only en and id are all imported, ru for some usage)

Edit 4: Artifact domain name (in data jsons of artifacts store the domain's id, but names are only English stored in domain.js), All kinds of items name (only English stored in itemList.js), Timeline events, Privacy Policy

Edit 5: Crystal obtaining source (data jsons are separated in languages (src/data/radiantSpincrystal/<lang>.json), but all source field is English)

Edit 6: Credits

Edit 7: Tweets By MadeBaruna placeholder (maybe it's also like the error page?)

MadeBaruna commented 2 years ago

I have added the string for drive error, but for the error page I need to check it first if the translation can go there (because its an error page, I don't know if the locale script can run there)