Commit 5fce325c91d510c11e622afa874067f609f82198
1 parent
16d81586
Exists in
master
and in
1 other branch
Extract translation key on navigation and session bar
Showing
3 changed files
with
14 additions
and
6 deletions
Show diff stats
app/views/shared/_navigation.html.haml
1 | 1 | #nav-bar |
2 | 2 | %ul |
3 | - //%li= link_to 'Dashboard', admin_dashboard_path, :class => active_if_here(:dashboards) | |
4 | - %li.apps{:class => active_if_here(:apps)}= link_to 'Apps', apps_path | |
5 | - %li.errs{:class => active_if_here(:problems)}= link_to 'Errors', problems_path | |
3 | + %li.apps{:class => active_if_here(:apps)}= link_to t('.apps'), apps_path | |
4 | + %li.errs{:class => active_if_here(:problems)}= link_to t('.errors'), problems_path | |
6 | 5 | - if user_signed_in? && current_user.admin? |
7 | - %li.users{:class => active_if_here(:users)}= link_to 'Users', users_path | |
6 | + %li.users{:class => active_if_here(:users)}= link_to t('.users'), users_path | |
8 | 7 | %div.clear | ... | ... |
app/views/shared/_session.html.haml
1 | 1 | - if current_user |
2 | 2 | %ul#session-links |
3 | - %li= link_to 'Sign out', destroy_session_path(:user), :id => 'sign-out', :method => :delete | |
4 | - %li= link_to 'Edit profile', edit_user_path(current_user), :id => 'edit-profile' | |
3 | + %li= link_to t('.sign_out'), destroy_session_path(:user), :id => 'sign-out', :method => :delete | |
4 | + %li= link_to t('.edit_profile'), edit_user_path(current_user), :id => 'edit-profile' | ... | ... |
config/locales/en.yml
... | ... | @@ -21,6 +21,15 @@ en: |
21 | 21 | errbit: 'Errbit' |
22 | 22 | powered_html: "Powered by %{link} : the open source error catcher." |
23 | 23 | |
24 | + shared: | |
25 | + navigation: | |
26 | + apps: 'Apps' | |
27 | + errors: 'Errors' | |
28 | + users: 'Users' | |
29 | + session: | |
30 | + sign_out: 'Sign out' | |
31 | + edit_profile: 'Edit profile' | |
32 | + | |
24 | 33 | controllers: |
25 | 34 | users: |
26 | 35 | flash: | ... | ... |