Open sudodoki opened 10 years ago
I think having all the translations within the html files in the first place would be a bit annoying for translations and updating content. What do you think?
Either way I just wrote a little helper that can inline the data from the json files into html: https://github.com/finnp/insert-i18n This could either be used to make the switch easier from html to json. Or maybe like mentioned in #97 to build some kind of travis helper.
@finnp having the translations in the html might be nice because it would all be in one place... so it might be easier to see discrepancies between languages. the other plus is that the translated strings would get indexed by google
on the other hand, having the translations as separate json files makes for simpler git diffs, but adds a bit of maintenance overhead in keeping all of the files schemas up to date with each other. I don't think it will make a huge difference either way honestly, but I'm kind of leaning towards the all-in-the-html approach if I had to pick one.
However, we should really be contributing to this discussion and focusing our translation efforts here: https://github.com/rvagg/workshopper/issues/48
in the html might be nice because it would all be in one place
The issue is we have multiple html pages & header/footer things, for example, will be duplicated across the pages. So in terms of keeping everything in one place file with i18n-key: values wins, unless we have all the pages be on one page (using anchor navigation & :target
pseudostyles to show distinct chapters or something else, which will feel more like single page app).
@finnp nice work on this script!
Wouldn't lie to you, but atm I don't have strong opinion to whether it should be kept as is or moved into html. And yeah, rvagg/workshopper#48 seems like an issue with higher priority atm, which also affects translation (like npm install -g learnyounode-zh-tw
command that we have in translation now).
OK let's keep it as JSON for now... we can revisit translation of the nodeschool site in the future, but for now I think it's in a pretty good place
Just FYI: I did play around with it a bit but havn't progressed far. Would need some help since I am busy doing other work for the NodeSchool.
instead of getting data from json files, content should be taken from on page invisible elements, like https://github.com/jsconfcn/jingjs/blob/gh-pages/index.html#L225-L402 is working. This should also close #97