Code Duplication    Length = 119-125 lines in 3 locations

rainloop/v/0.0.0/app/localization/moment/ta.js 1 location

@@ 5-129 (lines=125) @@
2
//! locale : Tamil [ta]
3
//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
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 symbolMap = {
14
        '1': '௧',
15
        '2': '௨',
16
        '3': '௩',
17
        '4': '௪',
18
        '5': '௫',
19
        '6': '௬',
20
        '7': '௭',
21
        '8': '௮',
22
        '9': '௯',
23
        '0': '௦'
24
    }, numberMap = {
25
        '௧': '1',
26
        '௨': '2',
27
        '௩': '3',
28
        '௪': '4',
29
        '௫': '5',
30
        '௬': '6',
31
        '௭': '7',
32
        '௮': '8',
33
        '௯': '9',
34
        '௦': '0'
35
    };
36
37
    var ta = moment.defineLocale('ta', {
38
        months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
39
        monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
40
        weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),
41
        weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),
42
        weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
43
        longDateFormat : {
44
            LT : 'HH:mm',
45
            LTS : 'HH:mm:ss',
46
            L : 'DD/MM/YYYY',
47
            LL : 'D MMMM YYYY',
48
            LLL : 'D MMMM YYYY, HH:mm',
49
            LLLL : 'dddd, D MMMM YYYY, HH:mm'
50
        },
51
        calendar : {
52
            sameDay : '[இன்று] LT',
53
            nextDay : '[நாளை] LT',
54
            nextWeek : 'dddd, LT',
55
            lastDay : '[நேற்று] LT',
56
            lastWeek : '[கடந்த வாரம்] dddd, LT',
57
            sameElse : 'L'
58
        },
59
        relativeTime : {
60
            future : '%s இல்',
61
            past : '%s முன்',
62
            s : 'ஒரு சில விநாடிகள்',
63
            m : 'ஒரு நிமிடம்',
64
            mm : '%d நிமிடங்கள்',
65
            h : 'ஒரு மணி நேரம்',
66
            hh : '%d மணி நேரம்',
67
            d : 'ஒரு நாள்',
68
            dd : '%d நாட்கள்',
69
            M : 'ஒரு மாதம்',
70
            MM : '%d மாதங்கள்',
71
            y : 'ஒரு வருடம்',
72
            yy : '%d ஆண்டுகள்'
73
        },
74
        ordinalParse: /\d{1,2}வது/,
75
        ordinal : function (number) {
76
            return number + 'வது';
77
        },
78
        preparse: function (string) {
79
            return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
80
                return numberMap[match];
81
            });
82
        },
83
        postformat: function (string) {
84
            return string.replace(/\d/g, function (match) {
85
                return symbolMap[match];
86
            });
87
        },
88
        // refer http://ta.wikipedia.org/s/1er1
89
        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
90
        meridiem : function (hour, minute, isLower) {
91
            if (hour < 2) {
92
                return ' யாமம்';
93
            } else if (hour < 6) {
94
                return ' வைகறை';  // வைகறை
95
            } else if (hour < 10) {
96
                return ' காலை'; // காலை
97
            } else if (hour < 14) {
98
                return ' நண்பகல்'; // நண்பகல்
99
            } else if (hour < 18) {
100
                return ' எற்பாடு'; // எற்பாடு
101
            } else if (hour < 22) {
102
                return ' மாலை'; // மாலை
103
            } else {
104
                return ' யாமம்';
105
            }
106
        },
107
        meridiemHour : function (hour, meridiem) {
108
            if (hour === 12) {
109
                hour = 0;
110
            }
111
            if (meridiem === 'யாமம்') {
112
                return hour < 2 ? hour : hour + 12;
113
            } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
114
                return hour;
115
            } else if (meridiem === 'நண்பகல்') {
116
                return hour >= 10 ? hour : hour + 12;
117
            } else {
118
                return hour + 12;
119
            }
