From 3a4ff794de347b7fcfbe940778ef47f4dbec1af0 Mon Sep 17 00:00:00 2001 From: pixeldesu Date: Sun, 7 Jun 2015 23:52:03 +0200 Subject: [PATCH] add some missing locales --- app/views/layouts/_header.html.haml | 10 +++++----- app/views/shared/_modal_ask_followers.html.haml | 12 ++++++------ config/locales/en.yml | 8 +++++++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 106e06bd..ee9b1d40 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -26,19 +26,19 @@ %ul.nav.navbar-nav.navbar-right - unless @user.nil? - unless @user == current_user - %li.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: "Manage group memberships"} + %li.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t('views.actions.group')} %a{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }} %i.fa.fa-users.hidden-xs - %span.visible-xs Manage group memberships + %span.visible-xs= t('views.actions.group') = render "layouts/notifications" - %li.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: "Ask a question"} + %li.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t('views.actions.ask_question')} .btn.btn-link.navbar-btn{name: "toggle-all-ask", "data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"} %i.fa.fa-pencil-square-o = render "layouts/profile" - else %ul.nav.navbar-nav.navbar-right - = nav_entry "Sign in", new_user_session_path - = nav_entry "Sign up", new_user_registration_path + = nav_entry t('views.sessions.create'), new_user_session_path + = nav_entry t('views.actions.new'), new_user_registration_path - if user_signed_in? = render 'shared/modal_ask_followers' diff --git a/app/views/shared/_modal_ask_followers.html.haml b/app/views/shared/_modal_ask_followers.html.haml index 1df6e78d..84ad6afd 100644 --- a/app/views/shared/_modal_ask_followers.html.haml +++ b/app/views/shared/_modal_ask_followers.html.haml @@ -4,18 +4,18 @@ .modal-header %button.close{"data-dismiss" => "modal", :type => "button"} %span{"aria-hidden" => "true"} × - %span.sr-only Close - %h4#modal-ask-followers-label.modal-title Ask your followers + %span.sr-only= t 'views.actions.close' + %h4#modal-ask-followers-label.modal-title= t 'views.modal.ask.title' .modal-body %textarea.form-control{:name => "qb-all-question", :placeholder => "Type your question here…"} .modal-footer - if current_user.groups.count > 0 %label - Choose group: + = t 'views.modal.ask.choose' %select{name: 'qb-all-rcpt', class: 'form-control', autocomplete: 'off'} - %option{value: 'followers', selected: true} Followers + %option{value: 'followers', selected: true}= t('views.general.follower').pluralize(2) %optgroup{label: 'Groups'} - current_user.groups.each do |group| %option{value: "grp:#{group.name}"}= group.display_name - %button.btn.btn-default{"data-dismiss" => "modal", :type => "button"} Cancel - %button.btn.btn-primary{name: 'qb-all-ask', :type => "button", data: {loading_text: 'Asking...' }} Ask \ No newline at end of file + %button.btn.btn-default{"data-dismiss" => "modal", :type => "button"}= t 'views.actions.cancel' + %button.btn.btn-primary{name: 'qb-all-ask', :type => "button", data: {loading_text: t('views.modal.ask.loading') }}= t 'views.actions.ask' diff --git a/config/locales/en.yml b/config/locales/en.yml index df185fb9..2efd8e68 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -210,6 +210,8 @@ en: members: "Members" actions: title: "Actions" + ask: "Ask" + ask_question: "Ask a question" answer: "Answer" options: "Options" anonymous: "Hide your name" @@ -347,7 +349,7 @@ en: password_confirm: "Confirm password" password_help: "Leave this blank if you don't want to change it" password_current: "Current password" - password_current_help: + password_current_help: "We need your current password to confirm your changes" delete: "Delete my account" unsatisfied: "Unsatisfied?" back: "Back" @@ -374,6 +376,10 @@ en: disconnect: "Disconnect" confirm: "Really disconnect service %{service}?" modal: + ask: + title: "Ask your followers" + choose: "Choose group:" + loading: "Asking..." bancontrol: title: "Ban Control Center" ban: "Ban?"