mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
Update moment locales as well.
This commit is contained in:
137
lib/javascripts/moment_locale/ca.js
Executable file → Normal file
137
lib/javascripts/moment_locale/ca.js
Executable file → Normal file
@ -1,81 +1,88 @@
|
||||
//! moment.js locale configuration
|
||||
//! locale : catalan (ca)
|
||||
//! locale : Catalan [ca]
|
||||
//! author : Juan G. Hurtado : https://github.com/juanghurtado
|
||||
|
||||
;(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 ca = moment.defineLocale('ca', {
|
||||
months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
|
||||
monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'),
|
||||
monthsParseExact : true,
|
||||
weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
|
||||
weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
|
||||
weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),
|
||||
weekdaysParseExact : true,
|
||||
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'
|
||||
var ca = moment.defineLocale('ca', {
|
||||
months : {
|
||||
standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
|
||||
format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'),
|
||||
isFormat: /D[oD]?(\s)+MMMM/
|
||||
},
|
||||
monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
|
||||
monthsParseExact : true,
|
||||
weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
|
||||
weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
|
||||
weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),
|
||||
weekdaysParseExact : true,
|
||||
longDateFormat : {
|
||||
LT : 'H:mm',
|
||||
LTS : 'H:mm:ss',
|
||||
L : 'DD/MM/YYYY',
|
||||
LL : '[el] D MMMM [de] YYYY',
|
||||
ll : 'D MMM YYYY',
|
||||
LLL : '[el] D MMMM [de] YYYY [a les] H:mm',
|
||||
lll : 'D MMM YYYY, H:mm',
|
||||
LLLL : '[el] dddd D MMMM [de] YYYY [a les] H:mm',
|
||||
llll : 'ddd D MMM YYYY, H:mm'
|
||||
},
|
||||
calendar : {
|
||||
sameDay : function () {
|
||||
return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
calendar : {
|
||||
sameDay : function () {
|
||||
return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
nextDay : function () {
|
||||
return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
nextWeek : function () {
|
||||
return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
lastDay : function () {
|
||||
return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
lastWeek : function () {
|
||||
return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
sameElse : 'L'
|
||||
nextDay : function () {
|
||||
return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
relativeTime : {
|
||||
future : 'en %s',
|
||||
past : 'fa %s',
|
||||
s : 'uns segons',
|
||||
m : 'un minut',
|
||||
mm : '%d minuts',
|
||||
h : 'una hora',
|
||||
hh : '%d hores',
|
||||
d : 'un dia',
|
||||
dd : '%d dies',
|
||||
M : 'un mes',
|
||||
MM : '%d mesos',
|
||||
y : 'un any',
|
||||
yy : '%d anys'
|
||||
nextWeek : function () {
|
||||
return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
ordinalParse: /\d{1,2}(r|n|t|è|a)/,
|
||||
ordinal : function (number, period) {
|
||||
var output = (number === 1) ? 'r' :
|
||||
(number === 2) ? 'n' :
|
||||
(number === 3) ? 'r' :
|
||||
(number === 4) ? 't' : 'è';
|
||||
if (period === 'w' || period === 'W') {
|
||||
output = 'a';
|
||||
}
|
||||
return number + output;
|
||||
lastDay : function () {
|
||||
return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
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.
|
||||
lastWeek : function () {
|
||||
return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
|
||||
},
|
||||
sameElse : 'L'
|
||||
},
|
||||
relativeTime : {
|
||||
future : 'd\'aquí %s',
|
||||
past : 'fa %s',
|
||||
s : 'uns segons',
|
||||
m : 'un minut',
|
||||
mm : '%d minuts',
|
||||
h : 'una hora',
|
||||
hh : '%d hores',
|
||||
d : 'un dia',
|
||||
dd : '%d dies',
|
||||
M : 'un mes',
|
||||
MM : '%d mesos',
|
||||
y : 'un any',
|
||||
yy : '%d anys'
|
||||
},
|
||||
dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
|
||||
ordinal : function (number, period) {
|
||||
var output = (number === 1) ? 'r' :
|
||||
(number === 2) ? 'n' :
|
||||
(number === 3) ? 'r' :
|
||||
(number === 4) ? 't' : 'è';
|
||||
if (period === 'w' || period === 'W') {
|
||||
output = 'a';
|
||||
}
|
||||
});
|
||||
return number + output;
|
||||
},
|
||||
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 ca;
|
||||
return ca;
|
||||
|
||||
}));
|
||||
})));
|
||||
|
Reference in New Issue
Block a user