zombieFox / awesomeSheet

Online Pathfinder Character Sheet

Home Page:https://zombiefox.github.io/awesomeSheet/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I18 all the things

deschery opened this issue · comments

Hi there.

That really is an awesome sheet you’ve created there. I’ve discovered it just recently, but loved it immediately.

Have you ever thought of i18n? I’d really love to see it in my own language.

Unfortunately I am not that familiar with the js-technologies you use, but I’m a developer for quite some time now. So I’d really be willing to help you on that.

Keep up the nice work!

Hi, glad you like awesomeSheet.

In short, I haven't. That is because I'm learning vanilla JS and the app is not built with react or vue etc.

I wouldn't know where to begin with something like that. In theory I don't see why the app shouldn't be localised. Any advice or help would be very welcome.

awesome work, regarding localization you could try https://www.i18next.com/

i'm using it for a couple of projects and it's proven to be pretty good.

basically all your localization are held in a file in /public/locales/ with one file per language (en.json, fr.json, etc.) with a base one (app.json) as a fallback file.

Then you read in the locale files on load, hold them in memory and apply them in place of the content:

<h2>Equipment</h2>

Becomes

<h2>{i8n("equipment")}</h2>

Thanks for the suggestion. I'll look into i18next asap. 👍
There is one issue with supporting multiple languages now that the project has grown. I don't know if I can translate all the Feats and Spells in /src/db/

At least for the german translation, there is an 'official' site: http://prd.5footstep.de
So there would only be a looooot of copy&paste to be done :)
Since there is no other solution available, I once started to write a parser for the site, but then the owner changed the entire layout (for worse, thb) before I was able to run it.
Maybe I should restart a project like this. I can't believe there's no simple way to translate available, even though all the PF material is available online...

agree, it's weird there's no simple solution. I've relied on google translate on a previous thing but it's totally a temporary solution as the translations aren't perfect.