X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=lib%2Frbot%2Fload-gettext.rb;h=5738f19726fd069293cb8a970d4477f4f1b0f607;hb=fdf1bc954352f19818f5f9f1c86643a2f8ef40c6;hp=6d73929657b30ac62bdf0c5335210bd77f2a1cfd;hpb=78cea25b77b40a3d3c40f38fa876176875492850;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git 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