ember-rails-i18n 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +339 -0
  5. data/README.md +64 -0
  6. data/Rakefile +1 -0
  7. data/ember-rails-i18n.gemspec +26 -0
  8. data/lib/ember-rails-i18n.rb +15 -0
  9. data/lib/ember-rails-i18n/helper.rb +29 -0
  10. data/lib/ember-rails-i18n/version.rb +3 -0
  11. data/lib/javascripts/moment.js +2489 -0
  12. data/lib/javascripts/moment_locale/ar-ma.js +56 -0
  13. data/lib/javascripts/moment_locale/ar.js +56 -0
  14. data/lib/javascripts/moment_locale/bg.js +86 -0
  15. data/lib/javascripts/moment_locale/br.js +107 -0
  16. data/lib/javascripts/moment_locale/bs.js +139 -0
  17. data/lib/javascripts/moment_locale/ca.js +66 -0
  18. data/lib/javascripts/moment_locale/cs.js +155 -0
  19. data/lib/javascripts/moment_locale/cv.js +59 -0
  20. data/lib/javascripts/moment_locale/cy.js +77 -0
  21. data/lib/javascripts/moment_locale/da.js +56 -0
  22. data/lib/javascripts/moment_locale/de.js +71 -0
  23. data/lib/javascripts/moment_locale/el.js +79 -0
  24. data/lib/javascripts/moment_locale/en-au.js +62 -0
  25. data/lib/javascripts/moment_locale/en-ca.js +59 -0
  26. data/lib/javascripts/moment_locale/en-gb.js +63 -0
  27. data/lib/javascripts/moment_locale/eo.js +65 -0
  28. data/lib/javascripts/moment_locale/es.js +75 -0
  29. data/lib/javascripts/moment_locale/et.js +76 -0
  30. data/lib/javascripts/moment_locale/eu.js +60 -0
  31. data/lib/javascripts/moment_locale/fa.js +97 -0
  32. data/lib/javascripts/moment_locale/fi.js +103 -0
  33. data/lib/javascripts/moment_locale/fo.js +56 -0
  34. data/lib/javascripts/moment_locale/fr-ca.js +54 -0
  35. data/lib/javascripts/moment_locale/fr.js +58 -0
  36. data/lib/javascripts/moment_locale/gl.js +71 -0
  37. data/lib/javascripts/moment_locale/he.js +77 -0
  38. data/lib/javascripts/moment_locale/hi.js +105 -0
  39. data/lib/javascripts/moment_locale/hr.js +140 -0
  40. data/lib/javascripts/moment_locale/hu.js +105 -0
  41. data/lib/javascripts/moment_locale/hy-am.js +113 -0
  42. data/lib/javascripts/moment_locale/id.js +67 -0
  43. data/lib/javascripts/moment_locale/is.js +124 -0
  44. data/lib/javascripts/moment_locale/it.js +59 -0
  45. data/lib/javascripts/moment_locale/ja.js +58 -0
  46. data/lib/javascripts/moment_locale/ka.js +108 -0
  47. data/lib/javascripts/moment_locale/km.js +55 -0
  48. data/lib/javascripts/moment_locale/ko.js +63 -0
  49. data/lib/javascripts/moment_locale/lb.js +160 -0
  50. data/lib/javascripts/moment_locale/lt.js +118 -0
  51. data/lib/javascripts/moment_locale/lv.js +77 -0
  52. data/lib/javascripts/moment_locale/mk.js +86 -0
  53. data/lib/javascripts/moment_locale/ml.js +64 -0
  54. data/lib/javascripts/moment_locale/mr.js +104 -0
  55. data/lib/javascripts/moment_locale/ms-my.js +66 -0
  56. data/lib/javascripts/moment_locale/nb.js +57 -0
  57. data/lib/javascripts/moment_locale/ne.js +105 -0
  58. data/lib/javascripts/moment_locale/nl.js +67 -0
  59. data/lib/javascripts/moment_locale/nn.js +56 -0
  60. data/lib/javascripts/moment_locale/pl.js +98 -0
  61. data/lib/javascripts/moment_locale/pt-br.js +56 -0
  62. data/lib/javascripts/moment_locale/pt.js +60 -0
  63. data/lib/javascripts/moment_locale/ro.js +72 -0
  64. data/lib/javascripts/moment_locale/ru.js +163 -0
  65. data/lib/javascripts/moment_locale/sk.js +156 -0
  66. data/lib/javascripts/moment_locale/sl.js +144 -0
  67. data/lib/javascripts/moment_locale/sq.js +61 -0
  68. data/lib/javascripts/moment_locale/sr-cyr.js +106 -0
  69. data/lib/javascripts/moment_locale/sr.js +106 -0
  70. data/lib/javascripts/moment_locale/sv.js +63 -0
  71. data/lib/javascripts/moment_locale/ta.js +112 -0
  72. data/lib/javascripts/moment_locale/th.js +58 -0
  73. data/lib/javascripts/moment_locale/tl-ph.js +58 -0
  74. data/lib/javascripts/moment_locale/tr.js +93 -0
  75. data/lib/javascripts/moment_locale/tzm-la.js +55 -0
  76. data/lib/javascripts/moment_locale/tzm.js +55 -0
  77. data/lib/javascripts/moment_locale/uk.js +157 -0
  78. data/lib/javascripts/moment_locale/uz.js +55 -0
  79. data/lib/javascripts/moment_locale/vi.js +62 -0
  80. data/lib/javascripts/moment_locale/zh-cn.js +108 -0
  81. data/lib/javascripts/moment_locale/zh-tw.js +84 -0
  82. data/vendor/assets/javascripts/locales/i18n.js +598 -0
  83. data/vendor/assets/javascripts/locales/test.js.erb +3 -0
  84. metadata +182 -0
