Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18 all the things #135

Open
deschery opened this issue Feb 6, 2018 · 5 comments
Open

I18 all the things #135

deschery opened this issue Feb 6, 2018 · 5 comments

Comments

@deschery
Copy link

deschery commented Feb 6, 2018

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!

@zombieFox
Copy link
Owner

zombieFox commented Feb 6, 2018

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.

@johnantoni
Copy link
Contributor

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>

@zombieFox
Copy link
Owner

zombieFox commented Jul 2, 2018

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/

@deschery
Copy link
Author

deschery commented Jul 3, 2018

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...

@johnantoni
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants