diff options
author | Yaohan Chen <yaohan.chen@gmail.com> | 2008-06-05 22:20:18 -0400 |
---|---|---|
committer | Yaohan Chen <yaohan.chen@gmail.com> | 2008-06-05 22:20:18 -0400 |
commit | 33c336af346dc08b4f4f4951dd6eae7150cef481 (patch) | |
tree | 15dfb8b38f2bf92f4c8b50b9460f511035183dea /Rakefile | |
parent | 21947daae8f66141d3c53ce2f58eab60701d52bf (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 'Rakefile')
-rw-r--r-- | Rakefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -38,7 +38,15 @@ end desc "Update pot/po files." task :updatepo do require 'gettext/utils' - GetText.update_pofiles("rbot", Dir.glob("{lib,bin,data}/**/*.{rb,rhtml}"), "rbot") + plugin_files = Dir.glob('data/rbot/plugins/**/*.rb') + # all except plugin files use the rbot textdomain + GetText.update_pofiles("rbot", + Dir.glob("{lib,bin,data}/**/*.{rb,rhtml}") - plugin_files, "rbot") + # each plugin uses its own textdomain + plugin_files.each do |f| + basename = File.basename(f, '.rb') + GetText.update_pofiles("rbot-#{basename}", f, 'rbot') + end end desc "Create mo-files" |