knjrbfw 0.0.89 → 0.0.90
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.
- data/VERSION +1 -1
- data/knjrbfw.gemspec +2 -2
- data/lib/knj/locales.rb +6 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.90
|
data/knjrbfw.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{knjrbfw}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.90"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kasper Johansen"]
|
12
|
-
s.date = %q{2012-08-
|
12
|
+
s.date = %q{2012-08-23}
|
13
13
|
s.description = %q{Including stuff for HTTP, SSH and much more.}
|
14
14
|
s.email = %q{k@spernj.org}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/knj/locales.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
#Fixes a bug in the 'locale'-gem when running under KDE and 'LANGUAGE'-ENV-variable is set but empty.
|
2
|
+
ENV["LANGUAGE"] = "en_GB" if ENV["LANGUAGE"] == ""
|
3
|
+
|
1
4
|
#This module can be used to handel various language-stuff.
|
2
5
|
module Knj::Locales
|
3
6
|
LANG_CONVERTIONS = {
|
@@ -8,7 +11,8 @@ module Knj::Locales
|
|
8
11
|
#===Examples
|
9
12
|
# Knj::Locales.lang #=> {"first" => "en", "second" => "GB", "full" => "en_GB"}
|
10
13
|
def self.lang
|
11
|
-
locale_str = self.locale.to_s
|
14
|
+
locale_str = self.locale.to_s.strip
|
15
|
+
locale_str = "en_GB" if locale_str.empty?
|
12
16
|
|
13
17
|
#Sometimes language can be 'en'. Convert that to 'en_GB' if that is so.
|
14
18
|
locale_str = Knj::Locales::LANG_CONVERTIONS[locale_str] if Knj::Locales::LANG_CONVERTIONS.key?(locale_str)
|
@@ -84,6 +88,6 @@ module Knj::Locales
|
|
84
88
|
return ENV["LANG"]
|
85
89
|
end
|
86
90
|
|
87
|
-
|
91
|
+
return "en_GB"
|
88
92
|
end
|
89
93
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: knjrbfw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.90
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kasper Johansen
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-08-
|
13
|
+
date: 2012-08-23 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -394,7 +394,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
394
394
|
requirements:
|
395
395
|
- - ">="
|
396
396
|
- !ruby/object:Gem::Version
|
397
|
-
hash:
|
397
|
+
hash: 4560335570508666088
|
398
398
|
segments:
|
399
399
|
- 0
|
400
400
|
version: "0"
|