knjrbfw 0.0.89 → 0.0.90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/knjrbfw.gemspec +2 -2
  3. data/lib/knj/locales.rb +6 -2
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.89
1
+ 0.0.90
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{knjrbfw}
8
- s.version = "0.0.89"
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-22}
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 = [
@@ -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
- raise "Could not figure out locale."
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.89
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-22 00:00:00 +02:00
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: -72964556422653407
397
+ hash: 4560335570508666088
398
398
  segments:
399
399
  - 0
400
400
  version: "0"