twitter_cldr 1.3.0 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/README.md +58 -10
  2. data/Rakefile +25 -0
  3. data/lib/twitter_cldr.rb +16 -1
  4. data/lib/twitter_cldr/core_ext.rb +1 -0
  5. data/lib/twitter_cldr/core_ext/calendars/datetime.rb +14 -0
  6. data/lib/twitter_cldr/core_ext/calendars/timespan.rb +26 -0
  7. data/lib/twitter_cldr/formatters.rb +1 -0
  8. data/lib/twitter_cldr/formatters/calendars/datetime_formatter.rb +1 -6
  9. data/lib/twitter_cldr/formatters/calendars/timespan_formatter.rb +67 -0
  10. data/lib/twitter_cldr/formatters/numbers/number_formatter.rb +1 -1
  11. data/lib/twitter_cldr/tokenizers.rb +1 -0
  12. data/lib/twitter_cldr/tokenizers/base.rb +23 -9
  13. data/lib/twitter_cldr/tokenizers/calendars/date_tokenizer.rb +14 -8
  14. data/lib/twitter_cldr/tokenizers/calendars/datetime_tokenizer.rb +13 -9
  15. data/lib/twitter_cldr/tokenizers/calendars/time_tokenizer.rb +13 -7
  16. data/lib/twitter_cldr/tokenizers/calendars/timespan_tokenizer.rb +82 -0
  17. data/lib/twitter_cldr/tokenizers/numbers/number_tokenizer.rb +21 -14
  18. data/lib/twitter_cldr/tokenizers/token.rb +4 -0
  19. data/lib/twitter_cldr/version.rb +1 -1
  20. data/resources/locales/ar/units.yml +149 -0
  21. data/resources/locales/da/units.yml +79 -0
  22. data/resources/locales/de/units.yml +93 -0
  23. data/resources/locales/en/units.yml +65 -0
  24. data/resources/locales/es/units.yml +93 -0
  25. data/resources/locales/fa/units.yml +86 -0
  26. data/resources/locales/fi/units.yml +93 -0
  27. data/resources/locales/fil/units.yml +79 -0
  28. data/resources/locales/fr/units.yml +93 -0
  29. data/resources/locales/he/units.yml +79 -0
  30. data/resources/locales/hi/units.yml +79 -0
  31. data/resources/locales/hu/units.yml +72 -0
  32. data/resources/locales/id/units.yml +72 -0
  33. data/resources/locales/it/units.yml +79 -0
  34. data/resources/locales/ja/units.yml +72 -0
  35. data/resources/locales/ko/units.yml +72 -0
  36. data/resources/locales/ms/units.yml +86 -0
  37. data/resources/locales/nl/units.yml +79 -0
  38. data/resources/locales/pl/units.yml +135 -0
  39. data/resources/locales/pt/units.yml +93 -0
  40. data/resources/locales/ru/units.yml +135 -0
  41. data/resources/locales/sv/units.yml +93 -0
  42. data/resources/locales/th/units.yml +72 -0
  43. data/resources/locales/tr/units.yml +72 -0
  44. data/resources/locales/ur/units.yml +86 -0
  45. data/resources/locales/zh-Hant/units.yml +72 -0
  46. data/resources/locales/zh/units.yml +72 -0
  47. data/spec/core_ext/calendars/date_spec.rb +83 -9
  48. data/spec/core_ext/calendars/datetime_spec.rb +1 -3
  49. data/spec/core_ext/calendars/time_spec.rb +12 -3
  50. data/spec/formatters/calendars/timespan_formatter_spec.rb +39 -0
  51. data/spec/tokenizers/base_spec.rb +10 -10
  52. data/spec/tokenizers/calendars/timespan_tokenizer_spec.rb +24 -0
  53. data/spec/tokenizers/numbers/number_tokenizer_spec.rb +1 -1
  54. data/spec/twitter_cldr_spec.rb +16 -0
  55. metadata +126 -14
  56. data/lib/twitter_cldr/tokenizers/key_path.rb +0 -35
  57. data/spec/tokenizers/key_path_spec.rb +0 -49
