Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lt.js 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. //! moment.js locale configuration
  2. //! locale : Lithuanian [lt]
  3. //! author : Mindaugas Mozūras : https://github.com/mmozuras
  4. import moment from '../moment';
  5. var units = {
  6. ss: 'sekundė_sekundžių_sekundes',
  7. m: 'minutė_minutės_minutę',
  8. mm: 'minutės_minučių_minutes',
  9. h: 'valanda_valandos_valandą',
  10. hh: 'valandos_valandų_valandas',
  11. d: 'diena_dienos_dieną',
  12. dd: 'dienos_dienų_dienas',
  13. M: 'mėnuo_mėnesio_mėnesį',
  14. MM: 'mėnesiai_mėnesių_mėnesius',
  15. y: 'metai_metų_metus',
  16. yy: 'metai_metų_metus',
  17. };
  18. function translateSeconds(number, withoutSuffix, key, isFuture) {
  19. if (withoutSuffix) {
  20. return 'kelios sekundės';
  21. } else {
  22. return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
  23. }
  24. }
  25. function translateSingular(number, withoutSuffix, key, isFuture) {
  26. return withoutSuffix
  27. ? forms(key)[0]
  28. : isFuture
  29. ? forms(key)[1]
  30. : forms(key)[2];
  31. }
  32. function special(number) {
  33. return number % 10 === 0 || (number > 10 && number < 20);
  34. }
  35. function forms(key) {
  36. return units[key].split('_');
  37. }
  38. function translate(number, withoutSuffix, key, isFuture) {
  39. var result = number + ' ';
  40. if (number === 1) {
  41. return (
  42. result + translateSingular(number, withoutSuffix, key[0], isFuture)
  43. );
  44. } else if (withoutSuffix) {
  45. return result + (special(number) ? forms(key)[1] : forms(key)[0]);
  46. } else {
  47. if (isFuture) {
  48. return result + forms(key)[1];
  49. } else {
  50. return result + (special(number) ? forms(key)[1] : forms(key)[2]);
  51. }
  52. }
  53. }
  54. export default moment.defineLocale('lt', {
  55. months: {
  56. format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
  57. '_'
  58. ),
  59. standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
  60. '_'
  61. ),
  62. isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
  63. },
  64. monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
  65. weekdays: {
  66. format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
  67. '_'
  68. ),
  69. standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
  70. '_'
  71. ),
  72. isFormat: /dddd HH:mm/,
  73. },
  74. weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
  75. weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
  76. weekdaysParseExact: true,
  77. longDateFormat: {
  78. LT: 'HH:mm',
  79. LTS: 'HH:mm:ss',
  80. L: 'YYYY-MM-DD',
  81. LL: 'YYYY [m.] MMMM D [d.]',
  82. LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  83. LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
  84. l: 'YYYY-MM-DD',
  85. ll: 'YYYY [m.] MMMM D [d.]',
  86. lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  87. llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
  88. },
  89. calendar: {
  90. sameDay: '[Šiandien] LT',
  91. nextDay: '[Rytoj] LT',
  92. nextWeek: 'dddd LT',
  93. lastDay: '[Vakar] LT',
  94. lastWeek: '[Praėjusį] dddd LT',
  95. sameElse: 'L',
  96. },
  97. relativeTime: {
  98. future: 'po %s',
  99. past: 'prieš %s',
  100. s: translateSeconds,
  101. ss: translate,
  102. m: translateSingular,
  103. mm: translate,
  104. h: translateSingular,
  105. hh: translate,
  106. d: translateSingular,
  107. dd: translate,
  108. M: translateSingular,
  109. MM: translate,
  110. y: translateSingular,
  111. yy: translate,
  112. },
  113. dayOfMonthOrdinalParse: /\d{1,2}-oji/,
  114. ordinal: function (number) {
  115. return number + '-oji';
  116. },
  117. week: {
  118. dow: 1, // Monday is the first day of the week.
  119. doy: 4, // The week that contains Jan 4th is the first week of the year.
  120. },
  121. });