immosquare-constants 0.1.7 → 0.1.9
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 +202 -88
- data/lib/immosquare-constants/regex.rb +17 -12
- 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: d669eacfafcfd0307eafea96d504f2f070849c066dbfe781ba3f41f37814d66b
|
4
|
+
data.tar.gz: 3cffd5e01d38cc63fe012cccbef7c981729fc2c9b636428dc95c682d5fbcdef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d46d1716505c6bc02c68a004748ce0d3b44bd65573a19b4b1f75c7b676c54b8785a1e96d91182ab407eb4e0f1a4620c6e1fb8fe519320597669425805f598679
|
7
|
+
data.tar.gz: bbdf4668123d8717065fc45f2694a073e3fe1eff4f6bfcdcf7ec93d84531e4009237216e9f339c722be11035307bec6f50a71cd2f500891ba0e5391d5912de69
|
@@ -1,99 +1,213 @@
|
|
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
|
|
95
202
|
def native_name_for_locale(locale)
|
96
|
-
|
203
|
+
begin
|
204
|
+
key = locale.to_s.split("-").map.with_index do |part, index|
|
205
|
+
index == 0 ? part.downcase : part.upcase
|
206
|
+
end.join("-").to_sym
|
207
|
+
LOCALES[key]
|
208
|
+
rescue StandardError
|
209
|
+
nil
|
210
|
+
end
|
97
211
|
end
|
98
212
|
|
99
213
|
end
|
@@ -3,18 +3,23 @@ module ImmosquareConstants
|
|
3
3
|
class << self
|
4
4
|
|
5
5
|
##============================================================##
|
6
|
-
##
|
7
|
-
##
|
8
|
-
##
|
9
|
-
##
|
10
|
-
##
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
6
|
+
## [A-Z0-9._%+-]+ : Correspond à un ou plusieurs caractères autorisés dans la partie locale de l'adresse email (avant le @), y compris les lettres, les chiffres et les caractères spéciaux courants.
|
7
|
+
## @ : Le symbole arobase séparant la partie locale du domaine.
|
8
|
+
## [A-Z0-9.-]+ : Correspond à un ou plusieurs caractères autorisés dans le nom de domaine, y compris les lettres, les chiffres, les points et les tirets.
|
9
|
+
## \. : Correspond à un point littéral . séparant le domaine de l'extension.
|
10
|
+
## [A-Z]{2,} : Correspond à une extension de domaine composée d'au moins deux lettres (par exemple, com, org, net, fr).
|
11
|
+
##============================================================##
|
12
|
+
def email_raw
|
13
|
+
/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/i
|
14
|
+
end
|
15
|
+
|
16
|
+
##============================================================##
|
17
|
+
## \A : Début de la chaîne.
|
18
|
+
## \z : Fin de la chaîne.
|
19
|
+
## /i : Modificateur rendant la correspondance insensible à la casse (majuscule/minuscule).
|
20
|
+
##============================================================##
|
16
21
|
def email
|
17
|
-
/\A
|
22
|
+
/\A#{email_raw.source}\z/i
|
18
23
|
end
|
19
24
|
|
20
25
|
##============================================================##
|
@@ -22,7 +27,7 @@ module ImmosquareConstants
|
|
22
27
|
## délimiteurs de mots \b à la place des délimiteurs de chaîne
|
23
28
|
##============================================================##
|
24
29
|
def email_in_string
|
25
|
-
/\b
|
30
|
+
/\b#{email_raw.source}\b/i
|
26
31
|
end
|
27
32
|
|
28
33
|
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.9
|
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-11 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.21
|
47
47
|
signing_key:
|
48
48
|
specification_version: 4
|
49
49
|
summary: ImmosquareConstants is a comprehensive collection of constants useful for
|