Permalink
Browse files

more i18n

  • Loading branch information...
ajb committed Apr 7, 2013
1 parent 75c9836 commit 21f156ba29e7c93ab8e14f03d4ee8c04d4575c70
Showing with 40 additions and 16 deletions.
  1. +8 −6 app/views/layouts/_dropdown_login_form.html.haml
  2. +9 −9 app/views/layouts/_navbar.html.haml
  3. +23 −1 config/locales/en.yml
@@ -1,11 +1,13 @@
.dropdown-menu
= form_tag users_signin_path, method: :post, class: "dropdown-login-form" do
- %h4 Sign in to Procure.io
- = text_field_tag :email, nil, placeholder: "Email Address"
- = password_field_tag :password, nil, placeholder: "Password"
+ %h4= t('.sign_in', site_name: t('site_name'))
+ = text_field_tag :email, nil, placeholder: t('email_address')
+ = password_field_tag :password, nil, placeholder: t('password')
.login-button-wrapper
- %button.btn.btn-primary Sign in
- or <a href="#{new_vendor_registration_path}">sign up</a>.
+ %button.btn.btn-primary= t('sign_in')
+ = t('.or_sign_up.line_html', link: link_to(t('.or_sign_up.link'), new_vendor_registration_path))
+
+
.forgot-password-wrapper
- Did you <a href="#{users_forgot_password_path}">forget your password</a>?
+ = t('.forgot_password.line_html', link: link_to(t('.forgot_password.link'), users_forgot_password_path))
@@ -5,11 +5,11 @@
%i.icon-bar
%i.icon-bar
%i.icon-bar
- %a.brand{"href" => root_path} Procure.io
+ %a.brand{"href" => root_path}= t('site_name')
.nav-collapse.collapse
%ul.nav
%li
- %a{"href" => projects_path} Browse Projects
+ %a{"href" => projects_path}= t('.browse_projects')
%ul.nav.pull-right
- if signed_in?
%li.dropdown
@@ -20,26 +20,26 @@
%ul.dropdown-menu
- if officer_signed_in?
%li
- =link_to "My Projects", mine_projects_path
+ =link_to t('.my_projects'), mine_projects_path
- elsif vendor_signed_in?
- if GlobalConfig.instance[:watch_projects_enabled]
%li
- =link_to "Watched Projects", vendor_projects_watches_path
+ =link_to t('.watched_projects'), vendor_projects_watches_path
- if GlobalConfig.instance[:save_searches_enabled]
%li
- =link_to "Saved Searches", saved_searches_path
+ =link_to t('.saved_searches'), saved_searches_path
%li
=link_to "Settings", settings_path
- if (can? :manage, GlobalConfig) || (can? :update, Officer)
%li.divider
- if can? :manage, GlobalConfig
%li
- =link_to "Global Config", global_config_path
+ =link_to t('.global_config'), global_config_path
- if can? :update, Officer
%li
- =link_to "Officers Admin", officers_path
+ =link_to t('.officers_admin'), officers_path
%li
%a{"href" => notifications_path}
%i.icon-envelope
@@ -52,9 +52,9 @@
- else
%li.dropdown
- %a.dropdown-toggle.js-dropdown-login-toggle{"href" => "#", "data-toggle" => "dropdown"} Sign in <strong class="caret"></strong>
+ %a.dropdown-toggle.js-dropdown-login-toggle{"href" => "#", "data-toggle" => "dropdown"} #{t('sign_in')} <strong class="caret"></strong>
= render "layouts/dropdown_login_form"
%a.show-tour-link.pull-right
- %span.label.label-success Explain this page
+ %span.label.label-success= t('.show_tour')
View
@@ -2,4 +2,26 @@
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
- hello: "Hello world"
+ site_name: Procure.io
+ sign_in: Sign in
+ email_address: Email Address
+ password: Password
+
+ layouts:
+ navbar:
+ my_projects: My Projects
+ watched_projects: Watched Projects
+ saved_searches: Saved Searches
+ browse_projects: Browse Projects
+ show_tour: Explain this page
+ global_config: Global Config
+ officers_admin: Officers Admin
+
+ dropdown_login_form:
+ sign_in: Sign in to %{site_name}
+ or_sign_up:
+ line_html: or %{link}
+ link: sign up
+ forgot_password:
+ line_html: Did you %{link}?
+ link: forget your password

0 comments on commit 21f156b

Please sign in to comment.