[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Summary view] [Print] [Text view]
1 // moment.js locale configuration 2 // locale : hungarian (hu) 3 // author : Adam Brunner : https://github.com/adambrunner 4 5 (function (factory) { 6 if (typeof define === 'function' && define.amd) { 7 define(['moment'], factory); // AMD 8 } else if (typeof exports === 'object') { 9 module.exports = factory(require('../moment')); // Node 10 } else { 11 factory(window.moment); // Browser global 12 } 13 }(function (moment) { 14 var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); 15 16 function translate(number, withoutSuffix, key, isFuture) { 17 var num = number, 18 suffix; 19 20 switch (key) { 21 case 's': 22 return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; 23 case 'm': 24 return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); 25 case 'mm': 26 return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); 27 case 'h': 28 return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); 29 case 'hh': 30 return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); 31 case 'd': 32 return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); 33 case 'dd': 34 return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); 35 case 'M': 36 return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); 37 case 'MM': 38 return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); 39 case 'y': 40 return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); 41 case 'yy': 42 return num + (isFuture || withoutSuffix ? ' év' : ' éve'); 43 } 44 45 return ''; 46 } 47 48 function week(isFuture) { 49 return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]'; 50 } 51 52 return moment.defineLocale('hu', { 53 months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), 54 monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), 55 weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), 56 weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), 57 weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), 58 longDateFormat : { 59 LT : 'H:mm', 60 L : 'YYYY.MM.DD.', 61 LL : 'YYYY. MMMM D.', 62 LLL : 'YYYY. MMMM D., LT', 63 LLLL : 'YYYY. MMMM D., dddd LT' 64 }, 65 meridiem : function (hours, minutes, isLower) { 66 if (hours < 12) { 67 return isLower === true ? 'de' : 'DE'; 68 } else { 69 return isLower === true ? 'du' : 'DU'; 70 } 71 }, 72 calendar : { 73 sameDay : '[ma] LT[-kor]', 74 nextDay : '[holnap] LT[-kor]', 75 nextWeek : function () { 76 return week.call(this, true); 77 }, 78 lastDay : '[tegnap] LT[-kor]', 79 lastWeek : function () { 80 return week.call(this, false); 81 }, 82 sameElse : 'L' 83 }, 84 relativeTime : { 85 future : '%s múlva', 86 past : '%s', 87 s : translate, 88 m : translate, 89 mm : translate, 90 h : translate, 91 hh : translate, 92 d : translate, 93 dd : translate, 94 M : translate, 95 MM : translate, 96 y : translate, 97 yy : translate 98 }, 99 ordinal : '%d.', 100 week : { 101 dow : 1, // Monday is the first day of the week. 102 doy : 7 // The week that contains Jan 1st is the first week of the year. 103 } 104 }); 105 }));
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |