Skip to content

Commit

Permalink
Also put build locales in locale/
Browse files Browse the repository at this point in the history
  • Loading branch information
ichernev committed Mar 25, 2015
1 parent 1fe7f76 commit 446cee8
Show file tree
Hide file tree
Showing 81 changed files with 1,228 additions and 1,290 deletions.
29 changes: 15 additions & 14 deletions locale/af.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
// moment.js locale configuration
// locale : afrikaans (af)
// author : Werner Mollentze : https://github.com/wernerm
//! moment.js locale configuration
//! locale : afrikaans (af)
//! author : Werner Mollentze : https://github.com/wernerm

(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
return moment.defineLocale('af', {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';


var af = moment.defineLocale('af', {
months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),
monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),
Expand Down Expand Up @@ -68,4 +66,7 @@
doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
}
});
}));

return af;

}));
31 changes: 16 additions & 15 deletions locale/ar-ma.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
// moment.js locale configuration
// locale : Moroccan Arabic (ar-ma)
// author : ElFadili Yassine : https://github.com/ElFadiliY
// author : Abdel Said : https://github.com/abdelsaid
//! moment.js locale configuration
//! locale : Moroccan Arabic (ar-ma)
//! author : ElFadili Yassine : https://github.com/ElFadiliY
//! author : Abdel Said : https://github.com/abdelsaid

(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
return moment.defineLocale('ar-ma', {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';


var ar_ma = moment.defineLocale('ar-ma', {
months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
Expand Down Expand Up @@ -54,4 +52,7 @@
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

return ar_ma;

}));
29 changes: 15 additions & 14 deletions locale/ar-sa.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// moment.js locale configuration
// locale : Arabic Saudi Arabia (ar-sa)
// author : Suhail Alkowaileet : https://github.com/xsoh
//! moment.js locale configuration
//! locale : Arabic Saudi Arabia (ar-sa)
//! author : Suhail Alkowaileet : https://github.com/xsoh

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';


(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
var symbolMap = {
'1': '١',
'2': '٢',
Expand All @@ -35,7 +33,7 @@
'٠': '0'
};

return moment.defineLocale('ar-sa', {
var ar_sa = moment.defineLocale('ar-sa', {
months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
Expand Down Expand Up @@ -98,4 +96,7 @@
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

return ar_sa;

}));
27 changes: 14 additions & 13 deletions locale/ar-tn.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// moment.js locale configuration
// locale : Tunisian Arabic (ar-tn)
//! moment.js locale configuration
//! locale : Tunisian Arabic (ar-tn)

(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
return moment.defineLocale('ar-tn', {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';


var ar_tn = moment.defineLocale('ar-tn', {
months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
Expand Down Expand Up @@ -52,4 +50,7 @@
doy: 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

return ar_tn;

}));
33 changes: 17 additions & 16 deletions locale/ar.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
// moment.js locale configuration
// Locale: Arabic (ar)
// Author: Abdel Said: https://github.com/abdelsaid
// Changes in months, weekdays: Ahmed Elkhatib
// Native plural forms: forabi https://github.com/forabi
//! moment.js locale configuration
//! Locale: Arabic (ar)
//! Author: Abdel Said: https://github.com/abdelsaid
//! Changes in months, weekdays: Ahmed Elkhatib
//! Native plural forms: forabi https://github.com/forabi

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';


(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
var symbolMap = {
'1': '١',
'2': '٢',
Expand Down Expand Up @@ -68,7 +66,7 @@
'كانون الأول ديسمبر'
];

return moment.defineLocale('ar', {
var ar = moment.defineLocale('ar', {
months : months,
monthsShort : months,
weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
Expand Down Expand Up @@ -131,4 +129,7 @@
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

return ar;

}));
36 changes: 16 additions & 20 deletions locale/az.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
// moment.js locale configuration
// locale : azerbaijani (az)
// author : topchiyev : https://github.com/topchiyev
//! moment.js locale configuration
//! locale : azerbaijani (az)
//! author : topchiyev : https://github.com/topchiyev

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';


(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
var suffixes = {
1: '-inci',
5: '-inci',
8: '-inci',
70: '-inci',
80: '-inci',

2: '-nci',
7: '-nci',
20: '-nci',
50: '-nci',

3: '-üncü',
4: '-üncü',
100: '-üncü',

6: '-ncı',

9: '-uncu',
10: '-uncu',
30: '-uncu',

60: '-ıncı',
90: '-ıncı'
};
return moment.defineLocale('az', {

var az = moment.defineLocale('az', {
months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),
monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),
Expand Down Expand Up @@ -96,12 +90,14 @@
var a = number % 10,
b = number % 100 - a,
c = number >= 100 ? 100 : null;

return number + (suffixes[a] || suffixes[b] || suffixes[c]);
},
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.
}
});
}));

return az;

}));
42 changes: 17 additions & 25 deletions locale/be.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
// moment.js locale configuration
// locale : belarusian (be)
// author : Dmitry Demidov : https://github.com/demidov91
// author: Praleska: http:https://praleska.pro/
// Author : Menelion Elensúle : https://github.com/Oire
//! moment.js locale configuration
//! locale : belarusian (be)
//! author : Dmitry Demidov : https://github.com/demidov91
//! author: Praleska: http:https://praleska.pro/
//! Author : Menelion Elensúle : https://github.com/Oire

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';


(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}

function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
Expand All @@ -36,34 +33,28 @@
return number + ' ' + plural(format[key], +number);
}
}

function monthsCaseReplace(m, format) {
var months = {
'nominative': 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_'),
'accusative': 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_')
},

nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
'accusative' :
'nominative';

return months[nounCase][m.month()];
}

function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),
'accusative': 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_')
},

nounCase = (/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/).test(format) ?
'accusative' :
'nominative';

return weekdays[nounCase][m.day()];
}

return moment.defineLocale('be', {
var be = moment.defineLocale('be', {
months : monthsCaseReplace,
monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
weekdays : weekdaysCaseReplace,
Expand Down Expand Up @@ -129,7 +120,6 @@
return 'вечара';
}
},

ordinalParse: /\d{1,2}-(і|ы|га)/,
ordinal: function (number, period) {
switch (period) {
Expand All @@ -145,10 +135,12 @@
return number;
}
},

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.
}
});
}));

return be;

}));
Loading

0 comments on commit 446cee8

Please sign in to comment.