mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 14:45:02 +08:00
cdb7ddc258
We updated version of moment and moment-timezone as our current versions are outdated making Discourse Dates broken on places where timezone had updates, like here in Brazil. This also update highlightJS to the latest version and corrected a test that relied on a no longer supported locale in moment.
69 lines
2.3 KiB
JavaScript
69 lines
2.3 KiB
JavaScript
//! moment.js locale configuration
|
|
//! locale : Portuguese (Brazil) [pt-br]
|
|
//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
|
|
|
|
;(function (global, factory) {
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
|
factory(global.moment)
|
|
}(this, (function (moment) { 'use strict';
|
|
|
|
//! moment.js locale configuration
|
|
|
|
var ptBr = moment.defineLocale('pt-br', {
|
|
months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
|
|
'_'
|
|
),
|
|
monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
|
|
weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
|
|
'_'
|
|
),
|
|
weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
|
|
weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
|
|
weekdaysParseExact: true,
|
|
longDateFormat: {
|
|
LT: 'HH:mm',
|
|
LTS: 'HH:mm:ss',
|
|
L: 'DD/MM/YYYY',
|
|
LL: 'D [de] MMMM [de] YYYY',
|
|
LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
|
|
LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
|
|
},
|
|
calendar: {
|
|
sameDay: '[Hoje às] LT',
|
|
nextDay: '[Amanhã às] LT',
|
|
nextWeek: 'dddd [às] LT',
|
|
lastDay: '[Ontem às] LT',
|
|
lastWeek: function () {
|
|
return this.day() === 0 || this.day() === 6
|
|
? '[Último] dddd [às] LT' // Saturday + Sunday
|
|
: '[Última] dddd [às] LT'; // Monday - Friday
|
|
},
|
|
sameElse: 'L',
|
|
},
|
|
relativeTime: {
|
|
future: 'em %s',
|
|
past: 'há %s',
|
|
s: 'poucos segundos',
|
|
ss: '%d segundos',
|
|
m: 'um minuto',
|
|
mm: '%d minutos',
|
|
h: 'uma hora',
|
|
hh: '%d horas',
|
|
d: 'um dia',
|
|
dd: '%d dias',
|
|
M: 'um mês',
|
|
MM: '%d meses',
|
|
y: 'um ano',
|
|
yy: '%d anos',
|
|
},
|
|
dayOfMonthOrdinalParse: /\d{1,2}º/,
|
|
ordinal: '%dº',
|
|
invalidDate: 'Data inválida',
|
|
});
|
|
|
|
return ptBr;
|
|
|
|
})));
|