diff options
author | James D. Forrester <jforrester@wikimedia.org> | 2016-09-13 11:24:47 -0700 |
---|---|---|
committer | Roan Kattouw <roan.kattouw@gmail.com> | 2017-02-08 20:17:46 +0000 |
commit | f13a0d952187d89e565c0551bd1bf147931ece38 (patch) | |
tree | 01190509d5b86a47a8e510e10324110d813167fa /resources/lib/moment/locale/hr.js | |
parent | 263168d3ae058f0ecd9d9ef50f3cb1e64cf2fc6b (diff) | |
download | mediawikicore-f13a0d952187d89e565c0551bd1bf147931ece38.tar.gz mediawikicore-f13a0d952187d89e565c0551bd1bf147931ece38.zip |
resources: Bump moment.js from 2.8.4 to 2.15.0
Languages and locales now with support:
* aeb-arab
* dv
* fy
* gd
* jv
* kk-cyrl
* ky
* lo
* ms
* pa
* se
* si
* ss
* sw
* te
* zh-hk
Skipped languages because we don't support them in MW:
* ar-ly
* en-ie
* en-nz
* es-do
* fr-ch
* me
* tlh
* tzl
Change-Id: I7f89569c6ee6640d368af1378e84c5a9e725da0d
Diffstat (limited to 'resources/lib/moment/locale/hr.js')
-rw-r--r-- | resources/lib/moment/locale/hr.js | 186 |
1 files changed, 94 insertions, 92 deletions
diff --git a/resources/lib/moment/locale/hr.js b/resources/lib/moment/locale/hr.js index be9d785e3abd..a3a9be04a217 100644 --- a/resources/lib/moment/locale/hr.js +++ b/resources/lib/moment/locale/hr.js @@ -1,119 +1,118 @@ -// moment.js locale configuration -// locale : hrvatski (hr) -// author : Bojan Marković : https://github.com/bmarkovic +//! moment.js locale configuration +//! locale : Croatian [hr] +//! author : Bojan Marković : https://github.com/bmarkovic + +;(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'; -// based on (sl) translation by Robert Sedovšek -(function (factory) { - // Comment out broken wrapper, see T145382 - /*if (typeof define === 'function' && define.amd) { - define(['moment'], factory); // AMD - } else if (typeof exports === 'object') { - module.exports = factory(require('../moment')); // Node - } else { - factory((typeof global !== 'undefined' ? global : this).moment); // node or other global - }*/ - factory(this.moment); -}(function (moment) { function translate(number, withoutSuffix, key) { var result = number + ' '; switch (key) { - case 'm': - return withoutSuffix ? 'jedna minuta' : 'jedne minute'; - case 'mm': - if (number === 1) { - result += 'minuta'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'minute'; - } else { - result += 'minuta'; - } - return result; - case 'h': - return withoutSuffix ? 'jedan sat' : 'jednog sata'; - case 'hh': - if (number === 1) { - result += 'sat'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'sata'; - } else { - result += 'sati'; - } - return result; - case 'dd': - if (number === 1) { - result += 'dan'; - } else { - result += 'dana'; - } - return result; - case 'MM': - if (number === 1) { - result += 'mjesec'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'mjeseca'; - } else { - result += 'mjeseci'; - } - return result; - case 'yy': - if (number === 1) { - result += 'godina'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'godine'; - } else { - result += 'godina'; - } - return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; } } - return 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('_'), + var hr = moment.defineLocale('hr', { + months : { + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'), + standalone: '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('_'), + monthsParseExact: true, 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('_'), + weekdaysParseExact : true, longDateFormat : { LT : 'H:mm', - LTS : 'LT:ss', - L : 'DD. MM. YYYY', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY LT', - LLLL : 'dddd, D. MMMM YYYY LT' + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' }, calendar : { sameDay : '[danas u] LT', nextDay : '[sutra 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'; + 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čer u] LT', lastWeek : function () { switch (this.day()) { - case 0: - case 3: - return '[prošlu] dddd [u] LT'; - case 6: - return '[prošle] [subote] [u] LT'; - case 1: - case 2: - case 4: - case 5: - return '[prošli] dddd [u] LT'; + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; } }, sameElse : 'L' @@ -140,4 +139,7 @@ doy : 7 // The week that contains Jan 1st is the first week of the year. } }); -})); + + return hr; + +}));
\ No newline at end of file |