diff options
Diffstat (limited to 'lib/rbot/load-gettext.rb')
-rw-r--r-- | lib/rbot/load-gettext.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb index 6d739296..5738f197 100644 --- a/lib/rbot/load-gettext.rb +++ b/lib/rbot/load-gettext.rb @@ -59,6 +59,12 @@ begin rescue LoadError, GetTextVersionError warn "failed to load ruby-gettext package: #{$!}; translations are disabled" + # undefine GetText, in case it got defined because the error was caused by a + # wrong version + if defined?(GetText) + Object.module_eval { remove_const("GetText") } + end + # dummy functions that return msg_id without translation def _(s) s |