summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-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"] +