Jugendhackt / HowToPGP

PGP made easy
https://howtopgp.jugendhackt.de/#/
GNU General Public License v2.0
23 stars 5 forks source link

Improve setup of angular-translate #23

Closed inguin closed 8 years ago

inguin commented 8 years ago

The page fails to display in case no preferred language is configured in the user's browser. An exception is raised on the first call to translate: "No language key specified for loading". Also, if an unsupported language is configured (e.g. French), the page tries to load translations from a non-existing URL.

The root cause for both issues seems to be a bug in angular-translate, but it's easy to work around by checking the result of determinePreferredLanguage against the list of supported languages.

two-heart commented 8 years ago

Thank you for the Bugfix.