mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:16:08 +08:00
FIX: respect default locale settings when seed
We seed special categories during migration so we have to set the locale before the migration happens.
This commit is contained in:
parent
96c19ed8b6
commit
29840888e5
|
@ -1,6 +1,10 @@
|
|||
# we need to run seed_fu every time we run rake db:migrate
|
||||
task 'db:migrate' => 'environment' do
|
||||
# we should set the locale before the migration
|
||||
task 'set_locale' do
|
||||
I18n.locale = (SiteSetting.default_locale || :en) rescue :en
|
||||
end
|
||||
|
||||
# we need to run seed_fu every time we run rake db:migrate
|
||||
task 'db:migrate' => ['environment', 'set_locale'] do
|
||||
SeedFu.seed
|
||||
|
||||
if SiteSetting.vacuum_db_days > 0 &&
|
||||
|
|
Loading…
Reference in New Issue
Block a user