mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 18:03:38 +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.
90 lines
3.2 KiB
JavaScript
90 lines
3.2 KiB
JavaScript
//! moment.js locale configuration
|
|
//! locale : Estonian [et]
|
|
//! author : Henry Kehlmann : https://github.com/madhenry
|
|
//! improvements : Illimar Tambek : https://github.com/ragulka
|
|
|
|
;(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
|
|
|
|
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
|
var format = {
|
|
s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
|
|
ss: [number + 'sekundi', number + 'sekundit'],
|
|
m: ['ühe minuti', 'üks minut'],
|
|
mm: [number + ' minuti', number + ' minutit'],
|
|
h: ['ühe tunni', 'tund aega', 'üks tund'],
|
|
hh: [number + ' tunni', number + ' tundi'],
|
|
d: ['ühe päeva', 'üks päev'],
|
|
M: ['kuu aja', 'kuu aega', 'üks kuu'],
|
|
MM: [number + ' kuu', number + ' kuud'],
|
|
y: ['ühe aasta', 'aasta', 'üks aasta'],
|
|
yy: [number + ' aasta', number + ' aastat'],
|
|
};
|
|
if (withoutSuffix) {
|
|
return format[key][2] ? format[key][2] : format[key][1];
|
|
}
|
|
return isFuture ? format[key][0] : format[key][1];
|
|
}
|
|
|
|
var et = moment.defineLocale('et', {
|
|
months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
|
|
'_'
|
|
),
|
|
monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split(
|
|
'_'
|
|
),
|
|
weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
|
|
'_'
|
|
),
|
|
weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
|
|
weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
|
|
longDateFormat: {
|
|
LT: 'H:mm',
|
|
LTS: 'H:mm:ss',
|
|
L: 'DD.MM.YYYY',
|
|
LL: 'D. MMMM YYYY',
|
|
LLL: 'D. MMMM YYYY H:mm',
|
|
LLLL: 'dddd, D. MMMM YYYY H:mm',
|
|
},
|
|
calendar: {
|
|
sameDay: '[Täna,] LT',
|
|
nextDay: '[Homme,] LT',
|
|
nextWeek: '[Järgmine] dddd LT',
|
|
lastDay: '[Eile,] LT',
|
|
lastWeek: '[Eelmine] dddd LT',
|
|
sameElse: 'L',
|
|
},
|
|
relativeTime: {
|
|
future: '%s pärast',
|
|
past: '%s tagasi',
|
|
s: processRelativeTime,
|
|
ss: processRelativeTime,
|
|
m: processRelativeTime,
|
|
mm: processRelativeTime,
|
|
h: processRelativeTime,
|
|
hh: processRelativeTime,
|
|
d: processRelativeTime,
|
|
dd: '%d päeva',
|
|
M: processRelativeTime,
|
|
MM: processRelativeTime,
|
|
y: processRelativeTime,
|
|
yy: processRelativeTime,
|
|
},
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
|
ordinal: '%d.',
|
|
week: {
|
|
dow: 1, // Monday is the first day of the week.
|
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
},
|
|
});
|
|
|
|
return et;
|
|
|
|
})));
|