localize placeholders

This commit is contained in:
pixeldesu 2015-06-08 20:48:23 +02:00
parent d13cdb27dc
commit d28f64adf1
7 changed files with 19 additions and 13 deletions

View file

@ -14,7 +14,7 @@
= pluralize(i.question.answer_count, t('views.inbox.entry.response')) = pluralize(i.question.answer_count, t('views.inbox.entry.response'))
%p.answerbox--question-text= i.question.content %p.answerbox--question-text= i.question.content
.panel-body .panel-body
%textarea.form-control{name: 'ib-answer', placeholder: 'Write your answer here...', data: { id: i.id }} %textarea.form-control{name: 'ib-answer', placeholder: t('views.placeholder.inbox'), data: { id: i.id }}
%br/ %br/
%button.btn.btn-success{name: 'ib-answer', data: { ib_id: i.id }} %button.btn.btn-success{name: 'ib-answer', data: { ib_id: i.id }}
= t 'views.actions.answer' = t 'views.actions.answer'

View file

@ -24,5 +24,5 @@
= t 'views.actions.delete' = t 'views.actions.delete'
%p.comments--content= comment.content %p.comments--content= comment.content
.form-group.has-feedback{name: 'mod-comment-new-group', data: { id: report.id }} .form-group.has-feedback{name: 'mod-comment-new-group', data: { id: report.id }}
%input.form-control.comments--box{type: :text, placeholder: 'Comment...', name: 'mod-comment-new', data: { id: report.id }} %input.form-control.comments--box{type: :text, placeholder: t('views.placeholder.comment'), name: 'mod-comment-new', data: { id: report.id }}
%span.text-muted.form-control-feedback.comments--count{id: "mod-comment-charcount-#{report.id}"} 160 %span.text-muted.form-control-feedback.comments--count{id: "mod-comment-charcount-#{report.id}"} 160

View file

@ -17,14 +17,13 @@
- if user_signed_in? and !current_user.answered? @question and current_user != @question.user and @question.user.privacy_allow_stranger_answers - if user_signed_in? and !current_user.answered? @question and current_user != @question.user and @question.user.privacy_allow_stranger_answers
.panel.panel-default#q-answer-box .panel.panel-default#q-answer-box
.panel-heading .panel-heading
%h3.panel-title This question was not in your inbox? Answer it here! %h3.panel-title= t('views.question.title')
.panel-body .panel-body
%textarea#q-answer.form-control{placeholder: 'Write your answer here...', data: { id: @question.id }} %textarea#q-answer.form-control{placeholder: t('views.placeholder.inbox'), data: { id: @question.id }}
%br/ %br/
%button#q-answer.btn.btn-success{data: { q_id: @question.id }} %button#q-answer.btn.btn-success{data: { q_id: @question.id }}
Answer = t('views.actions.answer')
- current_user.services.each do |service| - current_user.services.each do |service|
%label %label
%input{type: 'checkbox', name: 'share', checked: :checked, data: { q_id: @question.id, service: service.provider }} %input{type: 'checkbox', name: 'share', checked: :checked, data: { q_id: @question.id, service: service.provider }}
Post to = t('views.inbox.entry.sharing.post', service: service.provider.capitalize)
= service.provider.capitalize

View file

@ -51,5 +51,5 @@
= markdown comment.content = markdown comment.content
- if user_signed_in? - if user_signed_in?
.form-group.has-feedback{name: 'ab-comment-new-group', data: { a_id: a.id }} .form-group.has-feedback{name: 'ab-comment-new-group', data: { a_id: a.id }}
%input.form-control.comments--box{type: :text, placeholder: 'Comment...', name: 'ab-comment-new', data: {a_id: a.id }} %input.form-control.comments--box{type: :text, placeholder: t('views.placeholder.comment'), name: 'ab-comment-new', data: {a_id: a.id }}
%span.text-muted.form-control-feedback.comments--count{id: "ab-comment-charcount-#{a.id}"} 160 %span.text-muted.form-control-feedback.comments--count{id: "ab-comment-charcount-#{a.id}"} 160

View file

