nodeschool / nodeschool.github.io

:school: nodeschool internet web page
http://nodeschool.io/
BSD 2-Clause "Simplified" License
930 stars 470 forks source link

Deprecate languages .json files, switch to SEO friendly spans #141

Open sudodoki opened 10 years ago

sudodoki commented 10 years ago

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

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

max-mapper commented 10 years ago

@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

sudodoki commented 10 years ago

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

max-mapper commented 10 years ago

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

martinheidegger commented 9 years ago

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.