implemented translations into front, about and discover

This commit is contained in:
pixeldesu 2015-05-26 21:15:18 +02:00
parent ce2503bfb3
commit ab0b428e03
5 changed files with 66 additions and 102 deletions

View File

@ -15,12 +15,8 @@
%span.text-muted= "@#{u.screen_name}"
%p.answerbox--question-text
- if type == "new"
registered
= time_ago_in_words(u.created_at)
ago
= t('views.discover.userbox.new', time: time_ago_in_words(u.created_at))
- elsif type == "most"
answered
= pluralize(a, "question")
= t('views.discover.userbox.answers', questions: pluralize(a, t('views.general.question')))
- else
asked
= pluralize(q, "question")
= t('views.discover.userbox.answers', questions: pluralize(q, t('views.general.question')))

View File

@ -2,45 +2,36 @@
.jumbotron.j2-jumbo.text-center.particle-jumbotron
#particles
.particle-content
%h1 Discover
%p
The perfect place to find interesting content from the last week on
= succeed '!' do
= APP_CONFIG['site_name']
%h1= t 'views.discover.title'
%p= t('views.discover.subtitle', app_title: APP_CONFIG['site_name'])
.container
.row
.col-md-7.col-sm-6
%h2 Popular Content
%p Answers with most smiles and most answered questions
%h2= t 'views.discover.content.title'
%p= t 'views.discover.content.desc'
%div{role: "tabpanel"}
%ul.nav.nav-tabs{role: "tablist"}
%li.active{role: "presentation"}
%a{href: "#answers", role: "tab", aria: {controls: "answers"}, data: {toggle: "tab"}}
Answers
%a{href: "#answers", role: "tab", aria: {controls: "answers"}, data: {toggle: "tab"}}= t 'views.discover.content.tab.answers'
%li{role: "presentation"}
%a{href: "#questions", role: "tab", aria: {controls: "questions"}, data: {toggle: "tab"}}
Questions
%a{href: "#questions", role: "tab", aria: {controls: "questions"}, data: {toggle: "tab"}}= t 'views.discover.content.tab.questions'
%li{role: "presentation"}
%a{href: "#comments", role: "tab", aria: {controls: "comments"}, data: {toggle: "tab"}}
Most Comments
%a{href: "#comments", role: "tab", aria: {controls: "comments"}, data: {toggle: "tab"}}= t 'views.discover.content.tab.comments'
.tab-content.discover
= render 'discover/tab_answers', answers: @popular_answers
= render 'discover/tab_questions', questions: @popular_questions
= render 'discover/tab_discussed', comments: @most_discussed
.col-md-5.col-sm-6
%h2 People
%p Newcomers and people who asked the most questions
%h2= t 'views.discover.people.title'
%p= t 'views.discover.people.desc'
%div{role: "tabpanel"}
%ul.nav.nav-tabs{role: "tablist"}
%li.active{role: "presentation"}
%a{href: "#new", role: "tab", aria: {controls: "new"}, data: {toggle: "tab"}}
New Users
%a{href: "#new", role: "tab", aria: {controls: "new"}, data: {toggle: "tab"}}= t 'views.discover.people.tab.new'
%li{role: "presentation"}
%a{href: "#asked", role: "tab", aria: {controls: "asked"}, data: {toggle: "tab"}}
Most Asked Questions
%a{href: "#asked", role: "tab", aria: {controls: "asked"}, data: {toggle: "tab"}}= t 'views.discover.people.tab.questions'
%li{role: "presentation"}
%a{href: "#answered", role: "tab", aria: {controls: "answered"}, data: {toggle: "tab"}}
Most Answers
%a{href: "#answered", role: "tab", aria: {controls: "answered"}, data: {toggle: "tab"}}= t 'views.discover.people.tab.answers'
.tab-content.discover
= render 'discover/tab_new', new: @new_users
= render 'discover/tab_asked', asked: @users_with_most_questions

View File

