Commit 16d81586c21a816d2b45597c88e34f360000bd35
1 parent
da637097
Exists in
master
and in
1 other branch
Extract I18n key from views/layouts/application.html.haml
Showing
2 changed files
with
10 additions
and
3 deletions
Show diff stats
app/views/layouts/application.html.haml
... | ... | @@ -2,7 +2,8 @@ |
2 | 2 | %html |
3 | 3 | %head |
4 | 4 | %title |
5 | - Errbit — | |
5 | + = t('.title') | |
6 | + — | |
6 | 7 | = yield(:page_title).present? ? yield(:page_title) : yield(:title) |
7 | 8 | %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "content-type" }/ |
8 | 9 | = favicon_link_tag |
... | ... | @@ -14,7 +15,7 @@ |
14 | 15 | %body{:id => controller.controller_name, :class => controller.action_name} |
15 | 16 | #header |
16 | 17 | %div |
17 | - = link_to 'Errbit', root_path, :id => 'site-name' | |
18 | + = link_to t('.errbit'), root_path, :id => 'site-name' | |
18 | 19 | = render 'shared/navigation' if current_user |
19 | 20 | = render 'shared/session' |
20 | 21 | #content-wrapper |
... | ... | @@ -30,5 +31,5 @@ |
30 | 31 | - if content_for?(:comments) |
31 | 32 | #content-comments |
32 | 33 | = yield :comments |
33 | - #footer Powered by #{link_to 'Errbit', 'http://github.com/errbit/errbit', :target => '_blank'}: the open source error catcher. | |
34 | + #footer= t('.powered_html', :link => link_to(t('.errbit'), 'http://github.com/errbit/errbit', :target => '_blank')) | |
34 | 35 | = yield :scripts | ... | ... |
config/locales/en.yml
... | ... | @@ -15,6 +15,11 @@ en: |
15 | 15 | one: "%{count} err has" |
16 | 16 | other: "%{count} errs have" |
17 | 17 | |
18 | + layouts: | |
19 | + application: | |
20 | + title: 'Errbit' | |
21 | + errbit: 'Errbit' | |
22 | + powered_html: "Powered by %{link} : the open source error catcher." | |
18 | 23 | |
19 | 24 | controllers: |
20 | 25 | users: |
... | ... | @@ -24,6 +29,7 @@ en: |
24 | 29 | error: "You can't delete yourself" |
25 | 30 | update: |
26 | 31 | success: "%{name}'s information was successfully updated." |
32 | + | |
27 | 33 | devise: |
28 | 34 | registrations: |
29 | 35 | signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.' | ... | ... |