chrisnorth / design-a-space-telescope

Web app to design a space telescope
http://chrisnorth.github.io/design-a-space-telescope/
2 stars 2 forks source link

Language setting problem #17

Closed chrisnorth closed 9 years ago

chrisnorth commented 9 years ago

A teacher with a laptop working in Portuguese, and the site brought up the no-javascript page. It seemed to be trying to find pt.json, scenarios_pt.json etc. which don't exist.

Could it fallback on en if language files aren't found?

A quick fix was to duplicate the en.json (and similar) as pt.json etc. in the gh-pages branch

slowe commented 9 years ago

When was this? In the past 10 minutes? I very recently made a change to only use pre-defined languages so that will affect things.

It should fall back to English. Don't add pt.json as that hides a potential problem. I'd rather we found out if my recent change fixes the problem.

slowe commented 9 years ago

I've just tested the current version of the gh-pages branch with Firefox set to accept "pt" and it only loads the "en" version. I've added more log messages to show what the browser suggests for the language and what the code loads.

chrisnorth commented 9 years ago

This was about an hour ago, so maybe before you made the changes. I've just removed the pt json files - that was just so a teacher could use it at the exact time we were doing it in the session.

I'll ask them to test it again shortly

(It met with huge approval here, by the way!)

slowe commented 9 years ago

Ah ha. So hopefully I've already addressed the problem. I'm glad you were able to make a temporary fix anyway. :) BTW, make sure they do a hard reload when they check it again.

slowe commented 9 years ago

Was this resolved?

chrisnorth commented 9 years ago

Yes, I think it was. Marking closed.