summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaohan Chen <yaohan.chen@gmail.com>2008-06-21 14:16:09 -0400
committerYaohan Chen <yaohan.chen@gmail.com>2008-06-21 14:17:38 -0400
commit9febb80a02240ce2d184ae9dc39f4fdf521ae86d (patch)
treee99cb3b32dd771eab8d1af3c14f4265e01a1a100
parentf62d2eb537755b1724821c248ea9670ce2b1d038 (diff)
makemo task autocreates data/locale/*/LC_MESSAGES directories
-rw-r--r--Rakefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index ad4e469c..dd32743d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -65,7 +65,9 @@ end
# generate mo files
rule(%r'^data/locale/.+/LC_MESSAGES/.+\.mo$' => proc {|fn|
- fn.pathmap '%{^data/locale,po;LC_MESSAGES/,}X.po'
+ [ fn.pathmap('%{^data/locale,po;LC_MESSAGES/,}X.po'),
+ # the directory is created if not existing
+ fn.pathmap('%d') ]
}) do |t|
po_file, mo_file = t.source, t.name
require 'gettext/utils'
@@ -75,6 +77,10 @@ end
PLUGIN_BASENAMES = PLUGIN_FILES.map {|f| f.pathmap('%n')}
LOCALES = FileList['po/*/'].map {|d| d.pathmap('%n')}
+LOCALES.each do |l|
+ directory "data/locale/#{l}/LC_MESSAGES"
+end
+
desc 'Update po files'
task :updatepo => LOCALES.map {|l|
["po/#{l}/rbot.po"] +