@@ -0,0 +1,65 @@
1
+ en:
2
+ units:
3
+ day:
4
+ one: "{0} day"
5
+ other: "{0} days"
6
+ day-future:
7
+ one: "In {0} day"
8
+ other: "In {0} days"
9
+ day-past:
10
+ one: "{0} day ago"
11
+ other: "{0} days ago"
12
+ hour:
13
+ one: "{0} hr"
14
+ other: "{0} hrs"
15
+ hour-future:
16
+ one: "In {0} hour"
17
+ other: "In {0} hours"
18
+ hour-past:
19
+ one: "{0} hour ago"
20
+ other: "{0} hours ago"
21
+ minute:
22
+ one: "{0} min"
23
+ other: "{0} mins"
24
+ minute-future:
25
+ one: "In {0} minute"
26
+ other: "In {0} minutes"
27
+ minute-past:
28
+ one: "{0} minute ago"
29
+ other: "{0} minutes ago"
30
+ month:
31
+ one: "{0} mth"
32
+ other: "{0} mths"
33
+ month-future:
34
+ one: "In {0} month"
35
+ other: "In {0} months"
36
+ month-past:
37
+ one: "{0} month ago"
38
+ other: "{0} months ago"
39
+ second:
40
+ one: "{0} sec"
41
+ other: "{0} secs"
42
+ second-future:
43
+ one: "In {0} second"
44
+ other: "In {0} seconds"
45
+ second-past:
46
+ one: "{0} second ago"
47
+ other: "{0} seconds ago"
48
+ week:
49
+ one: "{0} wk"
50
+ other: "{0} wks"
51
+ week-future:
52
+ one: "In {0} week"
53
+ other: "In {0} weeks"
54
+ week-past:
55
+ one: "{0} week ago"
56
+ other: "{0} weeks ago"
57
+ year:
58
+ one: "{0} yr"
59
+ other: "{0} yrs"
60
+ year-future:
61
+ one: "In {0} year"
62
+ other: "In {0} years"
63
+ year-past:
64
+ one: "{0} year ago"
65
+ other: "{0} years ago"
@@ -0,0 +1,93 @@
1
+ es:
2
+ units:
3
+ day:
4
+ one: "{0} día"
5
+ other: "{0} días"
6
+ day-future:
7
+ 0: "Dentro de 0 días"
8
+ 1: "Dentro de 1 día"
9
+ one: "Dentro de {0} día"
10
+ other: "Dentro de {0} días"
11
+ day-past:
12
+ 0: "Hace 0 días"
13
+ 1: "Hace 1 día"
14
+ one: "Hace {0} día"
15
+ other: "Hace {0} días"
16
+ hour:
17
+ one: "{0} h"
18
+ other: "{0} h"
19
+ hour-future:
20
+ 0: "Dentro de 0 horas"
21
+ 1: "Dentro de 1 hora"
22
+ one: "Dentro de {0} hora"
23
+ other: "Dentro de {0} horas"
24
+ hour-past:
25
+ 0: "Hace 0 horas"
26
+ 1: "Hace 1 hora"
27
+ one: "Hace {0} hora"
28
+ other: "Hace {0} horas"
29
+ minute:
30
+ one: "{0} min"
31
+ other: "{0} min"
32
+ minute-future:
33
+ 0: "Dentro de 0 minutos"
34
+ 1: "Dentro de 1 minuto"
35
+ one: "Dentro de {0} minuto"
36
+ other: "Dentro de {0} minutos"
37
+ minute-past:
38
+ 0: "Hace 0 minutos"
39
+ 1: "Hace 1 minuto"
40
+ one: "Hace {0} minuto"
41
+ other: "Hace {0} minutos"
42
+ month:
43
+ one: "{0} mes"
44
+ other: "{0} meses"
45
+ month-future:
46
+ 0: "Dentro de 0 meses"
47
+ 1: "Dentro de 1 mes"
48
+ one: "Dentro de {0} mes"
49
+ other: "Dentro de {0} meses"
50
+ month-past:
51
+ 0: "Hace 0 meses"
52
+ 1: "Hace 1 mes"
53
+ one: "Hace {0} mes"
54
+ other: "Hace {0} meses"
55
+ second:
56
+ one: "{0} s"
57
+ other: "{0} s"
58
+ second-future:
59
+ 0: "Dentro de 0 segundos"
60
+ 1: "Dentro de 1 segundo"
61
+ one: "Dentro de {0} segundo"
62
+ other: "Dentro de {0} segundos"
63
+ second-past:
64
+ 0: "Hace 0 segundos"
65
+ 1: "Hace 1 segundo"
66
+ one: "Hace {0} segundo"
67
+ other: "Hace {0} segundos"
68
+ week:
69
+ one: "{0} semana"
70
+ other: "{0} semanas"
71
+ week-future:
72
+ 0: "Dentro de 0 semanas"
73
+ 1: "Dentro de 1 semana"
74
+ one: "Dentro de {0} semana"
75
+ other: "Dentro de {0} semanas"
76
+ week-past:
77
+ 0: "Hace 0 semanas"
78
+ 1: "Hace 1 semana"
79
+ one: "Hace {0} semana"
80
+ other: "Hace {0} semanas"
81
+ year:
82
+ one: "{0} año"
83
+ other: "{0} años"
84
+ year-future:
85
+ 0: "Dentro de 0 años"
86
+ 1: "Dentro de 1 año"
87
+ one: "Dentro de {0} año"
88
+ other: "Dentro de {0} años"
89
+ year-past:
90
+ 0: "Hace 0 años"
91
+ 1: "Hace 1 año"
92
+ one: "Hace {0} año"
93
+ other: "Hace {0} años"
@@ -0,0 +1,86 @@
1
+ fa:
2
+ units:
3
+ day:
4
+ 0: "0 روز"
5
+ 1: "1 روز"
6
+ other: "{0} روز"
7
+ day-future:
8
+ 0: "در 0 روز"
9
+ 1: "در 1 روز"
10
+ other: "{0} روز بعد"
11
+ day-past:
12
+ 0: "0 روز قبل"
13
+ 1: "1 روز قبل"
14
+ other: "{0} روز پیش"
15
+ hour:
16
+ 0: "0 ساعت"
17
+ 1: "1 ساعت"
18
+ other: "{0} ساعت"
19
+ hour-future:
20
+ 0: "در 0 ساعت"
21
+ 1: "در 1 ساعت"
22
+ other: "{0} ساعت بعد"
23
+ hour-past:
24
+ 0: "0 ساعت قبل"
25
+ 1: "1 ساعت قبل"
26
+ other: "{0} ساعت پیش"
27
+ minute:
28
+ 0: "0 دقیقه"
29
+ 1: "1 دقیقه"
30
+ other: "{0} دقیقه"
31
+ minute-future:
32
+ 0: "در 0 دقیقه"
33
+ 1: "در 1 دقیقه"
34
+ other: "{0} دقیقه بعد"
35
+ minute-past:
36
+ 0: "0 دقیقه قبل"
37
+ 1: "1 دقیقه قبل"
38
+ other: "{0} دقیقه پیش"
39
+ month:
40
+ 0: "0 ماه"
41
+ 1: "1 ماه"
42
+ other: "{0} ماه"
43
+ month-future:
44
+ 0: "در 0 ماه"
45
+ 1: "در 1 ماه"
46
+ other: "{0} ماه بعد"
47
+ month-past:
48
+ 0: "0 ماه قبل"
49
+ 1: "1 ماه قبل"
50
+ other: "{0} ماه پیش"
51
+ second:
52
+ 0: "0 ثانیه"
53
+ 1: "1 ثانیه"
54
+ other: "{0} ثانیه"
55
+ second-future:
56
+ 0: "در 0 ثانیه"
57
+ 1: "در 1 ثانیه"
58
+ other: "{0} ثانیه بعد"
59
+ second-past:
60
+ 0: "0 ثانیه قبل"
61
+ 1: "1 ثانیه قبل"
62
+ other: "{0} ثانیه پیش"
63
+ week:
64
+ 0: "0 هفته"
65
+ 1: "1 هفته"
66
+ other: "{0} هفته"
67
+ week-future:
68
+ 0: "در 0 هفته"
69
+ 1: "در 1 هفته"
70
+ other: "{0} هفته بعد"
71
+ week-past:
72
+ 0: "0 هفته قبل"
73
+ 1: "1 هفته قبل"
74
+ other: "{0} هفته پیش"
75
+ year:
76
+ 0: "0 سال"
77
+ 1: "1 سال"
78
+ other: "{0} سال"
79
+ year-future:
80
+ 0: "در 0 سال"
81
+ 1: "در 1 سال"
82
+ other: "{0} سال بعد"
83
+ year-past:
84
+ 0: "0 سال قبل"
85
+ 1: "1 سال قبل"
86
+ other: "{0} سال پیش"
@@ -0,0 +1,93 @@
1
+ fi:
2
+ units:
3
+ day:
4
+ one: "{0} pv"
5
+ other: "{0} pv"
6
+ day-future:
7
+ 0: "alle päivän päästä"
8
+ 1: "päivän päästä"
9
+ one: "{0} päivän päästä"
10
+ other: "{0} päivän päästä"
11
+ day-past:
12
+ 0: "alle päivä sitten"
13
+ 1: "päivä sitten"
14
+ one: "{0} päivä sitten"
15
+ other: "{0} päivää sitten"
16
+ hour:
17
+ one: "{0} t"
18
+ other: "{0} t"
19
+ hour-future:
20
+ 0: "alle tunnin päästä"
21
+ 1: "tunnin päästä"
22
+ one: "{0} tunnin päästä"
23
+ other: "{0} tunnin päästä"
24
+ hour-past:
25
+ 0: "alle tunti sitten"
26
+ 1: "tunti sitten"
27
+ one: "{0} tunti sitten"
28
+ other: "{0} tuntia sitten"
29
+ minute:
30
+ one: "{0} min"
31
+ other: "{0} min"
32
+ minute-future:
33
+ 0: "alle minuutin päästä"
34
+ 1: "minuutin päästä"
35
+ one: "{0} minuutin päästä"
36
+ other: "{0} minuutin päästä"
37
+ minute-past:
38
+ 0: "alle minuutti sitten"
39
+ 1: "minuutti sitten"
40
+ one: "{0} minuutti sitten"
41
+ other: "{0} minuuttia sitten"
42
+ month:
43
+ one: "{0} kk"
44
+ other: "{0} kk"
45
+ month-future:
46
+ 0: "alle kuukauden päästä"
47
+ 1: "kuukauden päästä"
48
+ one: "{0} kuukauden päästä"
49
+ other: "{0} kuukauden päästä"
50
+ month-past:
51
+ 0: "alle kuukausi sitten"
52
+ 1: "kuukausi sitten"
53
+ one: "{0} kuukausi sitten"
54
+ other: "{0} kuukautta sitten"
55
+ second:
56
+ one: "{0} s"
57
+ other: "{0} s"
58
+ second-future:
59
+ 0: "alle sekunnin päästä"
60
+ 1: "sekunnin päästä"
61
+ one: "{0} sekunnin päästä"
62
+ other: "{0} sekunnin päästä"
63
+ second-past:
64
+ 0: "alle sekunti sitten"
65
+ 1: "sekunti sitten"
66
+ one: "{0} sekunti sitten"
67
+ other: "{0} sekuntia sitten"
68
+ week:
69
+ one: "{0} vk"
70
+ other: "{0} vk"
71
+ week-future:
72
+ 0: "alle viikon päästä"
73
+ 1: "viikon päästä"
74
+ one: "{0} viikon päästä"
75
+ other: "{0} viikon päästä"
76
+ week-past:
77
+ 0: "alle viikko sitten"
78
+ 1: "viikko sitten"
79
+ one: "{0} viikko sitten"
80
+ other: "{0} viikkoa sitten"
81
+ year:
82
+ one: "{0} v"
83
+ other: "{0} v"
84
+ year-future:
85
+ 0: "alle vuoden päästä"
86
+ 1: "vuoden päästä"
87
+ one: "{0} vuoden päästä"
88
+ other: "{0} vuoden päästä"
89
+ year-past:
90
+ 0: "alle vuosi sitten"
91
+ 1: "vuosi sitten"
92
+ one: "{0} vuosi sitten"
93
+ other: "{0} vuotta sitten"
@@ -0,0 +1,79 @@
1
+ fil:
2
+ units:
3
+ day:
4
+ one: "{0} arw"
5
+ other: "{0} arw"
6
+ day-future:
7
+ 0: "Sa 0 na araw"
8
+ 1: "Sa 1 araw"
9
+ other: "Sa {0} (na) araw"
10
+ day-past:
11
+ 0: "Nakalipas na 0 araw"
12
+ 1: "Nakalipas na 1 araw"
13
+ other: "Nakalipas na {0} (na) araw"
14
+ hour:
15
+ one: "{0} or"
16
+ other: "{0} or"
17
+ hour-future:
18
+ 0: "Sa 0 oras"
19
+ 1: "Sa 1 oras"
20
+ other: "Sa {0} (na) oras"
21
+ hour-past:
22
+ 0: "Nakalipas na 0 oras"
23
+ 1: "Nakalipas na 1 oras"
24
+ other: "Nakalipas na {0} (na) oras"
25
+ minute:
26
+ one: "{0} min"
27
+ other: "{0} min"
28
+ minute-future:
29
+ 0: "Sa 0 minuto"
30
+ 1: "Sa 1 minuto"
31
+ other: "Sa {0} (na) minuto"
32
+ minute-past:
33
+ 0: "Nakalipas na 0 na minuto"
34
+ 1: "Nakalipas na 1 minuto"
35
+ other: "Nakalipas na {0} (na) minuto"
36
+ month:
37
+ one: "{0} buw"
38
+ other: "{0} buw"
39
+ month-future:
40
+ 0: "Sa 0 na buwan"
41
+ 1: "Sa 1 buwan"
42
+ other: "Sa {0} (na) buwan"
43
+ month-past:
44
+ 0: "Nakalipas na 0 buwan"
45
+ 1: "Nakalipas na 1 buwan"
46
+ other: "Nakalipas na {0} (na) buwan"
47
+ second:
48
+ one: "{0} seg"
49
+ other: "{0} seg"
50
+ second-future:
51
+ 0: "Sa 0 segundo"
52
+ 1: "Sa 1 segundo"
53
+ other: "Sa {0} (na) segundo"
54
+ second-past:
55
+ 0: "Nakalipas na 0 segundo"
56
+ 1: "Nakalipas na 1 segundo"
57
+ other: "Nakalipas na {0} (na) segundo"
58
+ week:
59
+ one: "{0} ling"
60
+ other: "{0} ling"
61
+ week-future:
62
+ 0: "Sa 0 linggo"
63
+ 1: "Sa 1 linggo"
64
+ other: "Sa {0} (na) linggo"
65
+ week-past:
66
+ 0: "Nakalipas na 0 na linggo"
67
+ 1: "Nakalipas na 1 linggo"
68
+ other: "Nakalipas na {0} (na) linggo"
69
+ year:
70
+ one: "{0} ta"
71
+ other: "{0} ta"
72
+ year-future:
73
+ 0: "Sa 0 na taon"
74
+ 1: "Sa 1 taon"
75
+ other: "Sa {0} (na) taon"
76
+ year-past:
77
+ 0: "Nakalipas na 0 taon"
78
+ 1: "Nakalipas na 1 taon"
79
+ other: "Nakalipas na {0} (na) taon"
@@ -0,0 +1,93 @@
1
+ fr:
2
+ units:
3
+ day:
4
+ one: "{0} j"
5
+ other: "{0} j"
6
+ day-future:
7
+ 0: "dans 0 jour"
8
+ 1: "dans 1 jour"
9
+ one: "dans {0} jour"
10
+ other: "dans {0} jours"
11
+ day-past:
12
+ 0: "il y a 0 jour"
13
+ 1: "il y a 1 jour"
14
+ one: "il y a {0} jour"
15
+ other: "il y a {0} jours"
16
+ hour:
17
+ one: "{0} h"
18
+ other: "{0} h"
19
+ hour-future:
20
+ 0: "dans 0 heure"
21
+ 1: "dans 1 heure"
22
+ one: "dans {0} heure"
23
+ other: "dans {0} heures"
24
+ hour-past:
25
+ 0: "il y a 0 heure"
26
+ 1: "il y a 1 heure"
27
+ one: "il y a {0} heure"
28
+ other: "il y a {0} heures"
29
+ minute:
30
+ one: "{0} mn"
31
+ other: "{0} mn"
32
+ minute-future:
33
+ 0: "dans 0 minute"
34
+ 1: "dans 1 minute"
35
+ one: "dans {0} minute"
36
+ other: "dans {0} minutes"
37
+ minute-past:
38
+ 0: "il y a 0 minute"
39
+ 1: "il y a 1 minute"
40
+ one: "il y a {0} minute"
41
+ other: "il y a {0} minutes"
42
+ month:
43
+ one: "{0} mois"
44
+ other: "{0} mois"
45
+ month-future:
46
+ 0: "dans 0 mois"
47
+ 1: "dans 1 mois"
48
+ one: "dans {0} mois"
49
+ other: "dans {0} mois"
50
+ month-past:
51
+ 0: "il y a 0 mois"
52
+ 1: "il y a 1 mois"
53
+ one: "il y a {0} mois"
54
+ other: "il y a {0} mois"
55
+ second:
56
+ one: "{0} s"
57
+ other: "{0} s"
58
+ second-future:
59
+ 0: "dans 0 seconde"
60
+ 1: "dans 1 seconde"
61
+ one: "dans {0} seconde"
62
+ other: "dans {0} secondes"
63
+ second-past:
64
+ 0: "il y a 0 seconde"
65
+ 1: "il y a 1 seconde"
66
+ one: "il y a {0} seconde"
67
+ other: "il y a {0} secondes"
68
+ week:
69
+ one: "{0} sem."
70
+ other: "{0} sem."
71
+ week-future:
72
+ 0: "dans 0 semaine"
73
+ 1: "dans 1 semaine"
74
+ one: "dans {0} semaine"
75
+ other: "dans {0} semaines"
76
+ week-past:
77
+ 0: "il y a 0 semaine"
78
+ 1: "il y a 1 semaine"
79
+ one: "il y a {0} semaine"
80
+ other: "il y a {0} semaines"
81
+ year:
82
+ one: "{0} an"
83
+ other: "{0} ans"
84
+ year-future:
85
+ 0: "dans 0 an"
86
+ 1: "dans 1 an"
87
+ one: "dans {0} an"
88
+ other: "dans {0} ans"
89
+ year-past:
90
+ 0: "il y a 0 an"
91
+ 1: "il y a 1 an"
92
+ one: "il y a {0} an"
93
+ other: "il y a {0} ans"