mozilla / osumo

Offline SUMO. Test site available at http://osumo.paas.allizom.org/
Other
2 stars 5 forks source link

Languages should not be defined in app.html. #12

Open mythmon opened 11 years ago

mythmon commented 11 years ago

The list of supported languages changes from time to time, and having it in a single several hundred character line in an html file is not ok.

shuhaowu commented 11 years ago

Actually since right now most of the app is only localized in English and Chinese, that list is mostly a lie.

My initial design involved querying sumo for the language list. That added to the complexity of the app (as it would be an ajax call and hence more promises). I also tried to approach of querying sumo on the flask server boot and injected it directly in the app. That also added complexity to the flask server.

Ideally this would share the same list under kitsune/settings.py. I'm not sure what the best practice would be. Though since this is static enough, I feel like it should be okay. Although if there are better ideas...