[PATCH conductor] Internationalized breadcrumb controllers' names.
jzigmund at redhat.com
jzigmund at redhat.com
Mon Feb 13 16:10:26 UTC 2012
From: Jozef Zigmund <jzigmund at redhat.com>
---
src/app/controllers/application_controller.rb | 3 ++-
src/config/locales/en.yml | 12 ++++++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index 7f74a81..4f73f61 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -239,7 +239,8 @@ class ApplicationController < ActionController::Base
breadcrumbs.slice!(index, breadcrumbs.length)
end
read_breadcrumbs
- breadcrumbs.push({:name => name, :path => path, :viewstate => viewstate, :class => controller_name})
+ name = t("breadcrumbs.#{name}") if self.controller_name.eql?(name)
+ breadcrumbs.push({:name => name, :path => path, :viewstate => viewstate})
session[:breadcrumbs] = breadcrumbs
end
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index cb31af3..ed03520 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -1307,3 +1307,15 @@ en:
words_connector: ', '
two_words_connector: ' and '
last_word_connector: ', and '
+ breadcrumbs:
+ pools: Pools
+ instances: Instances
+ pool_families: Pool Families
+ users: Users
+ realms: Realms
+ roles: Roles
+ hardware_profiles: Hardware Profiles
+ catalogs: Catalogs
+ provider_realms: Provider Realms
+ deployables: Deployables
+ deployments: Deployments
--
1.7.7.6
More information about the aeolus-devel
mailing list