MarkDurbin104 / 3dp.rocks

All source from 3DP.Rock website and blog
MIT License
103 stars 58 forks source link

add I18n #1

Open bmcage opened 9 years ago

bmcage commented 9 years ago

Before I can use the code, I need internationalization, as kids are not that good with English.

Once I translate, it will be harder to contribute due to code differences. So, as a first contribution, I would like to add i18n. I never did real javascript coding, but that should not be a problem, except for the fact that I am not current to best practices in javascript.

So, to add i18n, I would follow guide at http://www.obviel.org/en/1.0b/i18n.html Should not be too hard as there is little English text

1/So, in index.html: change eg Max Size (MM): to _(Max Size (MM):) 2/extract the po as lithopane.po 3/create my localization, eg nl.po 4/use pojson to create the json language data

It still seems that after download and putting the site up, I need to manually copy the dutch json language data to the gettext object. Perhaps there is a more elegant method. One would want to avoid downloading all po data of all languages though, not sure if possible with javascript.

MarkDurbin104 commented 9 years ago

Hi @bmcage I'm in the process of re-factoring and documenting the code today and tomorrow. Your request would best be attempted after this. Can you wait a couple of days?

bmcage commented 9 years ago

Yes, off course I can wait. The text is so little it probably is easier to work with some sort of config. Like that logo and title can also be changed (I don't mind your logo on it, but something referring to domain would be needed).

In order not to spawn issues at this time, some other observations:

  1. a reset button. Now you need to press F5 to get originals back.
  2. when dragging two images, you see then one next to the other, I would expect the old one to go away
  3. when having high dpi pic, and setting width to eg 40 instead of 100 (or 10 just to test), results are far too blurred. Some downscaling to a max dpi, then doing the lithopane formation seems needed. This relates to the resolution of final stl and how to easily control it.
  4. I'd like border=0 to work.
  5. Option to have borderheight. Now it defaults to height of the lithopane.
  6. In case options are added, some of these are advances, like the vertex/pixel, and better go on an advanced tab or in some other way. Certainly for an interface aimed also at young children
MarkDurbin104 commented 9 years ago

I've made a lot of changes (mainly on the UI front) for mobile and I've moved all the text and configuration to a separate JSON file to make that easier.