Usuária:IJuulia/Ajustes 2.js: diferenças entre revisões

Conteúdo apagado Conteúdo adicionado
IJuulia (discussão | contribs)
m
IJuulia (discussão | contribs)
m
Linha 5:
novoEditor = mw.user.options.get('visualeditor-newwikitext') == '1';
 
const meses = [
var mesesLang = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december', 'janeiro', 'fevereiro', 'março', 'marco', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro', 'enero', 'febrero', 'marzo', 'mayo', 'junio', 'julio', 'septiembre', 'octubre', 'noviembre', 'diciembre', 'summer', 'spring', 'fall', 'autumn', 'winter', 'verano', 'otono', 'otoño', 'invierno'];
{ lang: ['january', 'janeiro', 'enero'], num: '01' },
var mesesNum = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '01', '02', '03', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '01', '02', '03', '05', '06', '07', '09', '10', '11', '12', 'verão', 'primavera', 'outono', 'outono', 'inverno', 'verão', 'outono', 'outono', 'inverno'];
{ lang: ['february', 'fevereiro', 'febrero'], num: '02' },
{ lang: ['march', 'março', 'marco', 'marzo'], num: '03' },
{ lang: ['april', 'abril'], num: '04' },
{ lang: ['may', 'maio', 'mayo'], num: '05' },
{ lang: ['june', 'junho', 'junio'], num: '06' },
{ lang: ['july', 'julho', 'julio'], num: '07' },
{ lang: ['august', 'agosto'], num: '08' },
{ lang: ['september', 'septiembre', 'setembro', 'setembre'], num: '09' },
{ lang: ['october', 'outubro', 'octubre'], num: '10' },
{ lang: ['november', 'novembro', 'noviembre'], num: '11' },
{ lang: ['december', 'dezembro', 'diciembre'], num: '12' },
{ lang: ['summer', 'verão'], num: 'verão' },
{ lang: ['spring', 'primavera'], num: 'primavera' },
{ lang: ['fall', 'autumn', 'outono', 'otoño'], num: 'outono' },
{ lang: ['winter', 'inverno', 'invierno'], num: 'inverno' },
];
 
function traduzirMes(mes) {
if mes = (mes.toLocaleLowerCase() == mesesLang[i];
for (varlet i = 0; i < mesesLangmeses.length; i++) {
if (mes.toLocaleLowerCase() == mesesLang[i]
if (meses[i].lang.includes(mes)) {
|| mes.toLocaleLowerCase() == mesesLang[i].substring(0, 3))
return mesesNummeses[i].num;
}
}
return mes;
}
/*
 
let cvGrauO = "([^\\|\\}]*°[^\\|\\}]*[\\|\\}])",
diaMesAnoP = "(\\d+)\\s+de\\s+([A-Za-zç]+)\\s+de\\s+(\\d+)\\.?",
Linha 40 ⟶ 57:
var idioma = "(\\|\\s*(?:l[íi]ngua|idioma)\\s*=\\s*)";
 
/* function rDatas(alt, padrao) {
if (alt.match(/falhou/)) return padrao;
else return alt;
Linha 342 ⟶ 359:
}
},
{
reg: /\{\s*[Cc]ite mailing list *(\s*\|)/, subs: function(match) {
return '{citar lista de discussão' + match[1];
Linha 1 531 ⟶ 1 548:
 
for (var i = 0; i < listaDupl.length; i++) {
duplicado.push({
reg: new RegExp("(\\|\\s*" + listaDupl[i] + "\\s*=)([\\s\\S]*)(\\|"
+ listaDupl[i] + "\\s*=)([\\s\\S]*)"),
subs: verifDuplicado
});
}