@ -4,7 +4,7 @@
.container
= render 'layouts/messages'
%h1= APP_CONFIG['site_name']
%p Ask questions, give answers and learn more about your friends.
%p= t 'views.front.subtitle'
%p
%a.btn.btn-primary.btn-lg{href: url_for(new_user_registration_path)}
Register now
@ -16,24 +16,16 @@
.col-md-4.col-sm-4.col-xs-12
.icon-showcase
%i.fa.fa-comments
%h3.heading-showcase
Ask and answer questions
%p
With
= APP_CONFIG['site_name']
you can ask people questions and answer questions from other users or unregistered people. Want to know something more? Keep the discussion ongoing in the comments!
%h3.heading-showcase= t 'views.front.ask.title'
%p= t('views.front.ask.desc', app_title: APP_CONFIG['site_name'])
.col-md-4.col-sm-4.col-xs-12
.icon-showcase
%i.fa.fa-users
%h3.heading-showcase
Follow users and get followed
%p
Following users allows you to get a personalized feed of all people you want to know more about. You can also send a question to all your followers at once!
%h3.heading-showcase= t 'views.front.follow.title'
%p= t 'views.front.follow.desc'
.col-md-4.col-sm-4.col-xs-12
.icon-showcase
%i.fa.fa-share-square-o
%h3.heading-showcase
Sharing to other networks
%p
Want to share your answer to a question so that more people read it? With a simple click on the answer button, your answer is shared wherever you want!
%h3.heading-showcase= t 'views.front.share.title'
%p= t 'views.front.share.desc'
= render "shared/links"

View File

@ -3,14 +3,14 @@
#particles
.particle-content
%h1= APP_CONFIG['site_name']
%p About our service, features and other information
%p= t 'views.about.subtitle'
.container
.panel.panel-default
.panel-body
.row
.col-md-3
%h3 Links
%p Important pages and social media profiles from the Retrospring team, which are recommended to visit!
%h3= t 'views.about.links.title'
%p= t('views.about.links.desc', app_title: APP_CONFIG['site_name'])
.col-md-3.col-sm-4
%a{href: "https://twitter.com/retro_spring"}
.icon-showcase
@ -33,34 +33,20 @@
.panel-body
.row
.col-md-4
%h3 Open Source
%p
= APP_CONFIG['site_name']
is running on unfinished code, full of bugs. Caveat emptor.
%p
Want to contribute? If you are a Ruby developer, CoffeeScript coder or frontend designer, you can now help
= APP_CONFIG['site_name']
to get the features everyone wanted by forking our
= succeed '.' do
= link_to "GitHub repository", 'https://github.com/retrospring/retrospring'
If that's not the case, you can still report bugs and request features at our
= succeed '.' do
= link_to "bug tracker", 'https://github.com/retrospring/bugs'
%h3= t 'views.about.opensource.title'
%p= t('views.about.opensource.warning', app_title: APP_CONFIG['site_name'])
%p= raw t('views.about.opensource.desc', app_title: APP_CONFIG['site_name'], github: link_to(t('views.about.opensource.github'), "https://github.com/Retrospring/retrospring"), bugtracker: link_to(t('views.about.opensource.bugtracker'), "https://github.com/Retrospring/bugs"))
.col-md-4
%a{href: "https://github.com/Retrospring/retrospring"}
.icon-showcase
%i.fa.fa-github
%h4.heading-about.text-center
Main Repository
%h4.heading-about.text-center= t 'views.about.repository.title'
%p.text-center
%em The place where all the code magic and fixing happens!
%em= t 'views.about.repository.desc'
.col-md-4
%h3 Contributors
%p These people have contributed to #{APP_CONFIG['site_name']}'s source code.
%p
Want to get listed here?
= link_to "Fork this repo", 'https://github.com/retrospring/retrospring'
and create a new pull request with your changes.
%h3= t 'views.about.contributors.title'
%p= t('views.about.contributors.desc', app_title: APP_CONFIG['site_name'])
%p= raw t('views.about.contributors.howto', fork: link_to(t('views.about.contributors.fork'), "https://github.com/retrospring/retrospring"))
%ul.about--moderator
- User.where(contributor: true).each do |sup|
%a{href: show_user_profile_path(sup.screen_name), title: sup.screen_name, data: { toggle: :tooltip, placement: :top }}
@ -69,10 +55,8 @@
.panel-body
.row
.col-md-4
%h3 The Team
The people behind
= succeed '!' do
= APP_CONFIG['site_name']
%h3= t 'views.about.team.title'
= t('views.about.team.desc', app_title: APP_CONFIG['site_name'])
%br/
- APP_CONFIG['admins'].each do |adm|
.media
@ -83,18 +67,15 @@
%h4.entry-text.entry-about= adm['about_text']
%h6.entry-subtext= adm['subtext']
.col-md-4
%h3 Moderators
%p
The people on
= APP_CONFIG['site_name']
that look after you!
%h3= t 'views.about.moderators.title'
%p= t('views.about.moderators.desc', app_title: APP_CONFIG['site_name'])
%ul.about--moderator
- User.where(moderator: true).each do |mod|
%a{href: show_user_profile_path(mod.screen_name), title: mod.screen_name, data: { toggle: :tooltip, placement: :top }}
%img.img-rounded.answerbox--img{src: mod.profile_picture.url(:medium)}
.col-md-4
%h3 Funding
%p People which (previously) donated to Retrospring!
%h3= t 'views.about.funding.title'
%p= t('views.about.funding.desc', app_title: APP_CONFIG['site_name'])
%ul.about--moderator
- User.where(supporter: true).each do |sup|
%a{href: show_user_profile_path(sup.screen_name), title: sup.screen_name, data: { toggle: :tooltip, placement: :top }}
@ -103,12 +84,8 @@
.panel-body
.row
.col-md-3.col-sm-12.col-xs-12
%h3 Statistics
%p
All-time statistics for
= succeed ',' do
= APP_CONFIG['site_name']
updated every time you refresh the page!
%h3= t 'views.about.statistics.title'
%p= t('views.about.statistics.desc', app_title: APP_CONFIG['site_name'])
.col-md-3.col-sm-6.col-xs-6.statistics
%h2.entry-text#asked-count= Question.count
%h4.entry-subtext Questions

