sort files in locales:check_interpolation and locales:check_parsing_by_psych rake tasks

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9915 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-07-05 12:52:28 +00:00
parent 1eebd030ca
commit cc2ee90f97
1 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,8 @@ namespace :locales do
dir = ENV['DIR'] || './config/locales'
en_strings = YAML.load(File.read(File.join(dir,'en.yml')))['en']
files = Dir.glob(File.join(dir,'*.{yaml,yml}'))
files.each do |file|
files.sort.each do |file|
puts "parsing #{file}..."
file_strings = YAML.load(File.read(file))
file_strings = file_strings[file_strings.keys.first]
@ -129,7 +130,7 @@ END_DESC
parser = Psych::Parser.new
dir = ENV['DIR'] || './config/locales'
files = Dir.glob(File.join(dir,'*.yml'))
files.each do |filename|
files.sort.each do |filename|
next if File.directory? filename
puts "parsing #{filename}..."
begin