mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-26 20:54:21 +01:00
fix _t function in seed
This commit is contained in:
parent
72f3d8fd1e
commit
767a8cd332
@ -31,7 +31,7 @@ if StatisticField.count.zero?
|
|||||||
])
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
unless StatisticField.find_by(key:'groupName').try(:label)
|
unless StatisticField.find_by(key: 'groupName').try(:label)
|
||||||
field = StatisticField.find_or_initialize_by(key: 'groupName')
|
field = StatisticField.find_or_initialize_by(key: 'groupName')
|
||||||
field.label = 'Groupe'
|
field.label = 'Groupe'
|
||||||
field.statistic_index_id = 1
|
field.statistic_index_id = 1
|
||||||
@ -58,7 +58,7 @@ if StatisticSubType.count.zero?
|
|||||||
StatisticSubType.create!([
|
StatisticSubType.create!([
|
||||||
{ key: 'created', label: I18n.t('statistics.account_creation'),
|
{ key: 'created', label: I18n.t('statistics.account_creation'),
|
||||||
statistic_types: StatisticIndex.find_by(es_type_key: 'account').statistic_types },
|
statistic_types: StatisticIndex.find_by(es_type_key: 'account').statistic_types },
|
||||||
{ key: 'published', label:I18n.t('statistics.project_publication'),
|
{ key: 'published', label: I18n.t('statistics.project_publication'),
|
||||||
statistic_types: StatisticIndex.find_by(es_type_key: 'project').statistic_types }
|
statistic_types: StatisticIndex.find_by(es_type_key: 'project').statistic_types }
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
@ -222,7 +222,6 @@ if Machine.count.zero?
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if Category.count.zero?
|
if Category.count.zero?
|
||||||
Category.create!(
|
Category.create!(
|
||||||
[
|
[
|
||||||
@ -436,7 +435,6 @@ unless Setting.find_by(name: 'training_information_message').try(:value)
|
|||||||
setting.save
|
setting.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
unless Setting.find_by(name: 'fablab_name').try(:value)
|
unless Setting.find_by(name: 'fablab_name').try(:value)
|
||||||
setting = Setting.find_or_initialize_by(name: 'fablab_name')
|
setting = Setting.find_or_initialize_by(name: 'fablab_name')
|
||||||
setting.value = 'Fabrique'
|
setting.value = 'Fabrique'
|
||||||
@ -449,7 +447,6 @@ unless Setting.find_by(name: 'name_genre').try(:value)
|
|||||||
setting.save
|
setting.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
unless DatabaseProvider.count.positive?
|
unless DatabaseProvider.count.positive?
|
||||||
db_provider = DatabaseProvider.new
|
db_provider = DatabaseProvider.new
|
||||||
db_provider.save
|
db_provider.save
|
||||||
@ -648,7 +645,7 @@ unless Setting.find_by(name: 'link_name').try(:value)
|
|||||||
name = Setting.find_by(name: 'fablab_name')
|
name = Setting.find_by(name: 'fablab_name')
|
||||||
gender = Setting.find_by(name: 'name_genre')
|
gender = Setting.find_by(name: 'name_genre')
|
||||||
setting = Setting.find_or_initialize_by(name: 'link_name')
|
setting = Setting.find_or_initialize_by(name: 'link_name')
|
||||||
setting.value = _t('app.public.common.about_the_fablab', NAME: name, GENDER: gender)
|
setting.value = I18n.t('app.public.common.about_the_fablab', NAME: name, GENDER: gender)
|
||||||
setting.save
|
setting.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user