diff options
author | Yaohan Chen <yaohan.chen@gmail.com> | 2008-06-21 14:16:09 -0400 |
---|---|---|
committer | Yaohan Chen <yaohan.chen@gmail.com> | 2008-06-21 14:17:38 -0400 |
commit | 9febb80a02240ce2d184ae9dc39f4fdf521ae86d (patch) | |
tree | e99cb3b32dd771eab8d1af3c14f4265e01a1a100 /Rakefile | |
parent | f62d2eb537755b1724821c248ea9670ce2b1d038 (diff) |
makemo task autocreates data/locale/*/LC_MESSAGES directories
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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"] + |