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,156 @@
1
+ // moment.js language configuration
2
+ // language : slovak (sk)
3
+ // author : Martin Minka : https://github.com/k2s
4
+ // based on work of petrbela : https://github.com/petrbela
5
+
6
+ (function (factory) {
7
+ if (typeof define === 'function' && define.amd) {
8
+ define(['moment'], factory); // AMD
9
+ } else if (typeof exports === 'object') {
10
+ module.exports = factory(require('../moment')); // Node
11
+ } else {
12
+ factory(window.moment); // Browser global
13
+ }
14
+ }(function (moment) {
15
+ var months = "január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),
16
+ monthsShort = "jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");
17
+
18
+ function plural(n) {
19
+ return (n > 1) && (n < 5);
20
+ }
21
+
22
+ function translate(number, withoutSuffix, key, isFuture) {
23
+ var result = number + " ";
24
+ switch (key) {
25
+ case 's': // a few seconds / in a few seconds / a few seconds ago
26
+ return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
27
+ case 'm': // a minute / in a minute / a minute ago
28
+ return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
29
+ case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
30
+ if (withoutSuffix || isFuture) {
31
+ return result + (plural(number) ? 'minúty' : 'minút');
32
+ } else {
33
+ return result + 'minútami';
34
+ }
35
+ break;
36
+ case 'h': // an hour / in an hour / an hour ago
37
+ return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
38
+ case 'hh': // 9 hours / in 9 hours / 9 hours ago
39
+ if (withoutSuffix || isFuture) {
40
+ return result + (plural(number) ? 'hodiny' : 'hodín');
41
+ } else {
42
+ return result + 'hodinami';
43
+ }
44
+ break;
45
+ case 'd': // a day / in a day / a day ago
46
+ return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
47
+ case 'dd': // 9 days / in 9 days / 9 days ago
48
+ if (withoutSuffix || isFuture) {
49
+ return result + (plural(number) ? 'dni' : 'dní');
50
+ } else {
51
+ return result + 'dňami';
52
+ }
53
+ break;
54
+ case 'M': // a month / in a month / a month ago
55
+ return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
56
+ case 'MM': // 9 months / in 9 months / 9 months ago
57
+ if (withoutSuffix || isFuture) {
58
+ return result + (plural(number) ? 'mesiace' : 'mesiacov');
59
+ } else {
60
+ return result + 'mesiacmi';
61
+ }
62
+ break;
63
+ case 'y': // a year / in a year / a year ago
64
+ return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
65
+ case 'yy': // 9 years / in 9 years / 9 years ago
66
+ if (withoutSuffix || isFuture) {
67
+ return result + (plural(number) ? 'roky' : 'rokov');
68
+ } else {
69
+ return result + 'rokmi';
70
+ }
71
+ break;
72
+ }
73
+ }
74
+
75
+ return moment.lang('sk', {
76
+ months : months,
77
+ monthsShort : monthsShort,
78
+ monthsParse : (function (months, monthsShort) {
79
+ var i, _monthsParse = [];
80
+ for (i = 0; i < 12; i++) {
81
+ // use custom parser to solve problem with July (červenec)
82
+ _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
83
+ }
84
+ return _monthsParse;
85
+ }(months, monthsShort)),
86
+ weekdays : "nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),
87
+ weekdaysShort : "ne_po_ut_st_št_pi_so".split("_"),
88
+ weekdaysMin : "ne_po_ut_st_št_pi_so".split("_"),
89
+ longDateFormat : {
90
+ LT: "H:mm",
91
+ L : "DD.MM.YYYY",
92
+ LL : "D. MMMM YYYY",
93
+ LLL : "D. MMMM YYYY LT",
94
+ LLLL : "dddd D. MMMM YYYY LT"
95
+ },
96
+ calendar : {
97
+ sameDay: "[dnes o] LT",
98
+ nextDay: '[zajtra o] LT',
99
+ nextWeek: function () {
100
+ switch (this.day()) {
101
+ case 0:
102
+ return '[v nedeľu o] LT';
103
+ case 1:
104
+ case 2:
105
+ return '[v] dddd [o] LT';
106
+ case 3:
107
+ return '[v stredu o] LT';
108
+ case 4:
109
+ return '[vo štvrtok o] LT';
110
+ case 5:
111
+ return '[v piatok o] LT';
112
+ case 6:
113
+ return '[v sobotu o] LT';
114
+ }
115
+ },
116
+ lastDay: '[včera o] LT',
117
+ lastWeek: function () {
118
+ switch (this.day()) {
119
+ case 0:
120
+ return '[minulú nedeľu o] LT';
121
+ case 1:
122
+ case 2:
123
+ return '[minulý] dddd [o] LT';
124
+ case 3:
125
+ return '[minulú stredu o] LT';
126
+ case 4:
127
+ case 5:
128
+ return '[minulý] dddd [o] LT';
129
+ case 6:
130
+ return '[minulú sobotu o] LT';
131
+ }
132
+ },
133
+ sameElse: "L"
134
+ },
135
+ relativeTime : {
136
+ future : "za %s",
137
+ past : "pred %s",
138
+ s : translate,
139
+ m : translate,
140
+ mm : translate,
141
+ h : translate,
142
+ hh : translate,
143
+ d : translate,
144
+ dd : translate,
145
+ M : translate,
146
+ MM : translate,
147
+ y : translate,
148
+ yy : translate
149
+ },
150
+ ordinal : '%d.',
151
+ week : {
152
+ dow : 1, // Monday is the first day of the week.
153
+ doy : 4 // The week that contains Jan 4th is the first week of the year.
154
+ }
155
+ });
156
+ }));
@@ -0,0 +1,144 @@
1
+ // moment.js language configuration
2
+ // language : slovenian (sl)
3
+ // author : Robert Sedovšek : https://github.com/sedovsek
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
+ function translate(number, withoutSuffix, key) {
15
+ var result = number + " ";
16
+ switch (key) {
17
+ case 'm':
18
+ return withoutSuffix ? 'ena minuta' : 'eno minuto';
19
+ case 'mm':
20
+ if (number === 1) {
21
+ result += 'minuta';
22
+ } else if (number === 2) {
23
+ result += 'minuti';
24
+ } else if (number === 3 || number === 4) {
25
+ result += 'minute';
26
+ } else {
27
+ result += 'minut';
28
+ }
29
+ return result;
30
+ case 'h':
31
+ return withoutSuffix ? 'ena ura' : 'eno uro';
32
+ case 'hh':
33
+ if (number === 1) {
34
+ result += 'ura';
35
+ } else if (number === 2) {
36
+ result += 'uri';
37
+ } else if (number === 3 || number === 4) {
38
+ result += 'ure';
39
+ } else {
40
+ result += 'ur';
41
+ }
42
+ return result;
43
+ case 'dd':
44
+ if (number === 1) {
45
+ result += 'dan';
46
+ } else {
47
+ result += 'dni';
48
+ }
49
+ return result;
50
+ case 'MM':
51
+ if (number === 1) {
52
+ result += 'mesec';
53
+ } else if (number === 2) {
54
+ result += 'meseca';
55
+ } else if (number === 3 || number === 4) {
56
+ result += 'mesece';
57
+ } else {
58
+ result += 'mesecev';
59
+ }
60
+ return result;
61
+ case 'yy':
62
+ if (number === 1) {
63
+ result += 'leto';
64
+ } else if (number === 2) {
65
+ result += 'leti';
66
+ } else if (number === 3 || number === 4) {
67
+ result += 'leta';
68
+ } else {
69
+ result += 'let';
70
+ }
71
+ return result;
72
+ }
73
+ }
74
+
75
+ return moment.lang('sl', {
76
+ months : "januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),
77
+ monthsShort : "jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),
78
+ weekdays : "nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),
79
+ weekdaysShort : "ned._pon._tor._sre._čet._pet._sob.".split("_"),
80
+ weekdaysMin : "ne_po_to_sr_če_pe_so".split("_"),
81
+ longDateFormat : {
82
+ LT : "H:mm",
83
+ L : "DD. MM. YYYY",
84
+ LL : "D. MMMM YYYY",
85
+ LLL : "D. MMMM YYYY LT",
86
+ LLLL : "dddd, D. MMMM YYYY LT"
87
+ },
88
+ calendar : {
89
+ sameDay : '[danes ob] LT',
90
+ nextDay : '[jutri ob] LT',
91
+
92
+ nextWeek : function () {
93
+ switch (this.day()) {
94
+ case 0:
95
+ return '[v] [nedeljo] [ob] LT';
96
+ case 3:
97
+ return '[v] [sredo] [ob] LT';
98
+ case 6:
99
+ return '[v] [soboto] [ob] LT';
100
+ case 1:
101
+ case 2:
102
+ case 4:
103
+ case 5:
104
+ return '[v] dddd [ob] LT';
105
+ }
106
+ },
107
+ lastDay : '[včeraj ob] LT',
108
+ lastWeek : function () {
109
+ switch (this.day()) {
110
+ case 0:
111
+ case 3:
112
+ case 6:
113
+ return '[prejšnja] dddd [ob] LT';
114
+ case 1:
115
+ case 2:
116
+ case 4:
117
+ case 5:
118
+ return '[prejšnji] dddd [ob] LT';
119
+ }
120
+ },
121
+ sameElse : 'L'
122
+ },
123
+ relativeTime : {
124
+ future : "čez %s",
125
+ past : "%s nazaj",
126
+ s : "nekaj sekund",
127
+ m : translate,
128
+ mm : translate,
129
+ h : translate,
130
+ hh : translate,
131
+ d : "en dan",
132
+ dd : translate,
133
+ M : "en mesec",
134
+ MM : translate,
135
+ y : "eno leto",
136
+ yy : translate
137
+ },
138
+ ordinal : '%d.',
139
+ week : {
140
+ dow : 1, // Monday is the first day of the week.
141
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
142
+ }
143
+ });
144
+ }));
@@ -0,0 +1,61 @@
1
+ // moment.js language configuration
2
+ // language : Albanian (sq)
3
+ // author : Flakërim Ismani : https://github.com/flakerimi
4
+ // author: Menelion Elensúle: https://github.com/Oire (tests)
5
+ // author : Oerd Cukalla : https://github.com/oerd (fixes)
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
+ return moment.lang('sq', {
17
+ months : "Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),
18
+ monthsShort : "Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),
19
+ weekdays : "E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),
20
+ weekdaysShort : "Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),
21
+ weekdaysMin : "D_H_Ma_Më_E_P_Sh".split("_"),
22
+ meridiem : function (hours, minutes, isLower) {
23
+ return hours < 12 ? 'PD' : 'MD';
24
+ },
25
+ longDateFormat : {
26
+ LT : "HH:mm",
27
+ L : "DD/MM/YYYY",
28
+ LL : "D MMMM YYYY",
29
+ LLL : "D MMMM YYYY LT",
30
+ LLLL : "dddd, D MMMM YYYY LT"
31
+ },
32
+ calendar : {
33
+ sameDay : '[Sot në] LT',
34
+ nextDay : '[Nesër në] LT',
35
+ nextWeek : 'dddd [në] LT',
36
+ lastDay : '[Dje në] LT',
37
+ lastWeek : 'dddd [e kaluar në] LT',
38
+ sameElse : 'L'
39
+ },
40
+ relativeTime : {
41
+ future : "në %s",
42
+ past : "%s më parë",
43
+ s : "disa sekonda",
44
+ m : "një minutë",
45
+ mm : "%d minuta",
46
+ h : "një orë",
47
+ hh : "%d orë",
48
+ d : "një ditë",
49
+ dd : "%d ditë",
50
+ M : "një muaj",
51
+ MM : "%d muaj",
52
+ y : "një vit",
53
+ yy : "%d vite"
54
+ },
55
+ ordinal : '%d.',
56
+ week : {
57
+ dow : 1, // Monday is the first day of the week.
58
+ doy : 4 // The week that contains Jan 4th is the first week of the year.
59
+ }
60
+ });
61
+ }));
@@ -0,0 +1,106 @@
1
+ // moment.js language configuration
2
+ // language : Serbian-cyrillic (sr-cyr)
3
+ // author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
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
+ var translator = {
16
+ words: { //Different grammatical cases
17
+ m: ['један минут', 'једне минуте'],
18
+ mm: ['минут', 'минуте', 'минута'],
19
+ h: ['један сат', 'једног сата'],
20
+ hh: ['сат', 'сата', 'сати'],
21
+ dd: ['дан', 'дана', 'дана'],
22
+ MM: ['месец', 'месеца', 'месеци'],
23
+ yy: ['година', 'године', 'година']
24
+ },
25
+ correctGrammaticalCase: function (number, wordKey) {
26
+ return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
27
+ },
28
+ translate: function (number, withoutSuffix, key) {
29
+ var wordKey = translator.words[key];
30
+ if (key.length === 1) {
31
+ return withoutSuffix ? wordKey[0] : wordKey[1];
32
+ } else {
33
+ return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
34
+ }
35
+ }
36
+ };
37
+
38
+ return moment.lang('sr-cyr', {
39
+ months: ['јануар', 'фебруар', 'март', 'април', 'мај', 'јун', 'јул', 'август', 'септембар', 'октобар', 'новембар', 'децембар'],
40
+ monthsShort: ['јан.', 'феб.', 'мар.', 'апр.', 'мај', 'јун', 'јул', 'авг.', 'сеп.', 'окт.', 'нов.', 'дец.'],
41
+ weekdays: ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'],
42
+ weekdaysShort: ['нед.', 'пон.', 'уто.', 'сре.', 'чет.', 'пет.', 'суб.'],
43
+ weekdaysMin: ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'],
44
+ longDateFormat: {
45
+ LT: "H:mm",
46
+ L: "DD. MM. YYYY",
47
+ LL: "D. MMMM YYYY",
48
+ LLL: "D. MMMM YYYY LT",
49
+ LLLL: "dddd, D. MMMM YYYY LT"
50
+ },
51
+ calendar: {
52
+ sameDay: '[данас у] LT',
53
+ nextDay: '[сутра у] LT',
54
+
55
+ nextWeek: function () {
56
+ switch (this.day()) {
57
+ case 0:
58
+ return '[у] [недељу] [у] LT';
59
+ case 3:
60
+ return '[у] [среду] [у] LT';
61
+ case 6:
62
+ return '[у] [суботу] [у] LT';
63
+ case 1:
64
+ case 2:
65
+ case 4:
66
+ case 5:
67
+ return '[у] dddd [у] LT';
68
+ }
69
+ },
70
+ lastDay : '[јуче у] LT',
71
+ lastWeek : function () {
72
+ var lastWeekDays = [
73
+ '[прошле] [недеље] [у] LT',
74
+ '[прошлог] [понедељка] [у] LT',
75
+ '[прошлог] [уторка] [у] LT',
76
+ '[прошле] [среде] [у] LT',
77
+ '[прошлог] [четвртка] [у] LT',
78
+ '[прошлог] [петка] [у] LT',
79
+ '[прошле] [суботе] [у] LT'
80
+ ];
81
+ return lastWeekDays[this.day()];
82
+ },
83
+ sameElse : 'L'
84
+ },
85
+ relativeTime : {
86
+ future : "за %s",
87
+ past : "пре %s",
88
+ s : "неколико секунди",
89
+ m : translator.translate,
90
+ mm : translator.translate,
91
+ h : translator.translate,
92
+ hh : translator.translate,
93
+ d : "дан",
94
+ dd : translator.translate,
95
+ M : "месец",
96
+ MM : translator.translate,
97
+ y : "годину",
98
+ yy : translator.translate
99
+ },
100
+ ordinal : '%d.',
101
+ week : {
102
+ dow : 1, // Monday is the first day of the week.
103
+ doy : 7 // The week that contains Jan 1st is the first week of the year.
104
+ }
105
+ });
106
+ }));