From 5fce325c91d510c11e622afa874067f609f82198 Mon Sep 17 00:00:00 2001 From: Cyril Mougel Date: Wed, 26 Jun 2013 15:49:28 +0200 Subject: [PATCH] Extract translation key on navigation and session bar --- app/views/shared/_navigation.html.haml | 7 +++---- app/views/shared/_session.html.haml | 4 ++-- config/locales/en.yml | 9 +++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/views/shared/_navigation.html.haml b/app/views/shared/_navigation.html.haml index 9e036a5..f075254 100644 --- a/app/views/shared/_navigation.html.haml +++ b/app/views/shared/_navigation.html.haml @@ -1,8 +1,7 @@ #nav-bar %ul - //%li= link_to 'Dashboard', admin_dashboard_path, :class => active_if_here(:dashboards) - %li.apps{:class => active_if_here(:apps)}= link_to 'Apps', apps_path - %li.errs{:class => active_if_here(:problems)}= link_to 'Errors', problems_path + %li.apps{:class => active_if_here(:apps)}= link_to t('.apps'), apps_path + %li.errs{:class => active_if_here(:problems)}= link_to t('.errors'), problems_path - if user_signed_in? && current_user.admin? - %li.users{:class => active_if_here(:users)}= link_to 'Users', users_path + %li.users{:class => active_if_here(:users)}= link_to t('.users'), users_path %div.clear diff --git a/app/views/shared/_session.html.haml b/app/views/shared/_session.html.haml index 7889bfe..3770ba0 100644 --- a/app/views/shared/_session.html.haml +++ b/app/views/shared/_session.html.haml @@ -1,4 +1,4 @@ - if current_user %ul#session-links - %li= link_to 'Sign out', destroy_session_path(:user), :id => 'sign-out', :method => :delete - %li= link_to 'Edit profile', edit_user_path(current_user), :id => 'edit-profile' + %li= link_to t('.sign_out'), destroy_session_path(:user), :id => 'sign-out', :method => :delete + %li= link_to t('.edit_profile'), edit_user_path(current_user), :id => 'edit-profile' diff --git a/config/locales/en.yml b/config/locales/en.yml index cb03918..7220718 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -21,6 +21,15 @@ en: errbit: 'Errbit' powered_html: "Powered by %{link} : the open source error catcher." + shared: + navigation: + apps: 'Apps' + errors: 'Errors' + users: 'Users' + session: + sign_out: 'Sign out' + edit_profile: 'Edit profile' + controllers: users: flash: -- libgit2 0.21.2