geoadmin/mf-geoadmin3 — pull request #230 by elemoine (2013-08-12 13:38:53+00:00)
Title: One lang request at app load time

As can be observed on http://mf-geoadmin3.bgdi.admin.ch/main/prod we trigger two lang/locale Ajax requests at app load time, one for the navigator language (which is set in $translate as the preferred language) and one for the language specified in the permalink. If there's no "permalink language", or if the "permalink language" is the same as the navigator language, we even trigger twice the same request (to the same language file).

This PR fixes it by not setting any preferred language in $translate. The translation directive is responsible for setting the initial/default language, based on what's set in the permalink and the navigator language.

Use https://github.com/geoadmin/mf-geoadmin3/compare/dev_one-lang-request?w=0 to see the diff with master.

Please review.