From 9febb80a02240ce2d184ae9dc39f4fdf521ae86d Mon Sep 17 00:00:00 2001 From: Yaohan Chen Date: Sat, 21 Jun 2008 14:16:09 -0400 Subject: makemo task autocreates data/locale/*/LC_MESSAGES directories --- Rakefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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"] + -- cgit v1.2.3