]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/users_controller.rb
Merge pull request #4062 from stalker314314/fix-erb-lint-copyright
[rails.git] / app / controllers / users_controller.rb
index 603feb4dbe9e7c0cddaad1193dc16331af2659fe..abd998030eda898c28d439f82d6156c219c701c9 100644 (file)
@@ -53,7 +53,7 @@ class UsersController < ApplicationController
   end
 
   def new
   end
 
   def new
-    @title = t "users.new.title"
+    @title = t ".title"
     @referer = if params[:referer]
                  safe_referer(params[:referer])
                else
     @referer = if params[:referer]
                  safe_referer(params[:referer])
                else
@@ -127,7 +127,7 @@ class UsersController < ApplicationController
     if request.xhr?
       render :partial => "terms"
     else
     if request.xhr?
       render :partial => "terms"
     else
-      @title = t "users.terms.title"
+      @title = t ".title"
 
       if current_user&.terms_agreed?
         # Already agreed to terms, so just show settings
 
       if current_user&.terms_agreed?
         # Already agreed to terms, so just show settings
@@ -151,7 +151,7 @@ class UsersController < ApplicationController
 
         redirect_to referer || edit_account_path
       elsif params[:decline]
 
         redirect_to referer || edit_account_path
       elsif params[:decline]
-        redirect_to t("users.terms.declined")
+        redirect_to t("users.terms.declined"), :allow_other_host => true
       else
         redirect_to :action => :terms
       end
       else
         redirect_to :action => :terms
       end
@@ -220,7 +220,7 @@ class UsersController < ApplicationController
   def go_public
     current_user.data_public = true
     current_user.save
   def go_public
     current_user.data_public = true
     current_user.save
-    flash[:notice] = t "users.go_public.flash success"
+    flash[:notice] = t ".flash success"
     redirect_to edit_account_path
   end
 
     redirect_to edit_account_path
   end
 
@@ -290,7 +290,7 @@ class UsersController < ApplicationController
         when "active", "confirmed"
           successful_login(user, request.env["omniauth.params"]["referer"])
         when "suspended"
         when "active", "confirmed"
           successful_login(user, request.env["omniauth.params"]["referer"])
         when "suspended"
-          failed_login t("sessions.new.account is suspended", :webmaster => "mailto:#{Settings.support_email}").html_safe
+          failed_login({ :partial => "sessions/suspended_flash" })
         else
           failed_login t("sessions.new.auth failure")
         end
         else
           failed_login t("sessions.new.auth failure")
         end
@@ -304,7 +304,7 @@ class UsersController < ApplicationController
   ##
   # omniauth failure callback
   def auth_failure
   ##
   # omniauth failure callback
   def auth_failure
-    flash[:error] = t(params[:message], :scope => "users.auth_failure", :default => t("users.auth_failure.unknown_error"))
+    flash[:error] = t(params[:message], :scope => "users.auth_failure", :default => t(".unknown_error"))
 
     origin = safe_referer(params[:origin]) if params[:origin]
 
 
     origin = safe_referer(params[:origin]) if params[:origin]