mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 20:41:24 +08:00
Update moment locales as well.
This commit is contained in:
171
lib/javascripts/moment_locale/cs.js
Executable file → Normal file
171
lib/javascripts/moment_locale/cs.js
Executable file → Normal file
@ -1,23 +1,23 @@
|
||||
//! moment.js locale configuration
|
||||
//! locale : czech (cs)
|
||||
//! locale : Czech [cs]
|
||||
//! author : petrbela : https://github.com/petrbela
|
||||
|
||||
;(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined'
|
||||
&& typeof require === 'function' ? factory(require('../moment')) :
|
||||
typeof define === 'function' && define.amd ? define(['moment'], factory) :
|
||||
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
||||
factory(global.moment)
|
||||
}(this, function (moment) { 'use strict';
|
||||
}(this, (function (moment) { 'use strict';
|
||||
|
||||
|
||||
var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),
|
||||
monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
|
||||
function plural(n) {
|
||||
return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
|
||||
}
|
||||
function translate(number, withoutSuffix, key, isFuture) {
|
||||
var result = number + ' ';
|
||||
switch (key) {
|
||||
var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');
|
||||
var monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
|
||||
function plural(n) {
|
||||
return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
|
||||
}
|
||||
function translate(number, withoutSuffix, key, isFuture) {
|
||||
var result = number + ' ';
|
||||
switch (key) {
|
||||
case 's': // a few seconds / in a few seconds / a few seconds ago
|
||||
return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
|
||||
case 'm': // a minute / in a minute / a minute ago
|
||||
@ -65,50 +65,51 @@
|
||||
return result + 'lety';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var cs = moment.defineLocale('cs', {
|
||||
months : months,
|
||||
monthsShort : monthsShort,
|
||||
monthsParse : (function (months, monthsShort) {
|
||||
var i, _monthsParse = [];
|
||||
for (i = 0; i < 12; i++) {
|
||||
// use custom parser to solve problem with July (červenec)
|
||||
_monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
|
||||
}
|
||||
return _monthsParse;
|
||||
}(months, monthsShort)),
|
||||
shortMonthsParse : (function (monthsShort) {
|
||||
var i, _shortMonthsParse = [];
|
||||
for (i = 0; i < 12; i++) {
|
||||
_shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
|
||||
}
|
||||
return _shortMonthsParse;
|
||||
}(monthsShort)),
|
||||
longMonthsParse : (function (months) {
|
||||
var i, _longMonthsParse = [];
|
||||
for (i = 0; i < 12; i++) {
|
||||
_longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
|
||||
}
|
||||
return _longMonthsParse;
|
||||
}(months)),
|
||||
weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
|
||||
weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),
|
||||
weekdaysMin : 'ne_po_út_st_čt_pá_so'.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: '[dnes v] LT',
|
||||
nextDay: '[zítra v] LT',
|
||||
nextWeek: function () {
|
||||
switch (this.day()) {
|
||||
var cs = moment.defineLocale('cs', {
|
||||
months : months,
|
||||
monthsShort : monthsShort,
|
||||
monthsParse : (function (months, monthsShort) {
|
||||
var i, _monthsParse = [];
|
||||
for (i = 0; i < 12; i++) {
|
||||
// use custom parser to solve problem with July (červenec)
|
||||
_monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
|
||||
}
|
||||
return _monthsParse;
|
||||
}(months, monthsShort)),
|
||||
shortMonthsParse : (function (monthsShort) {
|
||||
var i, _shortMonthsParse = [];
|
||||
for (i = 0; i < 12; i++) {
|
||||
_shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
|
||||
}
|
||||
return _shortMonthsParse;
|
||||
}(monthsShort)),
|
||||
longMonthsParse : (function (months) {
|
||||
var i, _longMonthsParse = [];
|
||||
for (i = 0; i < 12; i++) {
|
||||
_longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
|
||||
}
|
||||
return _longMonthsParse;
|
||||
}(months)),
|
||||
weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
|
||||
weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),
|
||||
weekdaysMin : 'ne_po_út_st_čt_pá_so'.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',
|
||||
l : 'D. M. YYYY'
|
||||
},
|
||||
calendar : {
|
||||
sameDay: '[dnes v] LT',
|
||||
nextDay: '[zítra v] LT',
|
||||
nextWeek: function () {
|
||||
switch (this.day()) {
|
||||
case 0:
|
||||
return '[v neděli v] LT';
|
||||
case 1:
|
||||
@ -122,11 +123,11 @@
|
||||
return '[v pátek v] LT';
|
||||
case 6:
|
||||
return '[v sobotu v] LT';
|
||||
}
|
||||
},
|
||||
lastDay: '[včera v] LT',
|
||||
lastWeek: function () {
|
||||
switch (this.day()) {
|
||||
}
|
||||
},
|
||||
lastDay: '[včera v] LT',
|
||||
lastWeek: function () {
|
||||
switch (this.day()) {
|
||||
case 0:
|
||||
return '[minulou neděli v] LT';
|
||||
case 1:
|
||||
@ -139,33 +140,33 @@
|
||||
return '[minulý] dddd [v] LT';
|
||||
case 6:
|
||||
return '[minulou sobotu v] LT';
|
||||
}
|
||||
},
|
||||
sameElse: 'L'
|
||||
}
|
||||
},
|
||||
relativeTime : {
|
||||
future : 'za %s',
|
||||
past : 'před %s',
|
||||
s : translate,
|
||||
m : translate,
|
||||
mm : translate,
|
||||
h : translate,
|
||||
hh : translate,
|
||||
d : translate,
|
||||
dd : translate,
|
||||
M : translate,
|
||||
MM : translate,
|
||||
y : translate,
|
||||
yy : translate
|
||||
},
|
||||
ordinalParse : /\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.
|
||||
}
|
||||
});
|
||||
sameElse: 'L'
|
||||
},
|
||||
relativeTime : {
|
||||
future : 'za %s',
|
||||
past : 'před %s',
|
||||
s : translate,
|
||||
m : translate,
|
||||
mm : translate,
|
||||
h : translate,
|
||||
hh : translate,
|
||||
d : translate,
|
||||
dd : translate,
|
||||
M : translate,
|
||||
MM : translate,
|
||||
y : translate,
|
||||
yy : translate
|
||||
},
|
||||
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 cs;
|
||||
return cs;
|
||||
|
||||
}));
|
||||
})));
|
||||
|
Reference in New Issue
Block a user