summaryrefslogtreecommitdiff
path: root/lib/rbot/plugins.rb
diff options
context:
space:
mode:
authorYaohan Chen <yaohan.chen@gmail.com>2008-06-05 22:20:18 -0400
committerYaohan Chen <yaohan.chen@gmail.com>2008-06-05 22:20:18 -0400
commit33c336af346dc08b4f4f4951dd6eae7150cef481 (patch)
tree15dfb8b38f2bf92f4c8b50b9460f511035183dea /lib/rbot/plugins.rb
parent21947daae8f66141d3c53ce2f58eab60701d52bf (diff)
each plugin uses its own po file
no modification in plugin source is needed, plugin loader is modified to automatically bind to the plugin's text domain updatepo task is modified to maintain per-plugin po file po files are updated and cleaned
Diffstat (limited to 'lib/rbot/plugins.rb')
-rw-r--r--lib/rbot/plugins.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb
index 250efa01..d1bf073a 100644
--- a/lib/rbot/plugins.rb
+++ b/lib/rbot/plugins.rb
@@ -533,6 +533,8 @@ module Plugins
# the idea here is to prevent namespace pollution. perhaps there
# is another way?
plugin_module = Module.new
+ # each plugin uses its own textdomain, we bind it automatically here
+ bindtextdomain_to(plugin_module, "rbot-#{File.basename(fname, '.rb')}")
desc = desc.to_s + " " if desc