diff options
Diffstat (limited to 'www/lib/moment/src/locale')
| -rw-r--r-- | www/lib/moment/src/locale/ar.js | 4 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/cv.js | 45 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/es.js | 10 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/hr.js | 4 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/jv.js | 73 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/lv.js | 49 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/me.js | 99 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/my.js | 5 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/pl.js | 8 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/pt-br.js | 10 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/pt.js | 10 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/si.js | 56 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/sl.js | 86 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/sv.js | 4 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/zh-cn.js | 22 | ||||
| -rw-r--r-- | www/lib/moment/src/locale/zh-tw.js | 3 |
16 files changed, 374 insertions, 114 deletions
diff --git a/www/lib/moment/src/locale/ar.js b/www/lib/moment/src/locale/ar.js index d3a5bfcc..689bc8f6 100644 --- a/www/lib/moment/src/locale/ar.js +++ b/www/lib/moment/src/locale/ar.js @@ -70,7 +70,7 @@ export default moment.defineLocale('ar', { longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', + L : 'D/\u200FM/\u200FYYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', LLLL : 'dddd D MMMM YYYY LT' @@ -110,7 +110,7 @@ export default moment.defineLocale('ar', { yy : pluralize('y') }, preparse: function (string) { - return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return string.replace(/\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { return numberMap[match]; }).replace(/،/g, ','); }, diff --git a/www/lib/moment/src/locale/cv.js b/www/lib/moment/src/locale/cv.js index dc50da3a..09db067d 100644 --- a/www/lib/moment/src/locale/cv.js +++ b/www/lib/moment/src/locale/cv.js @@ -5,50 +5,49 @@ import moment from '../moment'; export default moment.defineLocale('cv', { - months : 'кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав'.split('_'), - monthsShort : 'кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш'.split('_'), - weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун'.split('_'), - weekdaysShort : 'выр_тун_ытл_юн_кĕç_эрн_шăм'.split('_'), - weekdaysMin : 'вр_тн_ыт_юн_кç_эр_шм'.split('_'), + months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'), + monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'), + weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'LT:ss', L : 'DD-MM-YYYY', - LL : 'YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]', - LLL : 'YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT', - LLLL : 'dddd, YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT' + LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], LT', + LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], LT' }, calendar : { sameDay: '[Паян] LT [сехетре]', nextDay: '[Ыран] LT [сехетре]', - lastDay: '[Ĕнер] LT [сехетре]', - nextWeek: '[Çитес] dddd LT [сехетре]', - lastWeek: '[Иртнĕ] dddd LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', sameElse: 'L' }, relativeTime : { future : function (output) { - var affix = /сехет$/i.exec(output) ? 'рен' : /çул$/i.exec(output) ? 'тан' : 'ран'; + var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран'; return output + affix; }, past : '%s каялла', - s : 'пĕр-ик çеккунт', - m : 'пĕр минут', + s : 'пӗр-ик ҫеккунт', + m : 'пӗр минут', mm : '%d минут', - h : 'пĕр сехет', + h : 'пӗр сехет', hh : '%d сехет', - d : 'пĕр кун', + d : 'пӗр кун', dd : '%d кун', - M : 'пĕр уйăх', - MM : '%d уйăх', - y : 'пĕр çул', - yy : '%d çул' + M : 'пӗр уйӑх', + MM : '%d уйӑх', + y : 'пӗр ҫул', + yy : '%d ҫул' }, - ordinalParse: /\d{1,2}-мĕш/, - ordinal : '%d-мĕш', + ordinalParse: /\d{1,2}-мӗш/, + ordinal : '%d-мӗш', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 1st is the first week of the year. } }); - diff --git a/www/lib/moment/src/locale/es.js b/www/lib/moment/src/locale/es.js index bcad0481..c9ea1f5e 100644 --- a/www/lib/moment/src/locale/es.js +++ b/www/lib/moment/src/locale/es.js @@ -4,11 +4,11 @@ import moment from '../moment'; -var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), - monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); +var monthsShortDot = 'Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.'.split('_'), + monthsShort = 'Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Sep_Oct_Nov_Dic'.split('_'); export default moment.defineLocale('es', { - months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + months : 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'), monthsShort : function (m, format) { if (/-MMM-/.test(format)) { return monthsShort[m.month()]; @@ -16,8 +16,8 @@ export default moment.defineLocale('es', { return monthsShortDot[m.month()]; } }, - weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), - weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdays : 'Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado'.split('_'), + weekdaysShort : 'Dom._Lun._Mar._Mié._Jue._Vie._Sáb.'.split('_'), weekdaysMin : 'Do_Lu_Ma_Mi_Ju_Vi_Sá'.split('_'), longDateFormat : { LT : 'H:mm', diff --git a/www/lib/moment/src/locale/hr.js b/www/lib/moment/src/locale/hr.js index 76708440..eab62dfb 100644 --- a/www/lib/moment/src/locale/hr.js +++ b/www/lib/moment/src/locale/hr.js @@ -58,8 +58,8 @@ function translate(number, withoutSuffix, key) { } export default moment.defineLocale('hr', { - months : 'sječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_'), - monthsShort : 'sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), + months : 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_'), + monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), diff --git a/www/lib/moment/src/locale/jv.js b/www/lib/moment/src/locale/jv.js new file mode 100644 index 00000000..b5401a0a --- /dev/null +++ b/www/lib/moment/src/locale/jv.js @@ -0,0 +1,73 @@ +//! moment.js locale configuration +//! locale : Boso Jowo (jv) +//! author : Rony Lantip : https://github.com/lantip +//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa + +import moment from '../moment'; + +export default moment.defineLocale('jv', { + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'LT.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] LT', + LLLL : 'dddd, D MMMM YYYY [pukul] LT' + }, + meridiemParse: /enjing|siyang|sonten|ndalu/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'enjing') { + return hour; + } else if (meridiem === 'siyang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'enjing'; + } else if (hours < 15) { + return 'siyang'; + } else if (hours < 19) { + return 'sonten'; + } else { + return 'ndalu'; + } + }, + calendar : { + sameDay : '[Dinten puniko pukul] LT', + nextDay : '[Mbenjang pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kala wingi pukul] LT', + lastWeek : 'dddd [kepengker pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'wonten ing %s', + past : '%s ingkang kepengker', + s : 'sawetawis detik', + m : 'setunggal menit', + mm : '%d menit', + h : 'setunggal jam', + hh : '%d jam', + d : 'sedinten', + dd : '%d dinten', + M : 'sewulan', + MM : '%d wulan', + y : 'setaun', + yy : '%d taun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 1st is the first week of the year. + } +}); diff --git a/www/lib/moment/src/locale/lv.js b/www/lib/moment/src/locale/lv.js index 0506c851..b37cb5cf 100644 --- a/www/lib/moment/src/locale/lv.js +++ b/www/lib/moment/src/locale/lv.js @@ -1,27 +1,44 @@ //! moment.js locale configuration //! locale : latvian (lv) //! author : Kristaps Karlsons : https://github.com/skakri +//! author : Jānis Elmeris : https://github.com/JanisE import moment from '../moment'; var units = { - 'mm': 'minūti_minūtes_minūte_minūtes', - 'hh': 'stundu_stundas_stunda_stundas', - 'dd': 'dienu_dienas_diena_dienas', - 'MM': 'mēnesi_mēnešus_mēnesis_mēneši', - 'yy': 'gadu_gadus_gads_gadi' + 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'h': 'stundas_stundām_stunda_stundas'.split('_'), + 'hh': 'stundas_stundām_stunda_stundas'.split('_'), + 'd': 'dienas_dienām_diena_dienas'.split('_'), + 'dd': 'dienas_dienām_diena_dienas'.split('_'), + 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'y': 'gada_gadiem_gads_gadi'.split('_'), + 'yy': 'gada_gadiem_gads_gadi'.split('_') }; -function format(word, number, withoutSuffix) { - var forms = word.split('_'); +/** + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. + */ +function format(forms, number, withoutSuffix) { if (withoutSuffix) { + // E.g. "21 minūte", "3 minūtes". return number % 10 === 1 && number !== 11 ? forms[2] : forms[3]; } else { + // E.g. "21 minūtes" as in "pēc 21 minūtes". + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". return number % 10 === 1 && number !== 11 ? forms[0] : forms[1]; } } function relativeTimeWithPlural(number, withoutSuffix, key) { return number + ' ' + format(units[key], number, withoutSuffix); } +function relativeTimeWithSingular(number, withoutSuffix, key) { + return format(units[key], number, withoutSuffix); +} +function relativeSeconds(number, withoutSuffix) { + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; +} export default moment.defineLocale('lv', { months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), @@ -32,7 +49,7 @@ export default moment.defineLocale('lv', { longDateFormat : { LT : 'HH:mm', LTS : 'LT:ss', - L : 'DD.MM.YYYY', + L : 'DD.MM.YYYY.', LL : 'YYYY. [gada] D. MMMM', LLL : 'YYYY. [gada] D. MMMM, LT', LLLL : 'YYYY. [gada] D. MMMM, dddd, LT' @@ -46,18 +63,18 @@ export default moment.defineLocale('lv', { sameElse : 'L' }, relativeTime : { - future : '%s vēlāk', - past : '%s agrāk', - s : 'dažas sekundes', - m : 'minūti', + future : 'pēc %s', + past : 'pirms %s', + s : relativeSeconds, + m : relativeTimeWithSingular, mm : relativeTimeWithPlural, - h : 'stundu', + h : relativeTimeWithSingular, hh : relativeTimeWithPlural, - d : 'dienu', + d : relativeTimeWithSingular, dd : relativeTimeWithPlural, - M : 'mēnesi', + M : relativeTimeWithSingular, MM : relativeTimeWithPlural, - y : 'gadu', + y : relativeTimeWithSingular, yy : relativeTimeWithPlural }, ordinalParse: /\d{1,2}\./, diff --git a/www/lib/moment/src/locale/me.js b/www/lib/moment/src/locale/me.js new file mode 100644 index 00000000..2c356dab --- /dev/null +++ b/www/lib/moment/src/locale/me.js @@ -0,0 +1,99 @@ +//! moment.js locale configuration +//! locale : Montenegrin (me) +//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac + +import moment from '../moment'; + +var translator = { + words: { //Different grammatical cases + m: ['jedan minut', 'jednog minuta'], + mm: ['minut', 'minuta', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mjesec', 'mjeseca', 'mjeseci'], + yy: ['godina', 'godine', 'godina'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator.correctGrammaticalCase(number, wordKey); + } + } +}; + +export default moment.defineLocale('me', { + months: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'], + monthsShort: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'], + weekdays: ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], + weekdaysShort: ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], + weekdaysMin: ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], + longDateFormat: { + LT: 'H:mm', + LTS : 'LT:ss', + L: 'DD. MM. YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY LT', + LLLL: 'dddd, D. MMMM YYYY LT' + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sjutra u] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[juče u] LT', + lastWeek : function () { + var lastWeekDays = [ + '[prošle] [nedjelje] [u] LT', + '[prošlog] [ponedjeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srijede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'nekoliko sekundi', + m : translator.translate, + mm : translator.translate, + h : translator.translate, + hh : translator.translate, + d : 'dan', + dd : translator.translate, + M : 'mjesec', + MM : translator.translate, + y : 'godinu', + yy : translator.translate + }, + ordinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 1st is the first week of the year. + } +}); diff --git a/www/lib/moment/src/locale/my.js b/www/lib/moment/src/locale/my.js index 20d76dac..54af1400 100644 --- a/www/lib/moment/src/locale/my.js +++ b/www/lib/moment/src/locale/my.js @@ -32,8 +32,9 @@ export default moment.defineLocale('my', { months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'), - weekdaysShort: 'နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), - weekdaysMin: 'နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', diff --git a/www/lib/moment/src/locale/pl.js b/www/lib/moment/src/locale/pl.js index a50011f4..e458ea5a 100644 --- a/www/lib/moment/src/locale/pl.js +++ b/www/lib/moment/src/locale/pl.js @@ -29,7 +29,12 @@ function translate(number, withoutSuffix, key) { export default moment.defineLocale('pl', { months : function (momentToFormat, format) { - if (/D MMMM/.test(format)) { + if (format === '') { + // Hack: if format empty we know this is used to generate + // RegExp by moment. Give then back both valid forms of months + // in RegExp ready format. + return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')'; + } else if (/D MMMM/.test(format)) { return monthsSubjective[momentToFormat.month()]; } else { return monthsNominative[momentToFormat.month()]; @@ -88,4 +93,3 @@ export default moment.defineLocale('pl', { doy : 4 // The week that contains Jan 4th is the first week of the year. } }); - diff --git a/www/lib/moment/src/locale/pt-br.js b/www/lib/moment/src/locale/pt-br.js index f57cfeb4..e08e8470 100644 --- a/www/lib/moment/src/locale/pt-br.js +++ b/www/lib/moment/src/locale/pt-br.js @@ -5,11 +5,11 @@ import moment from '../moment'; export default 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 : 'dom_2ª_3ª_4ª_5ª_6ª_sáb'.split('_'), + 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 : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'LT:ss', diff --git a/www/lib/moment/src/locale/pt.js b/www/lib/moment/src/locale/pt.js index 3cd97b74..71e37c69 100644 --- a/www/lib/moment/src/locale/pt.js +++ b/www/lib/moment/src/locale/pt.js @@ -5,11 +5,11 @@ import moment from '../moment'; export default moment.defineLocale('pt', { - 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 : 'dom_2ª_3ª_4ª_5ª_6ª_sáb'.split('_'), + 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 : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'LT:ss', diff --git a/www/lib/moment/src/locale/si.js b/www/lib/moment/src/locale/si.js new file mode 100644 index 00000000..0f03b636 --- /dev/null +++ b/www/lib/moment/src/locale/si.js @@ -0,0 +1,56 @@ +//! moment.js locale configuration +//! locale : Sinhalese (si) +//! author : Sampath Sitinamaluwa : https://github.com/sampathsris + +import moment from '../moment'; + +/*jshint -W100*/ +export default moment.defineLocale('si', { + months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'), + monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'), + weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'), + weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'), + weekdaysMin : 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'), + longDateFormat : { + LT : 'a h:mm', + LTS : 'a h:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY MMMM D', + LLL : 'YYYY MMMM D, LT', + LLLL : 'YYYY MMMM D [වැනි] dddd, LTS' + }, + calendar : { + sameDay : '[අද] LT[ට]', + nextDay : '[හෙට] LT[ට]', + nextWeek : 'dddd LT[ට]', + lastDay : '[ඊයේ] LT[ට]', + lastWeek : '[පසුගිය] dddd LT[ට]', + sameElse : 'L' + }, + relativeTime : { + future : '%sකින්', + past : '%sකට පෙර', + s : 'තත්පර කිහිපය', + m : 'මිනිත්තුව', + mm : 'මිනිත්තු %d', + h : 'පැය', + hh : 'පැය %d', + d : 'දිනය', + dd : 'දින %d', + M : 'මාසය', + MM : 'මාස %d', + y : 'වසර', + yy : 'වසර %d' + }, + ordinalParse: /\d{1,2} වැනි/, + ordinal : function (number) { + return number + ' වැනි'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'ප.ව.' : 'පස් වරු'; + } else { + return isLower ? 'පෙ.ව.' : 'පෙර වරු'; + } + } +}); diff --git a/www/lib/moment/src/locale/sl.js b/www/lib/moment/src/locale/sl.js index a4b486de..e5723389 100644 --- a/www/lib/moment/src/locale/sl.js +++ b/www/lib/moment/src/locale/sl.js @@ -4,62 +4,72 @@ import moment from '../moment'; -function translate(number, withoutSuffix, key) { +function processRelativeTime(number, withoutSuffix, key, isFuture) { var result = number + ' '; switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; case 'm': return withoutSuffix ? 'ena minuta' : 'eno minuto'; case 'mm': if (number === 1) { - result += 'minuta'; + result += withoutSuffix ? 'minuta' : 'minuto'; } else if (number === 2) { - result += 'minuti'; - } else if (number === 3 || number === 4) { - result += 'minute'; + result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'minute' : 'minutami'; } else { - result += 'minut'; + result += withoutSuffix || isFuture ? 'minut' : 'minutami'; } return result; case 'h': return withoutSuffix ? 'ena ura' : 'eno uro'; case 'hh': if (number === 1) { - result += 'ura'; + result += withoutSuffix ? 'ura' : 'uro'; } else if (number === 2) { - result += 'uri'; - } else if (number === 3 || number === 4) { - result += 'ure'; + result += withoutSuffix || isFuture ? 'uri' : 'urama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'ure' : 'urami'; } else { - result += 'ur'; + result += withoutSuffix || isFuture ? 'ur' : 'urami'; } return result; + case 'd': + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; case 'dd': if (number === 1) { - result += 'dan'; + result += withoutSuffix || isFuture ? 'dan' : 'dnem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; } else { - result += 'dni'; + result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; } return result; + case 'M': + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; case 'MM': if (number === 1) { - result += 'mesec'; + result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; } else if (number === 2) { - result += 'meseca'; - } else if (number === 3 || number === 4) { - result += 'mesece'; + result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; } else { - result += 'mesecev'; + result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; } return result; + case 'y': + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; case 'yy': if (number === 1) { - result += 'leto'; + result += withoutSuffix || isFuture ? 'leto' : 'letom'; } else if (number === 2) { - result += 'leti'; - } else if (number === 3 || number === 4) { - result += 'leta'; + result += withoutSuffix || isFuture ? 'leti' : 'letoma'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'leta' : 'leti'; } else { - result += 'let'; + result += withoutSuffix || isFuture ? 'let' : 'leti'; } return result; } @@ -82,6 +92,7 @@ export default moment.defineLocale('sl', { calendar : { sameDay : '[danes ob] LT', nextDay : '[jutri ob] LT', + nextWeek : function () { switch (this.day()) { case 0: @@ -101,9 +112,11 @@ export default moment.defineLocale('sl', { lastWeek : function () { switch (this.day()) { case 0: + return '[prejšnjo] [nedeljo] [ob] LT'; case 3: + return '[prejšnjo] [sredo] [ob] LT'; case 6: - return '[prejšnja] dddd [ob] LT'; + return '[prejšnjo] [soboto] [ob] LT'; case 1: case 2: case 4: @@ -115,18 +128,18 @@ export default moment.defineLocale('sl', { }, relativeTime : { future : 'čez %s', - past : '%s nazaj', - s : 'nekaj sekund', - m : translate, - mm : translate, - h : translate, - hh : translate, - d : 'en dan', - dd : translate, - M : 'en mesec', - MM : translate, - y : 'eno leto', - yy : translate + past : 'pred %s', + s : processRelativeTime, + m : processRelativeTime, + mm : processRelativeTime, + h : processRelativeTime, + hh : processRelativeTime, + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime }, ordinalParse: /\d{1,2}\./, ordinal : '%d.', @@ -135,4 +148,3 @@ export default moment.defineLocale('sl', { doy : 7 // The week that contains Jan 1st is the first week of the year. } }); - diff --git a/www/lib/moment/src/locale/sv.js b/www/lib/moment/src/locale/sv.js index bec21e94..6fc1c268 100644 --- a/www/lib/moment/src/locale/sv.js +++ b/www/lib/moment/src/locale/sv.js @@ -22,8 +22,8 @@ export default moment.defineLocale('sv', { sameDay: '[Idag] LT', nextDay: '[Imorgon] LT', lastDay: '[Igår] LT', - nextWeek: 'dddd LT', - lastWeek: '[Förra] dddd[en] LT', + nextWeek: '[På] dddd LT', + lastWeek: '[I] dddd[s] LT', sameElse: 'L' }, relativeTime : { diff --git a/www/lib/moment/src/locale/zh-cn.js b/www/lib/moment/src/locale/zh-cn.js index 3dcea9da..dfc0d049 100644 --- a/www/lib/moment/src/locale/zh-cn.js +++ b/www/lib/moment/src/locale/zh-cn.js @@ -12,7 +12,7 @@ export default moment.defineLocale('zh-cn', { weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'), weekdaysMin : '日_一_二_三_四_五_六'.split('_'), longDateFormat : { - LT : 'Ah点mm', + LT : 'Ah点mm分', LTS : 'Ah点m分s秒', L : 'YYYY-MM-DD', LL : 'YYYY年MMMD日', @@ -98,16 +98,16 @@ export default moment.defineLocale('zh-cn', { future : '%s内', past : '%s前', s : '几秒', - m : '1分钟', - mm : '%d分钟', - h : '1小时', - hh : '%d小时', - d : '1天', - dd : '%d天', - M : '1个月', - MM : '%d个月', - y : '1年', - yy : '%d年' + m : '1 分钟', + mm : '%d 分钟', + h : '1 小时', + hh : '%d 小时', + d : '1 天', + dd : '%d 天', + M : '1 个月', + MM : '%d 个月', + y : '1 年', + yy : '%d 年' }, week : { // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 diff --git a/www/lib/moment/src/locale/zh-tw.js b/www/lib/moment/src/locale/zh-tw.js index 2f2c0432..918700ae 100644 --- a/www/lib/moment/src/locale/zh-tw.js +++ b/www/lib/moment/src/locale/zh-tw.js @@ -11,7 +11,7 @@ export default moment.defineLocale('zh-tw', { weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), weekdaysMin : '日_一_二_三_四_五_六'.split('_'), longDateFormat : { - LT : 'Ah點mm', + LT : 'Ah點mm分', LTS : 'Ah點m分s秒', L : 'YYYY年MMMD日', LL : 'YYYY年MMMD日', @@ -89,4 +89,3 @@ export default moment.defineLocale('zh-tw', { yy : '%d年' } }); - |
