##// END OF EJS Templates
Flush buffer when asking for language (#2948)....
Flush buffer when asking for language (#2948). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2573 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2505:b622e0f8ce68
r2505:b622e0f8ce68
Show More
load_default_data.rake
30 lines | 818 B | text/x-ruby | RubyLexer
/ lib / tasks / load_default_data.rake
Jean-Philippe Lang
Added namespace for Redmine specific rake tasks....
r680 desc 'Load Redmine default configuration data'
Jean-Philippe Lang
Localization plugin removed (replaced with GLoc)...
r12
Jean-Philippe Lang
Added namespace for Redmine specific rake tasks....
r680 namespace :redmine do
Jean-Philippe Lang
Moved redmine:load_default_data code to a module so that it can be called from the application....
r1024 task :load_default_data => :environment do
Jean-Philippe Lang
Merged Rails 2.2 branch. Redmine now requires Rails 2.2.2....
r2430 include Redmine::I18n
Jean-Philippe Lang
Moved redmine:load_default_data code to a module so that it can be called from the application....
r1024 set_language_if_valid('en')
puts
Jean-Philippe Lang
language for default configuration data can now be chosen when running 'load_default_data' task...
r129
Jean-Philippe Lang
Moved redmine:load_default_data code to a module so that it can be called from the application....
r1024 while true
print "Select language: "
Jean-Philippe Lang
Merged Rails 2.2 branch. Redmine now requires Rails 2.2.2....
r2430 print valid_languages.collect(&:to_s).sort.join(", ")
print " [#{current_language}] "
Jean-Philippe Lang
Flush buffer when asking for language (#2948)....
r2505 STDOUT.flush
Jean-Philippe Lang
Moved redmine:load_default_data code to a module so that it can be called from the application....
r1024 lang = STDIN.gets.chomp!
break if lang.empty?
break if set_language_if_valid(lang)
puts "Unknown language!"
end
Jean-Philippe Lang
* new report: project activity...
r42
Jean-Philippe Lang
Moved redmine:load_default_data code to a module so that it can be called from the application....
r1024 puts "===================================="
begin
Redmine::DefaultData::Loader.load(current_language)
puts "Default configuration data loaded."
rescue => error
puts "Error: " + error
puts "Default configuration data was not loaded."
end
end
Jean-Philippe Lang
Added namespace for Redmine specific rake tasks....
r680 end