i18n_country_select 1.0.17 → 1.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +7 -6
- data/lib/i18n_country_select.rb +3 -1
- data/lib/i18n_country_select/instance_tag.rb +10 -1
- data/lib/i18n_country_select/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00d7fc9362f2f2ab078a89b44443418ab8d70bdf
|
4
|
+
data.tar.gz: 140c210775c90f0b92576a237b524580cb6deaef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba8ebb357eef9ca79398f518932c76e66bf5cc55083d091068f07e0f3e5f236cf5ab641b3b1df6523175c64b713b938d4e8deac42b605a03633271421df7dbe
|
7
|
+
data.tar.gz: fdbb619aaeac2148dcfb7db2bc5fbae4114b0ceb786e3d9947092cd5f83ef9c0663d24fc00a3dd00b15b6689e7bcd8994622b387be97b0f8e9534b56f76365d8
|
data/README.rdoc
CHANGED
@@ -39,12 +39,13 @@ Supplying priority countries to be placed at the top of the list:
|
|
39
39
|
Based on the deprecated country_code_select by: Russ Smith (russ@bashme.org) and Frank Wambutt (frank@mo-stud.io)
|
40
40
|
|
41
41
|
== Version History
|
42
|
-
1.0.
|
43
|
-
1.0.
|
44
|
-
1.0.
|
45
|
-
1.0.
|
46
|
-
1.0.
|
47
|
-
1.0.
|
42
|
+
* 1.0.18 - Fixed translated sorting
|
43
|
+
* 1.0.17 - Removing duplicate country code IE
|
44
|
+
* 1.0.16 - Removing unnecessary value attribute and corrected spelling error on the include_blank option tag
|
45
|
+
* 1.0.15 - Removing more duplicate country codes
|
46
|
+
* 1.0.14 - Removing duplicate country codes and adding Norway
|
47
|
+
* 1.0.13 - Ignore missing translations from i18n-country-translations
|
48
|
+
* 1.0.12 - Adds the ability to specify text to use in a blank option
|
48
49
|
|
49
50
|
== License
|
50
51
|
|
data/lib/i18n_country_select.rb
CHANGED
@@ -13,7 +13,9 @@ module I18nCountrySelect
|
|
13
13
|
country_translations = country_translations = COUNTRY_CODES.map do |code|
|
14
14
|
translation = I18n.t(code, :scope => :countries, :default => 'missing')
|
15
15
|
translation == 'missing' ? nil : [translation, code]
|
16
|
-
end.compact.
|
16
|
+
end.compact.sort_by do |translation, code|
|
17
|
+
normalize_translation(translation)
|
18
|
+
end
|
17
19
|
|
18
20
|
countries = ""
|
19
21
|
|
@@ -34,5 +36,12 @@ module I18nCountrySelect
|
|
34
36
|
|
35
37
|
content_tag(:select, countries.html_safe, html_options)
|
36
38
|
end
|
39
|
+
|
40
|
+
private
|
41
|
+
def normalize_translation(translation)
|
42
|
+
UnicodeUtils.canonical_decomposition(translation).split('').select do |c|
|
43
|
+
UnicodeUtils.general_category(c) =~ /Letter|Separator|Punctuation|Number/
|
44
|
+
end.join
|
45
|
+
end
|
37
46
|
end
|
38
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n_country_select
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian McQuay (brian@onomojo.com)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -39,19 +39,19 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.0.9
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: unicode_utils
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 1.0.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 1.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: 1.3.5
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project: '[none]'
|
131
|
-
rubygems_version: 2.0.
|
131
|
+
rubygems_version: 2.0.6
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: I18n country select helper
|