View File

@ -21,6 +21,13 @@
en:
views:
general:
answer: "answer"
question: "question"
comment: "comment"
smile: "smile"
follower: "follower"
following: "following"
sessions:
destroy: "Logout"
create: "Sign in"
@ -39,7 +46,7 @@ en:
subtitle: "Ask questions, give answers and learn more about your friends."
ask:
title: "Ask and answer questions"
desc: "With Retrospring you can ask people questions and answer questions from other users or unregistered people. Want to know something more? Keep the discussion ongoing in the comments!"
desc: "With %{app_title} you can ask people questions and answer questions from other users or unregistered people. Want to know something more? Keep the discussion ongoing in the comments!"
follow:
title: "Follow users and get followed"
desc: "Following users allows you to get a personalized feed of all people you want to know more about. You can also send a question to all your followers at once!"
@ -50,43 +57,40 @@ en:
subtitle: "About our service, features and other information"
links:
title: "Links"
# TODO: add placeholder for app title in desc
desc: "Important pages and social media profiles from the Retrospring team, which are recommended to visit!"
desc: "Important pages and social media profiles from the %{app_title} team, which are recommended to visit!"
opensource:
title: "Open Source"
warning: "Retrospring is running on unfinished code, full of bugs. Caveat emptor."
# TODO: add placeholders for links in desc
# TODO: add placeholder for app title in desc
desc: "Want to contribute? If you are a Ruby developer, CoffeeScript coder or frontend designer, you can now help Retrospring to get the features everyone wanted by forking our GitHub repository. If that's not the case, you can still report bugs and request features at our bug tracker."
warning: "%{app_title} is running on unfinished code, full of bugs. Caveat emptor."
desc: "Want to contribute? If you are a Ruby developer, CoffeeScript coder or frontend designer, you can now help %{app_title} to get the features everyone wanted by forking our %{github}. If that's not the case, you can still report bugs and request features at our %{bugtracker}."
github: "Github repository"
bugtracker: "bug tracker"
repository:
title: "Main Repository"
desc: "The place where all the code magic and fixing happens!"
contributors:
title: "Contributors"
# TODO: add placeholder for app title in desc
desc: "These people have contributed to Retrospring's source code."
desc: "These people have contributed to %{app_title}'s source code."
# TODO: add placeholders for links in howto
howto: "Want to get listed here? Fork this repo and create a new pull request with your changes."
howto: "Want to get listed here? %{fork} and create a new pull request with your changes."
fork: "Fork this repo"
team:
title: "The Team"
# TODO: add placeholder for app title in desc
desc: "The people behind Retrospring!"
desc: "The people behind %{app_title}!"
moderators:
title: "Moderators"
# TODO: add placeholder for app title in desc
desc: "The people on Retrospring that look after you!"
desc: "The people on %{app_title} that look after you!"
funding:
title: "Funding"
# TODO: add placeholder for app title in desc
desc: "People which (previously) donated to Retrospring!"
desc: "People which (previously) donated to %{app_title}!"
statistics:
title: "Statistics"
# TODO: add placeholder for app title in desc
desc: "All-time statistics for Retrospring, updated every time you refresh the page!"
desc: "All-time statistics for %{app_title}, updated every time you refresh the page!"
discover:
title: "Discover"
# TODO: add placeholder for app title in subtitle
subtitle: "The perfect place to find interesting content from the last week on Retrospring!"
subtitle: "The perfect place to find interesting content from the last week on %{app_title}!"
content:
title: "Popular Content"
desc: "Answers with most smiles and most answered questions"
@ -101,4 +105,8 @@ en:
new: "New Users"
questions: "Most Asked Questions"
answers: "Most Answers"
userbox:
new: "registered %{time} ago"
answers: "answered %{questions}"
questions: "asked %{questions}"
hello: "Hello world"