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

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

Open
sudodoki opened this issue Nov 2, 2014 · 5 comments
Open

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

sudodoki opened this issue Nov 2, 2014 · 5 comments

Comments

@sudodoki
Copy link
Contributor

sudodoki commented Nov 2, 2014

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
Copy link
Member

finnp commented Nov 2, 2014

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
Copy link
Contributor

@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: workshopper/workshopper#48

@sudodoki
Copy link
Contributor Author

sudodoki commented Nov 2, 2014

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, workshopper/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
Copy link
Contributor

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
Copy link
Contributor

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.

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

4 participants