liqd/adhocracy — pull request #895 by nidico (2014-05-12 22:29:00+00:00)
Title: Feature fix language negotiation

#894 was only partly correct:

The previous "fix" of adding {'pt':'pt_BR'} as locale alias actually replaced the
original babel alias dict and therefore only had the intended effect by accident
and only Portuguese survived the babel language negotiation process!

The real problem was that Babel language negotiation can only compare
language codes using the same separator. As we use underscores and
browsers send dashes, we now convert our static list to use dashes as well
for the negotiation.

In the second commit the LOCALE_ALIASES feature is used in order to make
Brazilian (and not English or whatever) show up if Portuguese is requested.