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:
parent
1eebd030ca
commit
cc2ee90f97
|
@ -41,7 +41,8 @@ namespace :locales do
|
||||||
dir = ENV['DIR'] || './config/locales'
|
dir = ENV['DIR'] || './config/locales'
|
||||||
en_strings = YAML.load(File.read(File.join(dir,'en.yml')))['en']
|
en_strings = YAML.load(File.read(File.join(dir,'en.yml')))['en']
|
||||||
files = Dir.glob(File.join(dir,'*.{yaml,yml}'))
|
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 = YAML.load(File.read(file))
|
||||||
file_strings = file_strings[file_strings.keys.first]
|
file_strings = file_strings[file_strings.keys.first]
|
||||||
|
|
||||||
|
@ -129,7 +130,7 @@ END_DESC
|
||||||
parser = Psych::Parser.new
|
parser = Psych::Parser.new
|
||||||
dir = ENV['DIR'] || './config/locales'
|
dir = ENV['DIR'] || './config/locales'
|
||||||
files = Dir.glob(File.join(dir,'*.yml'))
|
files = Dir.glob(File.join(dir,'*.yml'))
|
||||||
files.each do |filename|
|
files.sort.each do |filename|
|
||||||
next if File.directory? filename
|
next if File.directory? filename
|
||||||
puts "parsing #{filename}..."
|
puts "parsing #{filename}..."
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue