Skip to content

Commit

Permalink
Use 'pt' wiki pages in 'pt-BR' iD localization
Browse files Browse the repository at this point in the history
(closes #3776)
  • Loading branch information
bhousel committed Jan 20, 2017
1 parent c47a178 commit 5cfe559
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/ui/tag_reference.js
Expand Up @@ -19,10 +19,12 @@ export function uiTagReference(tag) {
var locale = utilDetect().locale.toLowerCase(),
localized;

localized = _.find(data, function(d) {
return d.lang.toLowerCase() === locale;
});
if (localized) return localized;
if (locale !== 'pt-br') { // see #3776, prefer 'pt' over 'pt-br'
localized = _.find(data, function(d) {
return d.lang.toLowerCase() === locale;
});
if (localized) return localized;
}

// try the non-regional version of a language, like
// 'en' if the language is 'en-US'
Expand Down

0 comments on commit 5cfe559

Please sign in to comment.