-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make admin notifications seed data translatable
- Loading branch information
Showing
3 changed files
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,28 @@ | ||
section "Creating Admin Notifications & Templates" do | ||
AdminNotification.create!( | ||
title: 'New usage Terms & Conditions!', | ||
segment_recipient: 'administrators', | ||
body: 'We have improved our usage terms & conditions! please check them out to be up to date.', | ||
link: 'http:https://localhost:3000/condiciones-de-uso' | ||
title: I18n.t('seeds.admin_notification.internal_link.title'), | ||
body: I18n.t('seeds.admin_notification.internal_link.body'), | ||
link: Setting['url'] + I18n.t('seeds.admin_notification.internal_link.link'), | ||
segment_recipient: 'administrators' | ||
).deliver | ||
|
||
AdminNotification.create!( | ||
title: 'Help us translate consul 🤓', | ||
segment_recipient: 'administrators', | ||
body: 'If you are proficient in a language, please help us translate consul!.', | ||
link: 'https://crwd.in/consul' | ||
title: I18n.t('seeds.admin_notification.external_link.title'), | ||
body: I18n.t('seeds.admin_notification.external_link.body'), | ||
link: I18n.t('seeds.admin_notification.external_link.link'), | ||
segment_recipient: 'administrators' | ||
).deliver | ||
|
||
AdminNotification.create!( | ||
title: 'You can now geolocate proposals & investments', | ||
segment_recipient: 'administrators', | ||
body: 'When you create a proposal or investment you now can specify a point on a map 🗺' | ||
).deliver | ||
|
||
AdminNotification.create!( | ||
title: 'We just opened a new Participatory Budget!', | ||
segment_recipient: 'administrators', | ||
link: 'https://www.decide.madrid.es/presupuestos2018/1', | ||
body: 'Start creating proposals for budget investments!' | ||
title: I18n.t('seeds.admin_notification.without_link.title'), | ||
body: I18n.t('seeds.admin_notification.without_link.body'), | ||
segment_recipient: 'administrators' | ||
).deliver | ||
|
||
AdminNotification.create!( | ||
title: 'We are closing the 2018 Participatory Budget!!', | ||
title: I18n.t('seeds.admin_notification.not_sent.title'), | ||
body: I18n.t('seeds.admin_notification.not_sent.body'), | ||
segment_recipient: 'administrators', | ||
link: 'https://www.decide.madrid.es/presupuestos2018/1', | ||
body: 'Hurry up and create a last proposal before it ends next in two days!', | ||
sent_at: nil | ||
) | ||
end |