]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
GetText: add Config.datadir-based locale search path.
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 27 Aug 2007 22:16:10 +0000 (22:16 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 27 Aug 2007 22:16:10 +0000 (22:16 +0000)
This ensures that locale files are found regardless of rubygems being loaded or not

lib/rbot/ircbot.rb
lib/rbot/load-gettext.rb

index 72068a8e8a66850acbc01dd63644a7e1eb110047..98562d279a2b0cc4cbada544cbde8046245a9f92 100644 (file)
@@ -90,10 +90,9 @@ fatal "fatal test"
 # The following global is used for the improved signal handling.
 $interrupted = 0
 
-require 'rbot/load-gettext'
-
 # these first
 require 'rbot/rbotconfig'
+require 'rbot/load-gettext'
 require 'rbot/config'
 # require 'rbot/utils'
 
index e6c605d92c60f9aa71a21dc6e247e38859d3b446..e95d406837ccecceee52d43af7dcc1f792c4fef1 100644 (file)
@@ -22,6 +22,8 @@ begin
 
   include GetText
 
+  add_default_locale_path(File.join(Irc::Config.datadir, "../locale/%{locale}/LC_MESSAGES/%{name}.mo"))
+
   bindtextdomain 'rbot'
 
   module GetText