immosquare-constants 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/immosquare-constants/locale.rb +12 -3
- data/lib/immosquare-constants/version.rb +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66e6fdddfe8d5b3700f1f14d0b355b9ef0da49174db20ea516fe0aa4eb8cf23c
|
4
|
+
data.tar.gz: 77d44924b9d4224fe3a7cc8eada1f98a2a0d6c5c16d30359592ea83763a2998f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad8ff8d7eb7b021344d53a6e859a748d667be4f0123fba569c8dbf7a12a7016a937588a316018e207e3880bfc23863b93f8803729c18d6b53de4470c30176825
|
7
|
+
data.tar.gz: 6d4b3090578cb4af74cb2b3aa686fa90765462503996ceb272b418f5d9d84f212d30aa5bb4b40ea578b62b87b28160c44603126137fda802107d26afc256a104
|
@@ -44,6 +44,7 @@ module ImmosquareConstants
|
|
44
44
|
:"en-ZA" => "English (South Africa)",
|
45
45
|
# Spanish (Spain, Latin America, United States)
|
46
46
|
:es => "Español",
|
47
|
+
:"es-LA" => "Español (Latinoamérica)",
|
47
48
|
:"es-AR" => "Español (Argentina)",
|
48
49
|
:"es-BO" => "Español (Bolivia)",
|
49
50
|
:"es-CL" => "Español (Chile)",
|
@@ -199,11 +200,19 @@ module ImmosquareConstants
|
|
199
200
|
|
200
201
|
class << self
|
201
202
|
|
203
|
+
##============================================================##
|
204
|
+
## Renvoie la liste des langues disponibles sans les langues régionales.
|
205
|
+
##============================================================##
|
206
|
+
def languages_with_native_names
|
207
|
+
LOCALES.reject {|key, _value| key.to_s.include?("-") }
|
208
|
+
end
|
209
|
+
|
210
|
+
##============================================================##
|
211
|
+
## Renvoie le nom de la langue correspondant à la locale passée en paramètre.
|
212
|
+
##============================================================##
|
202
213
|
def native_name_for_locale(locale)
|
203
214
|
begin
|
204
|
-
key = locale.to_s.split("-").map.with_index
|
205
|
-
index == 0 ? part.downcase : part.upcase
|
206
|
-
end.join("-").to_sym
|
215
|
+
key = locale.to_s.split("-").map.with_index {|part, index| index == 0 ? part.downcase : part.upcase }.join("-").to_sym
|
207
216
|
LOCALES[key]
|
208
217
|
rescue StandardError
|
209
218
|
nil
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- immosquare
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: ImmosquareConstants gem provides a robust set of constants to facilitate
|
14
13
|
application development across various domains
|
@@ -28,7 +27,6 @@ homepage: https://github.com/immosquare/immosquare-constants
|
|
28
27
|
licenses:
|
29
28
|
- MIT
|
30
29
|
metadata: {}
|
31
|
-
post_install_message:
|
32
30
|
rdoc_options: []
|
33
31
|
require_paths:
|
34
32
|
- lib
|
@@ -36,15 +34,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
36
34
|
requirements:
|
37
35
|
- - ">="
|
38
36
|
- !ruby/object:Gem::Version
|
39
|
-
version: 2.
|
37
|
+
version: 3.2.6
|
40
38
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
39
|
requirements:
|
42
40
|
- - ">="
|
43
41
|
- !ruby/object:Gem::Version
|
44
42
|
version: '0'
|
45
43
|
requirements: []
|
46
|
-
rubygems_version: 3.
|
47
|
-
signing_key:
|
44
|
+
rubygems_version: 3.6.8
|
48
45
|
specification_version: 4
|
49
46
|
summary: ImmosquareConstants is a comprehensive collection of constants useful for
|
50
47
|
a variety of applications.
|