immosquare-constants 0.1.8 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-constants/locale.rb +210 -88
- data/lib/immosquare-constants/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99053deb6406eb95941d69ba204294ac4f4b484a8148ee0815cc1d561773b6a5
|
4
|
+
data.tar.gz: '080de33e8b019779152aaaca5caa4e9aadf33b356c429889100878a3ac17ae3b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63d3b2967a8198ac70acb7c050b16f5d1799a5d3953e449e907d9a29cf06743c40885c5d8059156b1c38136875c3efbde4c6ddc8f5604aad9f718eeab6e30f0f
|
7
|
+
data.tar.gz: c246a527bad454a79b8a613d8be3d46a9c877ba1e454f2e177b0969f7fd9059206378d1248b5cbd5e77efee245a3a9bafbb4e3a9c1823337dc3c315482b62246
|
@@ -1,99 +1,221 @@
|
|
1
1
|
module ImmosquareConstants
|
2
2
|
module Locale
|
3
3
|
LOCALES = {
|
4
|
-
|
5
|
-
:
|
6
|
-
|
7
|
-
:
|
8
|
-
|
9
|
-
:
|
10
|
-
|
11
|
-
:
|
12
|
-
|
13
|
-
:
|
14
|
-
|
15
|
-
:
|
16
|
-
|
17
|
-
:
|
18
|
-
|
19
|
-
:
|
20
|
-
|
21
|
-
:
|
22
|
-
|
23
|
-
:
|
24
|
-
|
25
|
-
:
|
26
|
-
|
27
|
-
:
|
28
|
-
|
29
|
-
:
|
30
|
-
:
|
31
|
-
:
|
32
|
-
:
|
33
|
-
|
34
|
-
:
|
35
|
-
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
40
|
-
:
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
44
|
-
:
|
45
|
-
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
50
|
-
:
|
51
|
-
:
|
52
|
-
:
|
53
|
-
:
|
54
|
-
:
|
55
|
-
:
|
56
|
-
:
|
57
|
-
:
|
58
|
-
:
|
59
|
-
:
|
60
|
-
:
|
61
|
-
:
|
62
|
-
:
|
63
|
-
:
|
64
|
-
:
|
65
|
-
:
|
66
|
-
|
67
|
-
:
|
68
|
-
|
69
|
-
:
|
70
|
-
|
71
|
-
:
|
72
|
-
|
73
|
-
:
|
74
|
-
:
|
75
|
-
:
|
76
|
-
:
|
77
|
-
:
|
78
|
-
|
79
|
-
:
|
80
|
-
|
81
|
-
:
|
82
|
-
|
83
|
-
:
|
84
|
-
|
85
|
-
:
|
86
|
-
|
87
|
-
:
|
88
|
-
|
89
|
-
:
|
90
|
-
|
4
|
+
# Afrikaans (South Africa, Namibia)
|
5
|
+
:af => "Afrikaans",
|
6
|
+
# Amharic (Ethiopia)
|
7
|
+
:am => "አማርኛ",
|
8
|
+
# Arabic (Middle East, North Africa)
|
9
|
+
:ar => "العربية",
|
10
|
+
# Azerbaijani (Azerbaijan)
|
11
|
+
:az => "Azərbaycan",
|
12
|
+
# Belarusian (Belarus)
|
13
|
+
:be => "Беларуская",
|
14
|
+
# Bulgarian (Bulgaria)
|
15
|
+
:bg => "Български",
|
16
|
+
# Bengali (Bangladesh, India)
|
17
|
+
:bn => "বাংলা",
|
18
|
+
# Bosnian (Bosnia and Herzegovina)
|
19
|
+
:bs => "Bosanski",
|
20
|
+
# Catalan (Spain - Catalonia, Andorra)
|
21
|
+
:ca => "Català",
|
22
|
+
# Czech (Czech Republic)
|
23
|
+
:cs => "Čeština",
|
24
|
+
# Welsh (United Kingdom - Wales)
|
25
|
+
:cy => "Cymraeg",
|
26
|
+
# Danish (Denmark, Greenland, Faroe Islands)
|
27
|
+
:da => "Dansk",
|
28
|
+
# German (Germany, Austria, Switzerland, Liechtenstein, Luxembourg)
|
29
|
+
:de => "Deutsch",
|
30
|
+
:"de-AT" => "Deutsch (Österreich)",
|
31
|
+
:"de-CH" => "Deutsch (Schweiz)",
|
32
|
+
:"de-DE" => "Deutsch (Deutschland)",
|
33
|
+
# Greek (Greece, Cyprus)
|
34
|
+
:el => "Ελληνικά",
|
35
|
+
# English (United Kingdom, United States, Australia, Canada, and many others)
|
36
|
+
:en => "English",
|
37
|
+
:"en-AU" => "English (Australia)",
|
38
|
+
:"en-CA" => "English (Canada)",
|
39
|
+
:"en-GB" => "English (United Kingdom)",
|
40
|
+
:"en-IE" => "English (Ireland)",
|
41
|
+
:"en-IN" => "English (India)",
|
42
|
+
:"en-NZ" => "English (New Zealand)",
|
43
|
+
:"en-US" => "English (United States)",
|
44
|
+
:"en-ZA" => "English (South Africa)",
|
45
|
+
# Spanish (Spain, Latin America, United States)
|
46
|
+
:es => "Español",
|
47
|
+
:"es-AR" => "Español (Argentina)",
|
48
|
+
:"es-BO" => "Español (Bolivia)",
|
49
|
+
:"es-CL" => "Español (Chile)",
|
50
|
+
:"es-CO" => "Español (Colombia)",
|
51
|
+
:"es-CR" => "Español (Costa Rica)",
|
52
|
+
:"es-DO" => "Español (República Dominicana)",
|
53
|
+
:"es-EC" => "Español (Ecuador)",
|
54
|
+
:"es-GT" => "Español (Guatemala)",
|
55
|
+
:"es-HN" => "Español (Honduras)",
|
56
|
+
:"es-MX" => "Español (México)",
|
57
|
+
:"es-NI" => "Español (Nicaragua)",
|
58
|
+
:"es-PA" => "Español (Panamá)",
|
59
|
+
:"es-PE" => "Español (Perú)",
|
60
|
+
:"es-PR" => "Español (Puerto Rico)",
|
61
|
+
:"es-PY" => "Español (Paraguay)",
|
62
|
+
:"es-SV" => "Español (El Salvador)",
|
63
|
+
:"es-US" => "Español (Estados Unidos)",
|
64
|
+
:"es-UY" => "Español (Uruguay)",
|
65
|
+
:"es-VE" => "Español (Venezuela)",
|
66
|
+
# Estonian (Estonia)
|
67
|
+
:et => "Eesti",
|
68
|
+
# Persian (Iran, Afghanistan, Tajikistan)
|
69
|
+
:fa => "فارسی",
|
70
|
+
# Finnish (Finland)
|
71
|
+
:fi => "Suomi",
|
72
|
+
# French (France, Canada, Belgium, Switzerland, Luxembourg, and others)
|
73
|
+
:fr => "Français",
|
74
|
+
:"fr-BE" => "Français (Belgique)",
|
75
|
+
:"fr-CA" => "Français (Canada)",
|
76
|
+
:"fr-CH" => "Français (Suisse)",
|
77
|
+
:"fr-LU" => "Français (Luxembourg)",
|
78
|
+
# Gujarati (India)
|
79
|
+
:gu => "ગુજરાતી",
|
80
|
+
# Hebrew (Israel)
|
81
|
+
:he => "עברית",
|
82
|
+
# Hindi (India)
|
83
|
+
:hi => "हिन्दी",
|
84
|
+
# Croatian (Croatia, Bosnia and Herzegovina)
|
85
|
+
:hr => "Hrvatski",
|
86
|
+
# Hungarian (Hungary)
|
87
|
+
:hu => "Magyar",
|
88
|
+
# Armenian (Armenia)
|
89
|
+
:hy => "Հայերեն",
|
90
|
+
# Indonesian (Indonesia)
|
91
|
+
:id => "Bahasa Indonesia",
|
92
|
+
# Icelandic (Iceland)
|
93
|
+
:is => "Íslenska",
|
94
|
+
# Italian (Italy, Switzerland)
|
95
|
+
:it => "Italiano",
|
96
|
+
:"it-CH" => "Italiano (Svizzera)",
|
97
|
+
# Japanese (Japan)
|
98
|
+
:ja => "日本語",
|
99
|
+
# Georgian (Georgia)
|
100
|
+
:ka => "ქართული",
|
101
|
+
# Kazakh (Kazakhstan)
|
102
|
+
:kk => "Қазақ",
|
103
|
+
# Khmer (Cambodia)
|
104
|
+
:km => "ភាសាខ្មែរ",
|
105
|
+
# Kannada (India)
|
106
|
+
:kn => "ಕನ್ನಡ",
|
107
|
+
# Korean (South Korea, North Korea)
|
108
|
+
:ko => "한국어",
|
109
|
+
# Kyrgyz (Kyrgyzstan)
|
110
|
+
:ky => "Кыргызча",
|
111
|
+
# Lao (Laos)
|
112
|
+
:lo => "ລາວ",
|
113
|
+
# Lithuanian (Lithuania)
|
114
|
+
:lt => "Lietuvių",
|
115
|
+
# Latvian (Latvia)
|
116
|
+
:lv => "Latviešu",
|
117
|
+
# Macedonian (North Macedonia)
|
118
|
+
:mk => "Македонски",
|
119
|
+
# Malayalam (India)
|
120
|
+
:ml => "മലയാളം",
|
121
|
+
# Mongolian (Mongolia)
|
122
|
+
:mn => "Монгол",
|
123
|
+
# Marathi (India)
|
124
|
+
:mr => "मराठी",
|
125
|
+
# Malay (Malaysia, Brunei)
|
126
|
+
:ms => "Bahasa Melayu",
|
127
|
+
# Maltese (Malta)
|
128
|
+
:mt => "Malti",
|
129
|
+
# Burmese (Myanmar)
|
130
|
+
:my => "မြန်မာ",
|
131
|
+
# Nepali (Nepal)
|
132
|
+
:ne => "नेपाली",
|
133
|
+
# Dutch (Netherlands, Belgium)
|
134
|
+
:nl => "Nederlands",
|
135
|
+
# Norwegian (Norway)
|
136
|
+
:no => "Norsk",
|
137
|
+
# Odia (India)
|
138
|
+
:or => "ଓଡ଼ିଆ",
|
139
|
+
# Punjabi (India, Pakistan)
|
140
|
+
:pa => "ਪੰਜਾਬੀ",
|
141
|
+
# Polish (Poland)
|
142
|
+
:pl => "Polski",
|
143
|
+
# Pashto (Afghanistan, Pakistan)
|
144
|
+
:ps => "پښتو",
|
145
|
+
# Portuguese (Portugal, Brazil, and others)
|
146
|
+
:pt => "Português",
|
147
|
+
:"pt-BR" => "Português (Brasil)",
|
148
|
+
# Romanian (Romania, Moldova)
|
149
|
+
:ro => "Română",
|
150
|
+
# Russian (Russia, Belarus, and others)
|
151
|
+
:ru => "Русский",
|
152
|
+
# Sindhi (Pakistan, India)
|
153
|
+
:sd => "سنڌي",
|
154
|
+
# Sinhala (Sri Lanka)
|
155
|
+
:si => "සිංහල",
|
156
|
+
# Slovak (Slovakia)
|
157
|
+
:sk => "Slovenčina",
|
158
|
+
# Slovenian (Slovenia)
|
159
|
+
:sl => "Slovenščina",
|
160
|
+
# Somali (Somalia, Kenya)
|
161
|
+
:so => "Soomaali",
|
162
|
+
# Albanian (Albania, Kosovo)
|
163
|
+
:sq => "Shqip",
|
164
|
+
# Serbian (Serbia, Bosnia and Herzegovina, Montenegro)
|
165
|
+
:sr => "Српски",
|
166
|
+
# Swedish (Sweden, Finland)
|
167
|
+
:sv => "Svenska",
|
168
|
+
# Swahili (Kenya, Tanzania, Uganda, and others)
|
169
|
+
:sw => "Kiswahili",
|
170
|
+
# Tamil (India, Sri Lanka)
|
171
|
+
:ta => "தமிழ்",
|
172
|
+
# Telugu (India)
|
173
|
+
:te => "తెలుగు",
|
174
|
+
# Tajik (Tajikistan)
|
175
|
+
:tg => "Тоҷикӣ",
|
176
|
+
# Thai (Thailand)
|
177
|
+
:th => "ไทย",
|
178
|
+
# Tagalog (Philippines)
|
179
|
+
:tl => "Filipino",
|
180
|
+
# Turkish (Turkey, Cyprus)
|
181
|
+
:tr => "Türkçe",
|
182
|
+
# Ukrainian (Ukraine)
|
183
|
+
:uk => "Українська",
|
184
|
+
# Urdu (Pakistan, India)
|
185
|
+
:ur => "اردو",
|
186
|
+
# Uzbek (Uzbekistan)
|
187
|
+
:uz => "O'zbek",
|
188
|
+
# Vietnamese (Vietnam)
|
189
|
+
:vi => "Tiếng Việt",
|
190
|
+
# Xhosa (South Africa)
|
191
|
+
:xh => "isiXhosa",
|
192
|
+
# Chinese (China, Taiwan, Singapore, Hong Kong)
|
193
|
+
:zh => "中文",
|
194
|
+
:"zh-CN" => "中文 (简体)",
|
195
|
+
:"zh-TW" => "中文 (繁體)",
|
196
|
+
# Zulu (South Africa)
|
197
|
+
:zu => "isiZulu"
|
91
198
|
}.freeze
|
92
199
|
|
93
200
|
class << self
|
94
201
|
|
202
|
+
##============================================================##
|
203
|
+
## Renvoie la liste des langues disponibles sans les langues régionales.
|
204
|
+
##============================================================##
|
205
|
+
def languages_with_native_names
|
206
|
+
LOCALES.reject {|key, _value| key.to_s.include?("-") }
|
207
|
+
end
|
208
|
+
|
209
|
+
##============================================================##
|
210
|
+
## Renvoie le nom de la langue correspondant à la locale passée en paramètre.
|
211
|
+
##============================================================##
|
95
212
|
def native_name_for_locale(locale)
|
96
|
-
|
213
|
+
begin
|
214
|
+
key = locale.to_s.split("-").map.with_index {|part, index| index == 0 ? part.downcase : part.upcase }.join("-").to_sym
|
215
|
+
LOCALES[key]
|
216
|
+
rescue StandardError
|
217
|
+
nil
|
218
|
+
end
|
97
219
|
end
|
98
220
|
|
99
221
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: immosquare-constants
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- immosquare
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ImmosquareConstants gem provides a robust set of constants to facilitate
|
14
14
|
application development across various domains
|
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '0'
|
45
45
|
requirements: []
|
46
|
-
rubygems_version: 3.5.
|
46
|
+
rubygems_version: 3.5.22
|
47
47
|
signing_key:
|
48
48
|
specification_version: 4
|
49
49
|
summary: ImmosquareConstants is a comprehensive collection of constants useful for
|