Skip to content

Commit b0f49e8

Browse files
committed
Add Brazilian translation.
1 parent 8061b91 commit b0f49e8

File tree

2 files changed

+37
-9
lines changed

2 files changed

+37
-9
lines changed

template/locales/locale.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,30 @@ define([
33
'./locales/fr.js',
44
'./locales/nl.js',
55
'./locales/pl.js',
6+
'./locales/pt_br.js',
67
'./locales/ru.js',
78
'./locales/zh.js'
89
], function() {
10+
var langId = (navigator.language || navigator.userLanguage).toLowerCase();
11+
var language = langId.substr(0, 2);
912
var locales = {};
10-
for(index in arguments) {
11-
for(property in arguments[index]) {
13+
14+
for (index in arguments) {
15+
for (property in arguments[index])
1216
locales[property] = arguments[index][property];
13-
}
1417
}
15-
16-
var language = ((navigator.language) ? navigator.language : navigator.userLanguage).substr(0, 2).toLowerCase();
17-
if( ! locales['en'])
18+
if ( ! locales['en'])
1819
locales['en'] = {};
19-
if( ! locales[language])
20+
21+
if ( ! locales[langId] && ! locales[language])
2022
language = 'en';
2123

22-
var locale = locales[language];
24+
var locale = (locales[langId] ? locales[langId] : locales[language]);
2325

2426
var __ = function(text) {
2527
var index = locale[text];
26-
if(index === undefined) return text;
28+
if (index === undefined)
29+
return text;
2730
return index;
2831
};
2932

template/locales/pt_br.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
define({
2+
'pt_br': {
3+
'Allowed values:' : 'Valores permitidos:',
4+
'Compare all with predecessor': 'Compare todos com antecessores',
5+
'compare changes to:' : 'comparar alterações com:',
6+
'compared to' : 'comparado com',
7+
'Default value:' : 'Valor padrão:',
8+
'Description' : 'Descrição',
9+
'Field' : 'Campo',
10+
'General' : 'Geral',
11+
'Generated with' : 'Gerado com',
12+
'Name' : 'Nome',
13+
'No response values.' : 'Sem valores de resposta.',
14+
'optional' : 'opcional',
15+
'Parameter' : 'Parâmetro',
16+
'Permission:' : 'Permissão:',
17+
'Response' : 'Resposta',
18+
'Send' : 'Enviar',
19+
'Send a Sample Request' : 'Enviar um Exemplo de Pedido',
20+
'show up to version:' : 'aparecer para a versão:',
21+
'Size range:' : 'Faixa de tamanho:',
22+
'Type' : 'Tipo',
23+
'url' : 'url'
24+
}
25+
});

0 commit comments

Comments
 (0)