120
        },
121
        week : {
122
            dow : 0, // Sunday is the first day of the week.
123
            doy : 6  // The week that contains Jan 1st is the first week of the year.
124
        }
125
    });
126
127
    return ta;
128
129
}));

rainloop/v/0.0.0/app/localization/moment/hi.js 1 location

@@ 5-124 (lines=120) @@
2
//! locale : Hindi [hi]
3
//! author : Mayank Singhal : https://github.com/mayanksinghal
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 symbolMap = {
14
        '1': '१',
15
        '2': '२',
16
        '3': '३',
17
        '4': '४',
18
        '5': '५',
19
        '6': '६',
20
        '7': '७',
21
        '8': '८',
22
        '9': '९',
23
        '0': '०'
24
    },
25
    numberMap = {
26
        '१': '1',
27
        '२': '2',
28
        '३': '3',
29
        '४': '4',
30
        '५': '5',
31
        '६': '6',
32
        '७': '7',
33
        '८': '8',
34
        '९': '9',
35
        '०': '0'
36
    };
37
38
    var hi = moment.defineLocale('hi', {
39
        months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
40
        monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
41
        monthsParseExact: true,
42
        weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
43
        weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
44
        weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),
45
        longDateFormat : {
46
            LT : 'A h:mm बजे',
47
            LTS : 'A h:mm:ss बजे',
48
            L : 'DD/MM/YYYY',
49
            LL : 'D MMMM YYYY',
50
            LLL : 'D MMMM YYYY, A h:mm बजे',
51
            LLLL : 'dddd, D MMMM YYYY, A h:mm बजे'
52
        },
53
        calendar : {
54
            sameDay : '[आज] LT',
55
            nextDay : '[कल] LT',
56
            nextWeek : 'dddd, LT',
57
            lastDay : '[कल] LT',
58
            lastWeek : '[पिछले] dddd, LT',
59
            sameElse : 'L'
60
        },
61
        relativeTime : {
62
            future : '%s में',
63
            past : '%s पहले',
64
            s : 'कुछ ही क्षण',
65
            m : 'एक मिनट',
66
            mm : '%d मिनट',
67
            h : 'एक घंटा',
68
            hh : '%d घंटे',
69
            d : 'एक दिन',
70
            dd : '%d दिन',
71
            M : 'एक महीने',
72
            MM : '%d महीने',
73
            y : 'एक वर्ष',
74
            yy : '%d वर्ष'
75
        },
76
        preparse: function (string) {
77
            return string.replace(/[१२३४५६७८९०]/g, function (match) {
78
                return numberMap[match];
79
            });
80
        },
81
        postformat: function (string) {
82
            return string.replace(/\d/g, function (match) {
83
                return symbolMap[match];
84
            });
85
        },
86
        // Hindi notation for meridiems are quite fuzzy in practice. While there exists
87
        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
88
        meridiemParse: /रात|सुबह|दोपहर|शाम/,
89
        meridiemHour : function (hour, meridiem) {
90
            if (hour === 12) {
91
                hour = 0;
92
            }
93
            if (meridiem === 'रात') {
94
                return hour < 4 ? hour : hour + 12;
95
            } else if (meridiem === 'सुबह') {
96
                return hour;
97
            } else if (meridiem === 'दोपहर') {
98
                return hour >= 10 ? hour : hour + 12;
99
            } else if (meridiem === 'शाम') {
100
                return hour + 12;
101
            }
102
        },
103
        meridiem : function (hour, minute, isLower) {
104
            if (hour < 4) {
105
                return 'रात';
106
            } else if (hour < 10) {
107
                return 'सुबह';
108
            } else if (hour < 17) {
109
                return 'दोपहर';
110
            } else if (hour < 20) {
111
                return 'शाम';
112
            } else {
113
                return 'रात';
114
            }
115
        },
116
        week : {
117
            dow : 0, // Sunday is the first day of the week.
118
            doy : 6  // The week that contains Jan 1st is the first week of the year.
119
        }
120
    });
