aboutsummaryrefslogtreecommitdiffstats
path: root/core/boot
diff options
context:
space:
mode:
authorToshiaki Asai <toshi.alternative@gmail.com>2013-07-06 10:36:45 +0900
committerToshiaki Asai <toshi.alternative@gmail.com>2013-07-06 10:36:45 +0900
commit8c67580ebc841fc4c7367747d786a6775d7d0e2d (patch)
tree1be092a8a5f94cd6ce77d608750eb7b0c32d2dba /core/boot
parent9f43b6558e804f6a5f15ddf7a74ca1d7a2e90d0e (diff)
downloadmikutter-8c67580ebc841fc4c7367747d786a6775d7d0e2d.tar.gz
pot作成中にエラーが発生しても他のをがんばって作る
Diffstat (limited to 'core/boot')
-rw-r--r--core/boot/shell/makepot.rb18
1 files changed, 13 insertions, 5 deletions
diff --git a/core/boot/shell/makepot.rb b/core/boot/shell/makepot.rb
index 2334d697..b4b97702 100644
--- a/core/boot/shell/makepot.rb
+++ b/core/boot/shell/makepot.rb
@@ -9,13 +9,21 @@ mo_root = File.join(CHIConfig::CACHE, "uitranslator", "locale")
Miquire::Plugin.loadpath << Environment::PLUGIN_PATH << File.join(File.dirname(__FILE__), "..", "..", "plugin") << File.join(Environment::CONFROOT, 'plugin')
enable_plugins = ARGV[1,]
+failed_plugins = []
Miquire::Plugin.each_spec do |spec|
- if enable_plugins.empty? or enable_plugins.include? spec[:slug].to_s
+ if (enable_plugins.empty? or enable_plugins.include? spec[:slug].to_s) and
+ (defined?(spec[:depends][:plugin]) and spec[:depends][:plugin].include? "uitranslator")
po_root = File.join spec[:path], "po"
- GetText.update_pofiles(spec[:slug].to_s,
- Dir.glob("#{spec[:path]}/**/*.rb"),
- "#{spec[:slug]} #{spec[:version]}",
- po_root: po_root)
+ begin
+ GetText.update_pofiles(spec[:slug].to_s,
+ Dir.glob("#{spec[:path]}/**/*.rb"),
+ "#{spec[:slug]} #{spec[:version]}",
+ po_root: po_root)
+ rescue Exception => e
+ failed_plugins << spec[:slug]
+ end
end
end
+
+puts "failed plugins: #{failed_plugins}" unless failed_plugins.empty?