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.
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.