Skip to content

Commit

Permalink
fixup! fixup! feat: added disclaimer in activity template
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasPeters committed Sep 7, 2024
1 parent 05d540e commit b5c6d20
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
8 changes: 1 addition & 7 deletions app/models/activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,7 @@ def google_event(loc = nil)
return nil if start.nil? || self.end.nil?

loc = I18n.locale if loc.nil?

disclaimer_en = "[Data on this activity may be outdated, as it was addes as a one-time copy of the information " \
"given at that time]"
disclaimer_nl = "[Gegevens in deze afspraak kunnen outdated zijn, omdat deze waren toegevoegd als een eenmalig " \
"kopie van wat toen bekend was]"
disclaimer = loc == :nl ? disclaimer_nl : disclaimer_en

disclaimer = "[#{ I18n.t('activerecord.attributes.activity.disclaimer') }]"
description = "#{ activity_url }\n\n#{ description_localised(loc) }\n\n#{ disclaimer }"
uri_name = URI.encode_www_form_component(name)
uri_description = URI.encode_www_form_component(description)
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ en:
description: Description
description_en: English description
description_nl: Dutch description
disclaimer: Data on this activity may be outdated, as it was addes as a one-time copy of the information given at that time. Up-to-date info can be found on Koala.
end_date: Enddate
end_time: Endtime
google_event: Copy once to calendar
Expand Down
1 change: 1 addition & 0 deletions config/locales/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ nl:
description: Beschrijving
description_en: Engelse beschrijving
description_nl: Nederlandse beschrijving
disclaimer: Gegevens in deze afspraak kunnen outdated zijn, omdat deze waren toegevoegd als een eenmalig kopie van wat toen bekend was. Up-to-date informatie staat op Koala.
end_date: Einddatum
end_time: Eindtijd
google_event: Kopiëer eenmalig naar agenda
Expand Down

0 comments on commit b5c6d20

Please sign in to comment.