@@ -0,0 +1,105 @@
1
+ // moment.js language configuration
2
+ // language : hindi (hi)
3
+ // author : Mayank Singhal : https://github.com/mayanksinghal
4
+
5
+ (function (factory) {
6
+ if (typeof define === 'function' && define.amd) {
7
+ define(['moment'], factory); // AMD
8
+ } else if (typeof exports === 'object') {
9
+ module.exports = factory(require('../moment')); // Node
10
+ } else {
11
+ factory(window.moment); // Browser global
12
+ }
13
+ }(function (moment) {
14
+ var symbolMap = {
15
+ '1': '१',
16
+ '2': '२',
17
+ '3': '३',
18
+ '4': '४',
19
+ '5': '५',
20
+ '6': '६',
21
+ '7': '७',
22
+ '8': '८',
23
+ '9': '९',
24
+ '0': '०'
25
+ },
26
+ numberMap = {
27
+ '१': '1',
28
+ '२': '2',
29
+ '३': '3',
30
+ '४': '4',
31
+ '५': '5',
32
+ '६': '6',
33
+ '७': '7',
34
+ '८': '8',
35
+ '९': '9',
36
+ '०': '0'
37
+ };
38
+
39
+ return moment.lang('hi', {
40
+ months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split("_"),
41
+ monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split("_"),
42
+ weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split("_"),
43
+ weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split("_"),
44
+ weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split("_"),
45
+ longDateFormat : {
46
+ LT : "A h:mm बजे",
47
+ L : "DD/MM/YYYY",
48
+ LL : "D MMMM YYYY",
49
+ LLL : "D MMMM YYYY, LT",
50
+ LLLL : "dddd, D MMMM YYYY, LT"
51
+ },
52
+ calendar : {
53
+ sameDay : '[आज] LT',
54
+ nextDay : '[कल] LT',
55
+ nextWeek : 'dddd, LT',
56
+ lastDay : '[कल] LT',
57
+ lastWeek : '[पिछले] dddd, LT',
58
+ sameElse : 'L'
59
+ },
60
+ relativeTime : {
61
+ future : "%s में",
62
+ past : "%s पहले",
63
+ s : "कुछ ही क्षण",
64
+ m : "एक मिनट",
65
+ mm : "%d मिनट",
66
+ h : "एक घंटा",
67
+ hh : "%d घंटे",
68
+ d : "एक दिन",
69
+ dd : "%d दिन",
70
+ M : "एक महीने",
71
+ MM : "%d महीने",
72
+ y : "एक वर्ष",
73
+ yy : "%d वर्ष"
74
+ },
75
+ preparse: function (string) {
76
+ return string.replace(/[१२३४५६७८९०]/g, function (match) {
77
+ return numberMap[match];
78
+ });
79
+ },
80
+ postformat: function (string) {
81
+ return string.replace(/\d/g, function (match) {
82
+ return symbolMap[match];
83
+ });
84
+ },
85
+ // Hindi notation for meridiems are quite fuzzy in practice. While there exists
86
+ // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
87
+ meridiem : function (hour, minute, isLower) {
88
+ if (hour < 4) {
89
+ return "रात";
90
+ } else if (hour < 10) {
91
+ return "सुबह";
92
+ } else if (hour < 17) {
93
+ return "दोपहर";
94
+ } else if (hour < 20) {
95
+ return "शाम";
96
+ } else {
97
+ return "रात";
98
+ }
99
+ },
100
+ week : {
101
+ dow : 0, // Sunday is the first day of the week.
102
+ doy : 6 // The week that contains Jan 1st is the first week of the year.
103
+ }
104
+ });
105
+ }));
@@ -0,0 +1,140 @@
1
+ // moment.js language configuration
2
+ // language : hrvatski (hr)
3
+ // author : Bojan Marković : https://github.com/bmarkovic
4
+
5
+ // based on (sl) translation by Robert Sedovšek
6
+
7
+ (function (factory) {
8
+ if (typeof define === 'function' && define.amd) {
9
+ define(['moment'], factory); // AMD
10
+ } else if (typeof exports === 'object') {
11
+ module.exports = factory(require('../moment')); // Node
12
+ } else {
13
+ factory(window.moment); // Browser global
14
+ }
15
+ }(function (moment) {
16
+
17
+ function translate(number, withoutSuffix, key) {
18
+ var result = number + " ";
19
+ switch (key) {
20
+ case 'm':
21
+ return withoutSuffix ? 'jedna minuta' : 'jedne minute';
22
+ case 'mm':
23
+ if (number === 1) {
24
+ result += 'minuta';
25
+ } else if (number === 2 || number === 3 || number === 4) {
26
+ result += 'minute';
27
+ } else {
28
+ result += 'minuta';
29
+ }
30
+ return result;
31
+ case 'h':
32
+ return withoutSuffix ? 'jedan sat' : 'jednog sata';
33
+ case 'hh':
34
+ if (number === 1) {
35
+ result += 'sat';
36
+ } else if (number === 2 || number === 3 || number === 4) {
37
+ result += 'sata';
38
+ } else {
39
+ result += 'sati';
40
+ }
41
+ return result;
42
+ case 'dd':
43
+ if (number === 1) {
44
+ result += 'dan';
45
+ } else {
46
+ result += 'dana';
47
+ }
48
+ return result;
49
+ case 'MM':
50
+ if (number === 1) {
51
+ result += 'mjesec';
52
+ } else if (number === 2 || number === 3 || number === 4) {
53
+ result += 'mjeseca';
54
+ } else {
55
+ result += 'mjeseci';
56
+ }
57
+ return result;
58
+ case 'yy':
59
+ if (number === 1) {
60
+ result += 'godina';
61
+ } else if (number === 2 || number === 3 || number === 4) {
62
+ result += 'godine';
63
+ } else {
64
+ result += 'godina';
65
+ }
66
+ return result;
67
+ }
68
+ }
69
+
70
+ return moment.lang('hr', {
71
+ months : "sječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),
72
+ monthsShort : "sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),
73
+ weekdays : "nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),
74
+ weekdaysShort : "ned._pon._uto._sri._čet._pet._sub.".split("_"),
75
+ weekdaysMin : "ne_po_ut_sr_če_pe_su".split("_"),
76
+ longDateFormat : {
77
+ LT : "H:mm",
78
+ L : "DD. MM. YYYY",
79
+ LL : "D. MMMM YYYY",
80
+ LLL : "D. MMMM YYYY LT",
81
+ LLLL : "dddd, D. MMMM YYYY LT"
82
+ },
83
+ calendar : {
84
+ sameDay : '[danas u] LT',
85
+ nextDay : '[sutra u] LT',
86
+
87
+ nextWeek : function () {
88
+ switch (this.day()) {
89
+ case 0:
90
+ return '[u] [nedjelju] [u] LT';
91
+ case 3:
92
+ return '[u] [srijedu] [u] LT';
93
+ case 6:
94
+ return '[u] [subotu] [u] LT';
95
+ case 1:
96
+ case 2:
97
+ case 4:
98
+ case 5:
99
+ return '[u] dddd [u] LT';
100
+ }
101
+ },
102
+ lastDay : '[jučer u] LT',
103
+ lastWeek : function () {
104
+ switch (this.day()) {
105
+ case 0:
106
+ case 3:
107
+ return '[prošlu] dddd [u] LT';
108
+ case 6:
109
+ return '[prošle] [subote] [u] LT';
110
+ case 1:
111
+ case 2:
112
+ case 4:
113
+ case 5:
114
+ return '[prošli] dddd [u] LT';
115
+ }
116
+ },
117
+ sameElse : 'L'
118
+ },
119
+ relativeTime : {
120
+ future : "za %s",
121
+ past : "prije %s",
122
+ s : "par sekundi",
123
+ m : translate,
124
+ mm : translate,
125
+ h : translate,
126
+ hh : translate,
127
+ d : "dan",
128
+ dd : translate,
129
+ M : "mjesec",
130
+ MM : translate,
131
+ y : "godinu",
132
+ yy : translate
133
+ },
134
+ ordinal : '%d.',
135
+ week : {
136
+ dow : 1, // Monday is the first day of the week.
137
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
138
+ }
139
+ });
140
+ }));
@@ -0,0 +1,105 @@
1
+ // moment.js language configuration
2
+ // language : hungarian (hu)
3
+ // author : Adam Brunner : https://github.com/adambrunner
4
+
5
+ (function (factory) {
6
+ if (typeof define === 'function' && define.amd) {
7
+ define(['moment'], factory); // AMD
8
+ } else if (typeof exports === 'object') {
9
+ module.exports = factory(require('../moment')); // Node
10
+ } else {
11
+ factory(window.moment); // Browser global
12
+ }
13
+ }(function (moment) {
14
+ var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
15
+
16
+ function translate(number, withoutSuffix, key, isFuture) {
17
+ var num = number,
18
+ suffix;
19
+
20
+ switch (key) {
21
+ case 's':
22
+ return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
23
+ case 'm':
24
+ return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
25
+ case 'mm':
26
+ return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
27
+ case 'h':
28
+ return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
29
+ case 'hh':
30
+ return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
31
+ case 'd':
32
+ return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
33
+ case 'dd':
34
+ return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
35
+ case 'M':
36
+ return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
37
+ case 'MM':
38
+ return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
39
+ case 'y':
40
+ return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
41
+ case 'yy':
42
+ return num + (isFuture || withoutSuffix ? ' év' : ' éve');
43
+ }
44
+
45
+ return '';
46
+ }
47
+
48
+ function week(isFuture) {
49
+ return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
50
+ }
51
+
52
+ return moment.lang('hu', {
53
+ months : "január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),
54
+ monthsShort : "jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),
55
+ weekdays : "vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),
56
+ weekdaysShort : "vas_hét_kedd_sze_csüt_pén_szo".split("_"),
57
+ weekdaysMin : "v_h_k_sze_cs_p_szo".split("_"),
58
+ longDateFormat : {
59
+ LT : "H:mm",
60
+ L : "YYYY.MM.DD.",
61
+ LL : "YYYY. MMMM D.",
62
+ LLL : "YYYY. MMMM D., LT",
63
+ LLLL : "YYYY. MMMM D., dddd LT"
64
+ },
65
+ meridiem : function (hours, minutes, isLower) {
66
+ if (hours < 12) {
67
+ return isLower === true ? 'de' : 'DE';
68
+ } else {
69
+ return isLower === true ? 'du' : 'DU';
70
+ }
71
+ },
72
+ calendar : {
73
+ sameDay : '[ma] LT[-kor]',
74
+ nextDay : '[holnap] LT[-kor]',
75
+ nextWeek : function () {
76
+ return week.call(this, true);
77
+ },
78
+ lastDay : '[tegnap] LT[-kor]',
79
+ lastWeek : function () {
80
+ return week.call(this, false);
81
+ },
82
+ sameElse : 'L'
83
+ },
84
+ relativeTime : {
85
+ future : "%s múlva",
86
+ past : "%s",
87
+ s : translate,
88
+ m : translate,
89
+ mm : translate,
90
+ h : translate,
91
+ hh : translate,
92
+ d : translate,
93
+ dd : translate,
94
+ M : translate,
95
+ MM : translate,
96
+ y : translate,
97
+ yy : translate
98
+ },
99
+ ordinal : '%d.',
100
+ week : {
101
+ dow : 1, // Monday is the first day of the week.
102
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
103
+ }
104
+ });
105
+ }));
@@ -0,0 +1,113 @@
1
+ // moment.js language configuration
2
+ // language : Armenian (hy-am)
3
+ // author : Armendarabyan : https://github.com/armendarabyan
4
+
5
+ (function (factory) {
6
+ if (typeof define === 'function' && define.amd) {
7
+ define(['moment'], factory); // AMD
8
+ } else if (typeof exports === 'object') {
9
+ module.exports = factory(require('../moment')); // Node
10
+ } else {
11
+ factory(window.moment); // Browser global
12
+ }
13
+ }(function (moment) {
14
+
15
+ function monthsCaseReplace(m, format) {
16
+ var months = {
17
+ 'nominative': 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_'),
18
+ 'accusative': 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_')
19
+ },
20
+
21
+ nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
22
+ 'accusative' :
23
+ 'nominative';
24
+
25
+ return months[nounCase][m.month()];
26
+ }
27
+
28
+ function monthsShortCaseReplace(m, format) {
29
+ var monthsShort = 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_');
30
+
31
+ return monthsShort[m.month()];
32
+ }
33
+
34
+ function weekdaysCaseReplace(m, format) {
35
+ var weekdays = 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_');
36
+
37
+ return weekdays[m.day()];
38
+ }
39
+
40
+ return moment.lang('hy-am', {
41
+ months : monthsCaseReplace,
42
+ monthsShort : monthsShortCaseReplace,
43
+ weekdays : weekdaysCaseReplace,
44
+ weekdaysShort : "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
45
+ weekdaysMin : "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
46
+ longDateFormat : {
47
+ LT : "HH:mm",
48
+ L : "DD.MM.YYYY",
49
+ LL : "D MMMM YYYY թ.",
50
+ LLL : "D MMMM YYYY թ., LT",
51
+ LLLL : "dddd, D MMMM YYYY թ., LT"
52
+ },
53
+ calendar : {
54
+ sameDay: '[այսօր] LT',
55
+ nextDay: '[վաղը] LT',
56
+ lastDay: '[երեկ] LT',
57
+ nextWeek: function () {
58
+ return 'dddd [օրը ժամը] LT';
59
+ },
60
+ lastWeek: function () {
61
+ return '[անցած] dddd [օրը ժամը] LT';
62
+ },
63
+ sameElse: 'L'
64
+ },
65
+ relativeTime : {
66
+ future : "%s հետո",
67
+ past : "%s առաջ",
68
+ s : "մի քանի վայրկյան",
69
+ m : "րոպե",
70
+ mm : "%d րոպե",
71
+ h : "ժամ",
72
+ hh : "%d ժամ",
73
+ d : "օր",
74
+ dd : "%d օր",
75
+ M : "ամիս",
76
+ MM : "%d ամիս",
77
+ y : "տարի",
78
+ yy : "%d տարի"
79
+ },
80
+
81
+ meridiem : function (hour) {
82
+ if (hour < 4) {
83
+ return "գիշերվա";
84
+ } else if (hour < 12) {
85
+ return "առավոտվա";
86
+ } else if (hour < 17) {
87
+ return "ցերեկվա";
88
+ } else {
89
+ return "երեկոյան";
90
+ }
91
+ },
92
+
93
+ ordinal: function (number, period) {
94
+ switch (period) {
95
+ case 'DDD':
96
+ case 'w':
97
+ case 'W':
98
+ case 'DDDo':
99
+ if (number === 1) {
100
+ return number + '-ին';
101
+ }
102
+ return number + '-րդ';
103
+ default:
104
+ return number;
105
+ }
106
+ },
107
+
108
+ week : {
109
+ dow : 1, // Monday is the first day of the week.
110
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
111
+ }
112
+ });
113
+ }));