This allows us to include a link in the flash message, without having
to use html_safe. Also refactor to avoid having html angle brackets in
the translation strings, while still allowing locale-specific urls.
if current_user
current_user.terms_seen = true
if current_user
current_user.terms_seen = true
- flash[:notice] = t("users.new.terms declined", :url => t("users.new.terms declined url")).html_safe if current_user.save
+ flash[:notice] = { :partial => "users/terms_declined_flash" } if current_user.save
if params[:referer]
redirect_to safe_referer(params[:referer])
if params[:referer]
redirect_to safe_referer(params[:referer])
--- /dev/null
+<%= t ".terms_declined_html", :terms_declined_link => link_to(t(".terms_declined_link"), t(".terms_declined_url")) %>
auth no password: "With third party authentication a password is not required, but some extra tools or server may still need one."
continue: Sign Up
terms accepted: "Thanks for accepting the new contributor terms!"
auth no password: "With third party authentication a password is not required, but some extra tools or server may still need one."
continue: Sign Up
terms accepted: "Thanks for accepting the new contributor terms!"
- terms declined: "We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see <a href=\"%{url}\">this wiki page</a>."
- terms declined url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined
terms:
title: "Terms"
heading: "Terms"
terms:
title: "Terms"
heading: "Terms"
france: "France"
italy: "Italy"
rest_of_world: "Rest of the world"
france: "France"
italy: "Italy"
rest_of_world: "Rest of the world"
+ terms_declined_flash:
+ terms_declined_html: We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see %{terms_declined_link}.
+ terms_declined_link: this wiki page
+ terms_declined_url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined
no_such_user:
title: "No such user"
heading: "The user %{user} does not exist"
no_such_user:
title: "No such user"
heading: "The user %{user} does not exist"