From bbf05f99728a39280a19d60cc428a40b2f094ce5 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 27 Aug 2007 22:16:10 +0000 Subject: GetText: add Config.datadir-based locale search path. This ensures that locale files are found regardless of rubygems being loaded or not --- lib/rbot/ircbot.rb | 3 +-- lib/rbot/load-gettext.rb | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 72068a8e..98562d27 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -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' diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb index e6c605d9..e95d4068 100644 --- a/lib/rbot/load-gettext.rb +++ b/lib/rbot/load-gettext.rb @@ -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 -- cgit v1.2.3