localize inbox
This commit is contained in:
parent
7a0be2519a
commit
75d4d5a07f
|
@ -6,39 +6,31 @@
|
||||||
%img.img-rounded.answerbox--img{src: gravatar_url(i.question.user)}
|
%img.img-rounded.answerbox--img{src: gravatar_url(i.question.user)}
|
||||||
.media-body
|
.media-body
|
||||||
%h6.text-muted.media-heading.answerbox--question-user
|
%h6.text-muted.media-heading.answerbox--question-user
|
||||||
= user_screen_name i.question.user, i.question.author_is_anonymous
|
= raw t('views.inbox.entry.asked', user: user_screen_name(i.question.user, i.question.author_is_anonymous), time: time_tooltip(i.question))
|
||||||
asked
|
|
||||||
%span{title: i.question.created_at, data: { toggle: :tooltip, placement: :bottom }}
|
|
||||||
= time_ago_in_words(i.question.created_at)
|
|
||||||
ago
|
|
||||||
- unless i.question.author_is_anonymous
|
- unless i.question.author_is_anonymous
|
||||||
- if i.question.answer_count > 0
|
- if i.question.answer_count > 0
|
||||||
·
|
·
|
||||||
%a{href: show_user_question_path(i.question.user.screen_name, i.question.id)}
|
%a{href: show_user_question_path(i.question.user.screen_name, i.question.id)}
|
||||||
#{i.question.answer_count} response(s)
|
= 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: 'Write your answer here...', 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 }}
|
||||||
Answer
|
= t 'views.actions.answer'
|
||||||
%button.btn.btn-danger{name: 'ib-destroy', data: { ib_id: i.id }}
|
%button.btn.btn-danger{name: 'ib-destroy', data: { ib_id: i.id }}
|
||||||
Delete
|
= t 'views.actions.delete'
|
||||||
%button.btn.btn-default{name: 'ib-options', data: { ib_id: i.id, state: :hidden }}
|
%button.btn.btn-default{name: 'ib-options', data: { ib_id: i.id, state: :hidden }}
|
||||||
%i.fa.fa-cog
|
%i.fa.fa-cog
|
||||||
%span.sr-only Options
|
%span.sr-only= t 'views.actions.options'
|
||||||
.panel-footer{id: "ib-options-#{i.id}", style: 'display: none'}
|
.panel-footer{id: "ib-options-#{i.id}", style: 'display: none'}
|
||||||
%h4 Sharing
|
%h4= t 'views.inbox.entry.sharing.title'
|
||||||
- if current_user.services.count > 0
|
- if current_user.services.count > 0
|
||||||
.row
|
.row
|
||||||
- current_user.services.each do |service|
|
- current_user.services.each do |service|
|
||||||
.col-md-3.col-sm-4.col-xs-6
|
.col-md-3.col-sm-4.col-xs-6
|
||||||
%label
|
%label
|
||||||
%input{type: 'checkbox', name: 'ib-share', checked: :checked, data: { ib_id: i.id, service: service.provider }}
|
%input{type: 'checkbox', name: 'ib-share', checked: :checked, data: { ib_id: i.id, service: service.provider }}
|
||||||
Post to
|
= raw t('views.inbox.entry.sharing.post', service: service.provider.capitalize)
|
||||||
= service.provider.capitalize
|
|
||||||
- else
|
- else
|
||||||
%p
|
%p= raw t('views.inbox.entry.sharing.none', settings: link_to(t('views.inbox.entry.sharing.settings', services_path)))
|
||||||
You have not connected any services yet. Visit your
|
|
||||||
= link_to "service settings", services_path
|
|
||||||
to connect one.
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
.panel.panel-default.inbox--panel
|
.panel.panel-default.inbox--panel
|
||||||
.panel-heading
|
.panel-heading
|
||||||
%h3.panel-title Out of questions?
|
%h3.panel-title= t 'views.inbox.sidebar.questions.title'
|
||||||
.panel-body
|
.panel-body
|
||||||
%button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question
|
%button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'}= t 'views.inbox.sidebar.questions.button'
|
||||||
.panel.panel-default.inbox--panel
|
.panel.panel-default.inbox--panel
|
||||||
.panel-heading
|
.panel-heading
|
||||||
%h3.panel-title Share
|
%h3.panel-title= t 'views.inbox.sidebar.share.title'
|
||||||
.panel-body
|
.panel-body
|
||||||
%a.btn.btn-block.btn-primary{target: '_blank', href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything%21&url=#{show_user_profile_url(current_user.screen_name)}"}
|
%a.btn.btn-block.btn-primary{target: '_blank', href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything%21&url=#{show_user_profile_url(current_user.screen_name)}"}
|
||||||
%i.fa.fa-twitter
|
%i.fa.fa-fw.fa-twitter
|
||||||
Share on Twitter
|
= raw t('views.inbox.sidebar.share.button', service: "Twitter")
|
||||||
%a.btn.btn-block.btn-primary{target: '_blank', href: "http://www.tumblr.com/share/link?url=#{show_user_profile_url(current_user.screen_name)}&name=Ask%20me%20anything%21"}
|
%a.btn.btn-block.btn-primary{target: '_blank', href: "http://www.tumblr.com/share/link?url=#{show_user_profile_url(current_user.screen_name)}&name=Ask%20me%20anything%21"}
|
||||||
%i.fa.fa-tumblr
|
%i.fa.fa-fw.fa-tumblr
|
||||||
Share on Tumblr
|
= raw t('views.inbox.sidebar.share.button', service: "Tumblr")
|
||||||
.panel.panel-default.warning--panel
|
.panel.panel-default.warning--panel
|
||||||
.panel-heading
|
.panel-heading
|
||||||
%h3.panel-title Actions
|
%h3.panel-title= t 'views.inbox.sidebar.actions.title'
|
||||||
.panel-body
|
.panel-body
|
||||||
%button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all', disabled: (Inbox.where(user: current_user).empty? ? 'disabled' : nil), data: { ib_count: Inbox.where(user: current_user).count }} Delete all questions
|
%button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all', disabled: (Inbox.where(user: current_user).empty? ? 'disabled' : nil), data: { ib_count: Inbox.where(user: current_user).count }}= t 'views.inbox.sidebar.actions.button'
|
||||||
|
|
|
@ -10,13 +10,13 @@
|
||||||
= render 'inbox/entry', i: i
|
= render 'inbox/entry', i: i
|
||||||
|
|
||||||
- if @inbox.empty?
|
- if @inbox.empty?
|
||||||
Nothing to see here.
|
= t 'views.inbox.empty'
|
||||||
|
|
||||||
#pagination= will_paginate @inbox, renderer: BootstrapPagination::Rails, page_links: false
|
#pagination= will_paginate @inbox, renderer: BootstrapPagination::Rails, page_links: false
|
||||||
|
|
||||||
- if @inbox.next_page
|
- if @inbox.next_page
|
||||||
%button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @inbox.current_page }}
|
%button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @inbox.current_page }}
|
||||||
Load more
|
= t 'views.actions.load'
|
||||||
|
|
||||||
.col-md-9.col-xs-12.col-sm-9.visible-xs
|
.col-md-9.col-xs-12.col-sm-9.visible-xs
|
||||||
= render 'inbox/sidebar'
|
= render 'inbox/sidebar'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
%noscript
|
%noscript
|
||||||
.alert.alert-danger
|
.alert.alert-danger
|
||||||
Please activate JavaScript.
|
= t 'views.messages.noscript'
|
||||||
|
|
||||||
- flash.each do |key, value|
|
- flash.each do |key, value|
|
||||||
.alert.alert-dismissible{class: "alert-#{bootstrap_color key}", role: "alert"}
|
.alert.alert-dismissible{class: "alert-#{bootstrap_color key}", role: "alert"}
|
||||||
|
|
|
@ -21,6 +21,28 @@
|
||||||
|
|
||||||
en:
|
en:
|
||||||
views:
|
views:
|
||||||
|
messages:
|
||||||
|
noscript: "Please activate JavaScript."
|
||||||
|
inbox:
|
||||||
|
empty: "Nothing to see here."
|
||||||
|
sidebar:
|
||||||
|
questions:
|
||||||
|
title: "Out of questions?"
|
||||||
|
button: "Get new question"
|
||||||
|
share:
|
||||||
|
title: "Share"
|
||||||
|
button: "Share on %{service}"
|
||||||
|
actions:
|
||||||
|
title: "Actions"
|
||||||
|
button: "Delete all questions"
|
||||||
|
entry:
|
||||||
|
asked: "%{user} asked %{time} ago"
|
||||||
|
response: "response"
|
||||||
|
sharing:
|
||||||
|
title: "Sharing"
|
||||||
|
post: "Post to %{service}"
|
||||||
|
none: "You have not connected any services yet. Visit your %{settings} to connect one."
|
||||||
|
settings: "service settings"
|
||||||
general:
|
general:
|
||||||
answer: "answer"
|
answer: "answer"
|
||||||
question: "question"
|
question: "question"
|
||||||
|
@ -29,6 +51,8 @@ en:
|
||||||
follower: "follower"
|
follower: "follower"
|
||||||
following: "following"
|
following: "following"
|
||||||
actions:
|
actions:
|
||||||
|
answer: "Answer"
|
||||||
|
options: "Options"
|
||||||
anonymous: "Hide your name"
|
anonymous: "Hide your name"
|
||||||
delete: "Delete"
|
delete: "Delete"
|
||||||
report: "Report"
|
report: "Report"
|
||||||
|
@ -36,6 +60,7 @@ en:
|
||||||
subscribe: "Subscribe"
|
subscribe: "Subscribe"
|
||||||
unsubscribe: "Unsubscribe"
|
unsubscribe: "Unsubscribe"
|
||||||
view: "View comment smiles"
|
view: "View comment smiles"
|
||||||
|
load: "Load more"
|
||||||
sessions:
|
sessions:
|
||||||
destroy: "Logout"
|
destroy: "Logout"
|
||||||
create: "Sign in"
|
create: "Sign in"
|
||||||
|
|
Loading…
Reference in New Issue