2016-02-05 15:42:48 -05:00
//! moment.js locale configuration
2020-11-10 20:34:26 -05:00
//! locale : Klingon [tlh]
//! author : Dominika Kruk : https://github.com/amaranthrose
2016-02-05 15:42:48 -05:00
; ( function ( global , factory ) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory ( require ( '../moment' ) ) :
2017-04-20 00:24:20 -04:00
typeof define === 'function' && define . amd ? define ( [ '../moment' ] , factory ) :
2016-02-05 15:42:48 -05:00
factory ( global . moment )
2017-04-20 00:24:20 -04:00
} ( this , ( function ( moment ) { 'use strict' ;
2016-02-05 15:42:48 -05:00
2020-11-10 20:34:26 -05:00
//! moment.js locale configuration
2016-02-05 15:42:48 -05:00
2018-04-26 03:15:53 -04:00
var numbersNouns = 'pagh_wa’ _cha’ _wej_loS_vagh_jav_Soch_chorgh_Hut' . split ( '_' ) ;
2016-02-05 15:42:48 -05:00
2018-04-26 03:15:53 -04:00
function translateFuture ( output ) {
var time = output ;
2020-11-10 20:34:26 -05:00
time =
output . indexOf ( 'jaj' ) !== - 1
? time . slice ( 0 , - 3 ) + 'leS'
: output . indexOf ( 'jar' ) !== - 1
? time . slice ( 0 , - 3 ) + 'waQ'
: output . indexOf ( 'DIS' ) !== - 1
? time . slice ( 0 , - 3 ) + 'nem'
: time + ' pIq' ;
2018-04-26 03:15:53 -04:00
return time ;
2016-02-05 15:42:48 -05:00
}
2018-04-26 03:15:53 -04:00
function translatePast ( output ) {
var time = output ;
2020-11-10 20:34:26 -05:00
time =
output . indexOf ( 'jaj' ) !== - 1
? time . slice ( 0 , - 3 ) + 'Hu’ '
: output . indexOf ( 'jar' ) !== - 1
? time . slice ( 0 , - 3 ) + 'wen'
: output . indexOf ( 'DIS' ) !== - 1
? time . slice ( 0 , - 3 ) + 'ben'
: time + ' ret' ;
2018-04-26 03:15:53 -04:00
return time ;
2016-02-05 15:42:48 -05:00
}
2018-04-26 03:15:53 -04:00
function translate ( number , withoutSuffix , string , isFuture ) {
var numberNoun = numberAsNoun ( number ) ;
switch ( string ) {
case 'ss' :
return numberNoun + ' lup' ;
case 'mm' :
return numberNoun + ' tup' ;
case 'hh' :
return numberNoun + ' rep' ;
case 'dd' :
return numberNoun + ' jaj' ;
case 'MM' :
return numberNoun + ' jar' ;
case 'yy' :
return numberNoun + ' DIS' ;
}
2017-04-20 00:24:20 -04:00
}
2016-02-05 15:42:48 -05:00
2018-04-26 03:15:53 -04:00
function numberAsNoun ( number ) {
var hundred = Math . floor ( ( number % 1000 ) / 100 ) ,
2020-11-10 20:34:26 -05:00
ten = Math . floor ( ( number % 100 ) / 10 ) ,
one = number % 10 ,
word = '' ;
2018-04-26 03:15:53 -04:00
if ( hundred > 0 ) {
word += numbersNouns [ hundred ] + 'vatlh' ;
}
if ( ten > 0 ) {
2020-11-10 20:34:26 -05:00
word += ( word !== '' ? ' ' : '' ) + numbersNouns [ ten ] + 'maH' ;
2018-04-26 03:15:53 -04:00
}
if ( one > 0 ) {
2020-11-10 20:34:26 -05:00
word += ( word !== '' ? ' ' : '' ) + numbersNouns [ one ] ;
2018-04-26 03:15:53 -04:00
}
2020-11-10 20:34:26 -05:00
return word === '' ? 'pagh' : word ;
2017-04-20 00:24:20 -04:00
}
2016-02-05 15:42:48 -05:00
2018-04-26 03:15:53 -04:00
var tlh = moment . defineLocale ( 'tlh' , {
2020-11-10 20:34:26 -05:00
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 (
'_'
) ,
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 (
'_'
) ,
monthsParseExact : true ,
weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj' . split (
'_'
) ,
weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj' . split (
'_'
) ,
weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj' . split (
'_'
) ,
longDateFormat : {
LT : 'HH:mm' ,
LTS : 'HH:mm:ss' ,
L : 'DD.MM.YYYY' ,
LL : 'D MMMM YYYY' ,
LLL : 'D MMMM YYYY HH:mm' ,
LLLL : 'dddd, D MMMM YYYY HH:mm' ,
2018-04-26 03:15:53 -04:00
} ,
2020-11-10 20:34:26 -05:00
calendar : {
2018-04-26 03:15:53 -04:00
sameDay : '[DaHjaj] LT' ,
nextDay : '[wa’ leS] LT' ,
nextWeek : 'LLL' ,
lastDay : '[wa’ Hu’ ] LT' ,
lastWeek : 'LLL' ,
2020-11-10 20:34:26 -05:00
sameElse : 'L' ,
2018-04-26 03:15:53 -04:00
} ,
2020-11-10 20:34:26 -05:00
relativeTime : {
future : translateFuture ,
past : translatePast ,
s : 'puS lup' ,
ss : translate ,
m : 'wa’ tup' ,
mm : translate ,
h : 'wa’ rep' ,
hh : translate ,
d : 'wa’ jaj' ,
dd : translate ,
M : 'wa’ jar' ,
MM : translate ,
y : 'wa’ DIS' ,
yy : translate ,
2018-04-26 03:15:53 -04:00
} ,
dayOfMonthOrdinalParse : /\d{1,2}\./ ,
2020-11-10 20:34:26 -05:00
ordinal : '%d.' ,
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.
} ,
2018-04-26 03:15:53 -04:00
} ) ;
return tlh ;
2016-02-05 15:42:48 -05:00
2017-04-20 00:24:20 -04:00
} ) ) ) ;