corrade-nucleus-nucleons – Blame information for rev 10
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
10 | office | 1 | //! moment.js locale configuration |
2 | //! locale : Klingon [tlh] |
||
3 | //! author : Dominika Kruk : https://github.com/amaranthrose |
||
4 | |||
5 | ;(function (global, factory) { |
||
6 | typeof exports === 'object' && typeof module !== 'undefined' |
||
7 | && typeof require === 'function' ? factory(require('../moment')) : |
||
8 | typeof define === 'function' && define.amd ? define(['../moment'], factory) : |
||
9 | factory(global.moment) |
||
10 | }(this, (function (moment) { 'use strict'; |
||
11 | |||
12 | |||
13 | var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); |
||
14 | |||
15 | function translateFuture(output) { |
||
16 | var time = output; |
||
17 | time = (output.indexOf('jaj') !== -1) ? |
||
18 | time.slice(0, -3) + 'leS' : |
||
19 | (output.indexOf('jar') !== -1) ? |
||
20 | time.slice(0, -3) + 'waQ' : |
||
21 | (output.indexOf('DIS') !== -1) ? |
||
22 | time.slice(0, -3) + 'nem' : |
||
23 | time + ' pIq'; |
||
24 | return time; |
||
25 | } |
||
26 | |||
27 | function translatePast(output) { |
||
28 | var time = output; |
||
29 | time = (output.indexOf('jaj') !== -1) ? |
||
30 | time.slice(0, -3) + 'Hu’' : |
||
31 | (output.indexOf('jar') !== -1) ? |
||
32 | time.slice(0, -3) + 'wen' : |
||
33 | (output.indexOf('DIS') !== -1) ? |
||
34 | time.slice(0, -3) + 'ben' : |
||
35 | time + ' ret'; |
||
36 | return time; |
||
37 | } |
||
38 | |||
39 | function translate(number, withoutSuffix, string, isFuture) { |
||
40 | var numberNoun = numberAsNoun(number); |
||
41 | switch (string) { |
||
42 | case 'mm': |
||
43 | return numberNoun + ' tup'; |
||
44 | case 'hh': |
||
45 | return numberNoun + ' rep'; |
||
46 | case 'dd': |
||
47 | return numberNoun + ' jaj'; |
||
48 | case 'MM': |
||
49 | return numberNoun + ' jar'; |
||
50 | case 'yy': |
||
51 | return numberNoun + ' DIS'; |
||
52 | } |
||
53 | } |
||
54 | |||
55 | function numberAsNoun(number) { |
||
56 | var hundred = Math.floor((number % 1000) / 100), |
||
57 | ten = Math.floor((number % 100) / 10), |
||
58 | one = number % 10, |
||
59 | word = ''; |
||
60 | if (hundred > 0) { |
||
61 | word += numbersNouns[hundred] + 'vatlh'; |
||
62 | } |
||
63 | if (ten > 0) { |
||
64 | word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH'; |
||
65 | } |
||
66 | if (one > 0) { |
||
67 | word += ((word !== '') ? ' ' : '') + numbersNouns[one]; |
||
68 | } |
||
69 | return (word === '') ? 'pagh' : word; |
||
70 | } |
||
71 | |||
72 | var tlh = moment.defineLocale('tlh', { |
||
73 | months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'), |
||
74 | monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'), |
||
75 | monthsParseExact : true, |
||
76 | weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), |
||
77 | weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), |
||
78 | weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), |
||
79 | longDateFormat : { |
||
80 | LT : 'HH:mm', |
||
81 | LTS : 'HH:mm:ss', |
||
82 | L : 'DD.MM.YYYY', |
||
83 | LL : 'D MMMM YYYY', |
||
84 | LLL : 'D MMMM YYYY HH:mm', |
||
85 | LLLL : 'dddd, D MMMM YYYY HH:mm' |
||
86 | }, |
||
87 | calendar : { |
||
88 | sameDay: '[DaHjaj] LT', |
||
89 | nextDay: '[wa’leS] LT', |
||
90 | nextWeek: 'LLL', |
||
91 | lastDay: '[wa’Hu’] LT', |
||
92 | lastWeek: 'LLL', |
||
93 | sameElse: 'L' |
||
94 | }, |
||
95 | relativeTime : { |
||
96 | future : translateFuture, |
||
97 | past : translatePast, |
||
98 | s : 'puS lup', |
||
99 | m : 'wa’ tup', |
||
100 | mm : translate, |
||
101 | h : 'wa’ rep', |
||
102 | hh : translate, |
||
103 | d : 'wa’ jaj', |
||
104 | dd : translate, |
||
105 | M : 'wa’ jar', |
||
106 | MM : translate, |
||
107 | y : 'wa’ DIS', |
||
108 | yy : translate |
||
109 | }, |
||
110 | dayOfMonthOrdinalParse: /\d{1,2}\./, |
||
111 | ordinal : '%d.', |
||
112 | week : { |
||
113 | dow : 1, // Monday is the first day of the week. |
||
114 | doy : 4 // The week that contains Jan 4th is the first week of the year. |
||
115 | } |
||
116 | }); |
||
117 | |||
118 | return tlh; |
||
119 | |||
120 | }))); |