]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4459 The "Quality Profiles" in the breadcrumb is not translated
authorJulien HENRY <julien.henry@sonarsource.com>
Wed, 31 Jul 2013 09:32:31 +0000 (11:32 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Wed, 31 Jul 2013 09:32:31 +0000 (11:32 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb

index 55f1f08497b952092d2f257afd3b249ce09081ca..599648fa1fef907978c30040437df5363b0ef7dc 100644 (file)
@@ -31,7 +31,7 @@ class AlertsController < ApplicationController
     @profile = Profile.find(params[:id])
     @alerts = @profile.valid_alerts.sort
     @alert=Alert.new
-    add_breadcrumbs ProfilesController::ROOT_BREADCRUMB, Api::Utils.language_name(@profile.language), {:name => @profile.name, :url => {:controller => 'rules_configuration', :action => 'index', :id => @profile.id}}
+    add_breadcrumbs ProfilesController::root_breadcrumb, Api::Utils.language_name(@profile.language), {:name => @profile.name, :url => {:controller => 'rules_configuration', :action => 'index', :id => @profile.id}}
   end
 
   #
index 3b3ae453aadcd6edd046e901b9979a9317f3e0aa..7c6447e77c835b1491ee23cebdac844f74b69d48 100644 (file)
 #
 class ProfilesController < ApplicationController
 
-  ROOT_BREADCRUMB = {:name => Api::Utils.message('quality_profiles.page'), :url => {:controller => 'profiles', :action => 'index'}}
+  def self.root_breadcrumb
+    {:name => Api::Utils.message('quality_profiles.page'), :url => {:controller => 'profiles', :action => 'index'}}
+  end
 
   before_filter :hide_sidebar
 
   # GET /profiles/index
   def index
-    add_breadcrumbs ROOT_BREADCRUMB
+    add_breadcrumbs ProfilesController::root_breadcrumb
     @profiles = Profile.all
     Api::Utils.insensitive_sort!(@profiles){|profile| profile.name}
   end
@@ -373,7 +375,7 @@ class ProfilesController < ApplicationController
         end
       end
     end
-    add_breadcrumbs ROOT_BREADCRUMB, Api::Utils.message('compare')
+    add_breadcrumbs ProfilesController::root_breadcrumb, Api::Utils.message('compare')
   end
 
   DIFF_IN1=1
@@ -519,6 +521,6 @@ class ProfilesController < ApplicationController
   end
 
   def set_profile_breadcrumbs
-    add_breadcrumbs ROOT_BREADCRUMB, Api::Utils.language_name(@profile.language), {:name => @profile.name, :url => {:controller => 'rules_configuration', :action => 'index', :id => @profile.id}}
+    add_breadcrumbs ProfilesController::root_breadcrumb, Api::Utils.language_name(@profile.language), {:name => @profile.name, :url => {:controller => 'rules_configuration', :action => 'index', :id => @profile.id}}
   end
 end
index 1daadeaba3ddd5bf022e08c3a73d5da7f93f43b1..1450440a5b2b7c09ffa6e7a3a3807e1fb70879e1 100644 (file)
@@ -33,7 +33,7 @@ class RulesConfigurationController < ApplicationController
     require_parameters :id
 
     @profile = Profile.find(params[:id])
-    add_breadcrumbs ProfilesController::ROOT_BREADCRUMB, Api::Utils.language_name(@profile.language),
+    add_breadcrumbs ProfilesController::root_breadcrumb, Api::Utils.language_name(@profile.language),
                     {:name => @profile.name, :url => {:controller => 'rules_configuration', :action => 'index', :id => @profile.id}}
 
     init_params()