easy_translate 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,24 +12,61 @@ module EasyTranslate
12
12
  API_URL = 'ajax.googleapis.com'
13
13
  API_TRANSLATE_PATH = '/ajax/services/language/translate'
14
14
  API_DETECT_PATH = '/ajax/services/language/detect'
15
- API_VERSION = '1.0'
15
+ API_VERSION = '2.0'
16
16
 
17
- LANGUAGES = { 'af' => 'afrikaans', 'sq' => 'albanian', 'ar' => 'arabic',
18
- #'hy' => 'armenian', 'eu' => 'basque', 'az' => 'azerbaijani',
19
- 'be' => 'belarusian', 'bg' => 'bulgarian', 'ca' => 'catalan',
20
- 'zh-CN' => 'chinese_simplified', 'zh-TW' => 'chinese_traditional',
21
- 'hr' => 'croatian', 'cs' => 'czech', 'da' => 'danish', 'nl' => 'dutch',
22
- 'en' => 'english', 'et' => 'estonian', 'tl' => 'filipino', 'fi' => 'finnish',
23
- 'fr' => 'french', 'gl' => 'galician', 'de' => 'german', # 'ka' => 'georgian',
24
- 'el' => 'greek', 'ht' => 'haitian_creole', 'iw' => 'hebrew', 'hi' => 'hindi',
25
- 'hu' => 'hungarian', 'is' => 'icelandic', 'id' => 'indonesian',
26
- 'ga' => 'irish', 'it' => 'italian', 'ja' => 'japanese', 'ko' => 'korean',
27
- 'lv' => 'latvian', 'lt' => 'lithuanian', 'mk' => 'macedonian',
28
- 'ms' => 'malay', 'mt' => 'maltese', 'no' => 'norwegian', 'fa' => 'persian',
29
- 'pl' => 'polish', 'pt' => 'portuguese', 'ro' => 'romanian', 'ru' => 'russian',
30
- 'sr' => 'serbian', 'sk' => 'slovak', 'sl' => 'slovenian', 'es' => 'spanish',
31
- 'sw' => 'swahili', 'sv' => 'swedish', 'th' => 'thai', 'tr' => 'turkish',
32
- 'uk' => 'ukrainian', 'vi' => 'vietnamese', 'cy' => 'welsh', # 'ur' => 'urdu',
33
- 'yi' => 'yiddish' }
34
-
17
+ LANGUAGES = {
18
+ 'af' => 'afrikaans',
19
+ 'sq' => 'albanian',
20
+ 'ar' => 'arabic',
21
+ 'be' => 'belarusian',
22
+ 'bg' => 'bulgarian',
23
+ 'ca' => 'catalan',
24
+ 'zh-CN' => 'chinese_simplified',
25
+ 'zh-TW' => 'chinese_traditional',
26
+ 'hr' => 'croatian',
27
+ 'cs' => 'czech',
28
+ 'da' => 'danish',
29
+ 'nl' => 'dutch',
30
+ 'en' => 'english',
31
+ 'et' => 'estonian',
32
+ 'tl' => 'filipino',
33
+ 'fi' => 'finnish',
34
+ 'fr' => 'french',
35
+ 'gl' => 'galician',
36
+ 'de' => 'german',
37
+ 'el' => 'greek',
38
+ 'ht' => 'haitian_creole',
39
+ 'iw' => 'hebrew',
40
+ 'hi' => 'hindi',
41
+ 'hu' => 'hungarian',
42
+ 'is' => 'icelandic',
43
+ 'id' => 'indonesian',
44
+ 'ga' => 'irish',
45
+ 'it' => 'italian',
46
+ 'ja' => 'japanese',
47
+ 'lv' => 'latvian',
48
+ 'lt' => 'lithuanian',
49
+ 'mk' => 'macedonian',
50
+ 'ms' => 'malay',
51
+ 'mt' => 'maltese',
52
+ 'no' => 'norwegian',
53
+ 'fa' => 'persian',
54
+ 'pl' => 'polish',
55
+ 'pt' => 'portuguese',
56
+ 'ro' => 'romanian',
57
+ 'ru' => 'russian',
58
+ 'sr' => 'serbian',
59
+ 'sk' => 'slovak',
60
+ 'sl' => 'slovenian',
61
+ 'es' => 'spanish',
62
+ 'sw' => 'swahili',
63
+ 'sv' => 'swedish',
64
+ 'th' => 'thai',
65
+ 'tr' => 'turkish',
66
+ 'uk' => 'ukrainian',
67
+ 'vi' => 'vietnamese',
68
+ 'cy' => 'welsh',
69
+ 'yi' => 'yiddish'
70
+ }
71
+
35
72
  end
@@ -143,7 +143,7 @@ module EasyTranslate
143
143
 
144
144
  def self.index_func
145
145
  return @index_func if @index_func
146
- Array.instance_methods.include?(:key) ? :key : :index
146
+ Hash.instance_methods.include?(:key) ? :key : :index
147
147
  end
148
148
 
149
149
  # a function used to get the lang code of any input.
@@ -1,5 +1,5 @@
1
1
  module EasyTranslate
2
2
 
3
- VERSION = '0.1.4'
3
+ VERSION = '0.2.0'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_translate
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 4
10
- version: 0.1.4
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Crepezzi
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-29 00:00:00 -05:00
18
+ date: 2011-01-31 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency