From e1c0b7f23d7be1d8f3139aa255bd121969ece97a Mon Sep 17 00:00:00 2001 From: jessib Date: Tue, 22 Jan 2013 11:12:37 -0800 Subject: Translate text rather than having it in code directly. --- help/app/controllers/tickets_controller.rb | 3 ++- help/config/locales/en.yml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 help/config/locales/en.yml (limited to 'help') diff --git a/help/app/controllers/tickets_controller.rb b/help/app/controllers/tickets_controller.rb index b613088..372ff6e 100644 --- a/help/app/controllers/tickets_controller.rb +++ b/help/app/controllers/tickets_controller.rb @@ -24,7 +24,8 @@ class TicketsController < ApplicationController end flash[:notice] = 'Ticket was successfully created.' if @ticket.save if !logged_in? - flash[:notice] = flash[:notice] + ' You can later access this ticket at the url ' + request.protocol + request.host_with_port + ticket_path(@ticket.id) + '. You might want to bookmark this page to find it again. Anybody with this URL will be able to access this ticket, so if you are on a shared computer you might want to remove it from the browser history' #todo + # cannot set this until ticket has been saved, as @ticket.id will not be set + flash[:notice] += " " + t(:access_ticket_text, :full_url => request.protocol + request.host_with_port + ticket_path(@ticket.id)) end respond_with(@ticket) diff --git a/help/config/locales/en.yml b/help/config/locales/en.yml new file mode 100644 index 0000000..4ea662a --- /dev/null +++ b/help/config/locales/en.yml @@ -0,0 +1,2 @@ +en: + access_ticket_text: "You can later access this ticket at the url %{full_url}. You might want to bookmark this page to find it again. Anybody with this URL will be able to access this ticket, so if you are on a shared computer you might want to remove it from the browser history" -- cgit v1.2.3