aboutsummaryrefslogtreecommitdiffstats
path: root/library/moment/src/locale/me.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-11-18 23:50:42 +0100
committerMario Vavti <mario@mariovavti.com>2015-11-18 23:50:42 +0100
commite4145deeb7a72ac321113fde672e1b499ecb0d2d (patch)
treece2fb59fd9d2ec1d13ea0960215967600098ca13 /library/moment/src/locale/me.js
parent68da4d90dcbda1240ae014768a66a164fd5d2b36 (diff)
downloadvolse-hubzilla-e4145deeb7a72ac321113fde672e1b499ecb0d2d.tar.gz
volse-hubzilla-e4145deeb7a72ac321113fde672e1b499ecb0d2d.tar.bz2
volse-hubzilla-e4145deeb7a72ac321113fde672e1b499ecb0d2d.zip
some events refacturing
Diffstat (limited to 'library/moment/src/locale/me.js')
-rw-r--r--library/moment/src/locale/me.js99
1 files changed, 99 insertions, 0 deletions
diff --git a/library/moment/src/locale/me.js b/library/moment/src/locale/me.js
new file mode 100644
index 000000000..a50965858
--- /dev/null
+++ b/library/moment/src/locale/me.js
@@ -0,0 +1,99 @@
+//! moment.js locale configuration
+//! locale : Montenegrin (me)
+//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
+
+import moment from '../moment';
+
+var translator = {
+ words: { //Different grammatical cases
+ m: ['jedan minut', 'jednog minuta'],
+ mm: ['minut', 'minuta', 'minuta'],
+ h: ['jedan sat', 'jednog sata'],
+ hh: ['sat', 'sata', 'sati'],
+ dd: ['dan', 'dana', 'dana'],
+ MM: ['mjesec', 'mjeseca', 'mjeseci'],
+ yy: ['godina', 'godine', 'godina']
+ },
+ correctGrammaticalCase: function (number, wordKey) {
+ return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
+ },
+ translate: function (number, withoutSuffix, key) {
+ var wordKey = translator.words[key];
+ if (key.length === 1) {
+ return withoutSuffix ? wordKey[0] : wordKey[1];
+ } else {
+ return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
+ }
+ }
+};
+
+export default moment.defineLocale('me', {
+ months: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'],
+ monthsShort: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'],
+ weekdays: ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'],
+ weekdaysShort: ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'],
+ weekdaysMin: ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'],
+ longDateFormat: {
+ LT: 'H:mm',
+ LTS : 'H:mm:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm'
+ },
+ calendar: {
+ sameDay: '[danas u] LT',
+ nextDay: '[sjutra 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';
+ }
+ },
+ lastDay : '[juče u] LT',
+ lastWeek : function () {
+ var lastWeekDays = [
+ '[prošle] [nedjelje] [u] LT',
+ '[prošlog] [ponedjeljka] [u] LT',
+ '[prošlog] [utorka] [u] LT',
+ '[prošle] [srijede] [u] LT',
+ '[prošlog] [četvrtka] [u] LT',
+ '[prošlog] [petka] [u] LT',
+ '[prošle] [subote] [u] LT'
+ ];
+ return lastWeekDays[this.day()];
+ },
+ sameElse : 'L'
+ },
+ relativeTime : {
+ future : 'za %s',
+ past : 'prije %s',
+ s : 'nekoliko sekundi',
+ m : translator.translate,
+ mm : translator.translate,
+ h : translator.translate,
+ hh : translator.translate,
+ d : 'dan',
+ dd : translator.translate,
+ M : 'mjesec',
+ MM : translator.translate,
+ y : 'godinu',
+ yy : translator.translate
+ },
+ ordinalParse: /\d{1,2}\./,
+ ordinal : '%d.',
+ week : {
+ dow : 1, // Monday is the first day of the week.
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
+ }
+});