diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-01 21:34:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-01 21:34:10 +0000 |
commit | e7caec6e7d1ac9c67878562f53c4ad2ba1e82217 (patch) | |
tree | b782b815784a97db7b2c9080b13568e71645b5ff /lib | |
parent | 6487c1803fa947f73c4667bb10f762a98487aa1b (diff) | |
download | redmine-e7caec6e7d1ac9c67878562f53c4ad2ba1e82217.tar.gz redmine-e7caec6e7d1ac9c67878562f53c4ad2ba1e82217.zip |
language for default configuration data can now be chosen when running 'load_default_data' task
git-svn-id: http://redmine.rubyforge.org/svn/trunk@132 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/load_default_data.rake | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/tasks/load_default_data.rake b/lib/tasks/load_default_data.rake index 8f122a4d9..f5a160545 100644 --- a/lib/tasks/load_default_data.rake +++ b/lib/tasks/load_default_data.rake @@ -1,9 +1,22 @@ -desc 'Load default configuration data (using default language)'
+desc 'Load default configuration data'
task :load_default_data => :environment do
include GLoc
set_language_if_valid($RDM_DEFAULT_LANG)
-
+ puts
+
+ while true
+ print "Select language: "
+ print GLoc.valid_languages.sort {|x,y| x.to_s <=> y.to_s }.join(", ")
+ print " [#{GLoc.current_language}] "
+ lang = STDIN.gets.chomp!
+ break if lang.empty?
+ break if set_language_if_valid(lang)
+ puts "Unknown language!"
+ end
+
+ puts "===================================="
+
begin
# check that no data already exists
if Role.find(:first)
@@ -19,7 +32,7 @@ begin raise "Some enumerations are already defined."
end
- puts "Loading default configuration for language: #{current_language}"
+ puts "Loading default configuration data for language: #{current_language}"
# roles
manager = Role.create :name => l(:default_role_manager)
@@ -83,6 +96,6 @@ begin rescue => error
puts "Error: " + error
- puts "Default configuration can't be loaded."
+ puts "Default configuration data can't be loaded."
end
end
\ No newline at end of file |