@ -7,14 +7,14 @@
%span.sr-only= t 'views.actions.close' %span.sr-only= t 'views.actions.close'
%h4#modal-ask-followers-label.modal-title= t 'views.modal.ask.title' %h4#modal-ask-followers-label.modal-title= t 'views.modal.ask.title'
.modal-body .modal-body
%textarea.form-control{:name => "qb-all-question", :placeholder => "Type your question here…"} %textarea.form-control{:name => "qb-all-question", :placeholder => t('views.placeholder.question')}
.modal-footer .modal-footer
- if current_user.groups.count > 0 - if current_user.groups.count > 0
%label %label
= t 'views.modal.ask.choose' = t 'views.modal.ask.choose'
%select{name: 'qb-all-rcpt', class: 'form-control', autocomplete: 'off'} %select{name: 'qb-all-rcpt', class: 'form-control', autocomplete: 'off'}
%option{value: 'followers', selected: true}= t('views.general.follower').pluralize(2) %option{value: 'followers', selected: true}= t('views.general.follower').pluralize(2)
%optgroup{label: 'Groups'} %optgroup{label: t('views.group.title').pluralize(2)}
- current_user.groups.each do |group| - current_user.groups.each do |group|
%option{value: "grp:#{group.name}"}= group.display_name %option{value: "grp:#{group.name}"}= group.display_name
%button.btn.btn-default{"data-dismiss" => "modal", :type => "button"}= t 'views.actions.cancel' %button.btn.btn-default{"data-dismiss" => "modal", :type => "button"}= t 'views.actions.cancel'

View file

@ -15,7 +15,7 @@
#question-box #question-box
.row .row
.col-xs-12 .col-xs-12
%textarea.form-control{:name => "qb-question", :placeholder => "Type your question here…"} %textarea.form-control{:name => "qb-question", :placeholder => t('views.placeholder.question')}
.row{:style => "padding-top: 5px; padding-left: 5px; padding-right: 5px;"} .row{:style => "padding-top: 5px; padding-left: 5px; padding-right: 5px;"}
.col-xs-6 .col-xs-6
- if user_signed_in? - if user_signed_in?
@ -28,7 +28,7 @@
.col-xs-6 .col-xs-6
%p.pull-right %p.pull-right
%input{name: 'qb-to', type: 'hidden', :value => @user.id}/ %input{name: 'qb-to', type: 'hidden', :value => @user.id}/
%button.btn.btn-primary{name: 'qb-ask', :type => "button", data: {loading_text: 'Asking...', promote: user_signed_in? ? "false" : "true" }} Ask %button.btn.btn-primary{name: 'qb-ask', :type => "button", data: {loading_text: t('views.questionbox.load'), promote: user_signed_in? ? "false" : "true" }} Ask
- unless user_signed_in? - unless user_signed_in?
- if @user.privacy_allow_anonymous_questions? - if @user.privacy_allow_anonymous_questions?
#question-box-promote.row{:style => "display: none;"} #question-box-promote.row{:style => "display: none;"}

View file

@ -197,6 +197,10 @@ en:
subscription: subscription:
torpedo: "418 I'm a torpedo" torpedo: "418 I'm a torpedo"
views: views:
placeholder:
inbox: "Write your answer here..."
comment: "Comment..."
question: "Type your question here…"
notifications: notifications:
show: "Show all notifications" show: "Show all notifications"
mark: " and mark them as read" mark: " and mark them as read"
@ -291,6 +295,8 @@ en:
reported: "%{user} reported a %{content} %{time} ago" reported: "%{user} reported a %{content} %{time} ago"
reason: "Reason:" reason: "Reason:"
view: "View reported %{content}" view: "View reported %{content}"
question:
title: "This question was not in your inbox? Answer it here!"
navigation: navigation:
timeline: "Timeline" timeline: "Timeline"
inbox: "Inbox" inbox: "Inbox"
@ -377,6 +383,7 @@ en:
title: "Ask something!" title: "Ask something!"
banned: "This user got hit with ye olde banhammer." banned: "This user got hit with ye olde banhammer."
required: "This user does not want to get asked by strangers. Why don't you %{signup}?" required: "This user does not want to get asked by strangers. Why don't you %{signup}?"
load: "Asking..."
promote: promote:
message: "Your question has been sent." message: "Your question has been sent."
create: "Create an account" create: "Create an account"