121
122
    return hi;
123
124
}));

rainloop/v/0.0.0/app/localization/moment/ne.js 1 location

@@ 5-123 (lines=119) @@
2
//! locale : Nepalese [ne]
3
//! author : suvash : https://github.com/suvash
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 symbolMap = {
14
        '1': '१',
15
        '2': '२',
16
        '3': '३',
17
        '4': '४',
18
        '5': '५',
19
        '6': '६',
20
        '7': '७',
21
        '8': '८',
22
        '9': '९',
23
        '0': '०'
24
    },
25
    numberMap = {
26
        '१': '1',
27
        '२': '2',
28
        '३': '3',
29
        '४': '4',
30
        '५': '5',
31
        '६': '6',
32
        '७': '7',
33
        '८': '8',
34
        '९': '9',
35
        '०': '0'
36
    };
37
38
    var ne = moment.defineLocale('ne', {
39
        months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),
40
        monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),
41
        monthsParseExact : true,
42
        weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),
43
        weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
44
        weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
45
        weekdaysParseExact : true,
46
        longDateFormat : {
47
            LT : 'Aको h:mm बजे',
48
            LTS : 'Aको h:mm:ss बजे',
49
            L : 'DD/MM/YYYY',
50
            LL : 'D MMMM YYYY',
51
            LLL : 'D MMMM YYYY, Aको h:mm बजे',
52
            LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे'
53
        },
54
        preparse: function (string) {
55
            return string.replace(/[१२३४५६७८९०]/g, function (match) {
56
                return numberMap[match];
57
            });
58
        },
59
        postformat: function (string) {
60
            return string.replace(/\d/g, function (match) {
61
                return symbolMap[match];
62
            });
63
        },
64
        meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
65
        meridiemHour : function (hour, meridiem) {
66
            if (hour === 12) {
67
                hour = 0;
68
            }
69
            if (meridiem === 'राति') {
70
                return hour < 4 ? hour : hour + 12;
71
            } else if (meridiem === 'बिहान') {
72
                return hour;
73
            } else if (meridiem === 'दिउँसो') {
74
                return hour >= 10 ? hour : hour + 12;
75
            } else if (meridiem === 'साँझ') {
76
                return hour + 12;
77
            }
78
        },
79
        meridiem : function (hour, minute, isLower) {
80
            if (hour < 3) {
81
                return 'राति';
82
            } else if (hour < 12) {
83
                return 'बिहान';
84
            } else if (hour < 16) {
85
                return 'दिउँसो';
86
            } else if (hour < 20) {
87
                return 'साँझ';
88
            } else {
89
                return 'राति';
90
            }
91
        },
92
        calendar : {
93
            sameDay : '[आज] LT',
94
            nextDay : '[भोलि] LT',
95
            nextWeek : '[आउँदो] dddd[,] LT',
96
            lastDay : '[हिजो] LT',
97
            lastWeek : '[गएको] dddd[,] LT',
98
            sameElse : 'L'
99
        },
100
        relativeTime : {
101
            future : '%sमा',
102
            past : '%s अगाडि',
103
            s : 'केही क्षण',
104
            m : 'एक मिनेट',
105
            mm : '%d मिनेट',
106
            h : 'एक घण्टा',
107
            hh : '%d घण्टा',
108
            d : 'एक दिन',
109
            dd : '%d दिन',
110
            M : 'एक महिना',
111
            MM : '%d महिना',
112
            y : 'एक बर्ष',
113
            yy : '%d बर्ष'
114
        },
115
        week : {
116
            dow : 0, // Sunday is the first day of the week.
117
            doy : 6  // The week that contains Jan 1st is the first week of the year.
118
        }
119
    });
120
121
    return ne;
122
123
}));