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

View File

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

View File

@ -4,7 +4,7 @@
.container .container
= render 'layouts/messages' = render 'layouts/messages'
%h1= APP_CONFIG['site_name'] %h1= APP_CONFIG['site_name']
%p Ask questions, give answers and learn more about your friends. %p= t 'views.front.subtitle'
%p %p
%a.btn.btn-primary.btn-lg{href: url_for(new_user_registration_path)} %a.btn.btn-primary.btn-lg{href: url_for(new_user_registration_path)}
Register now Register now
@ -16,24 +16,16 @@
.col-md-4.col-sm-4.col-xs-12 .col-md-4.col-sm-4.col-xs-12
.icon-showcase .icon-showcase
%i.fa.fa-comments %i.fa.fa-comments
%h3.heading-showcase %h3.heading-showcase= t 'views.front.ask.title'
Ask and answer questions %p= t('views.front.ask.desc', app_title: APP_CONFIG['site_name'])
%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!
.col-md-4.col-sm-4.col-xs-12 .col-md-4.col-sm-4.col-xs-12
.icon-showcase .icon-showcase
%i.fa.fa-users %i.fa.fa-users
%h3.heading-showcase %h3.heading-showcase= t 'views.front.follow.title'
Follow users and get followed %p= t 'views.front.follow.desc'
%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!
.col-md-4.col-sm-4.col-xs-12 .col-md-4.col-sm-4.col-xs-12
.icon-showcase .icon-showcase
%i.fa.fa-share-square-o %i.fa.fa-share-square-o
%h3.heading-showcase %h3.heading-showcase= t 'views.front.share.title'
Sharing to other networks %p= t 'views.front.share.desc'
%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!
= render "shared/links" = render "shared/links"

View File

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

View File

@ -21,6 +21,13 @@
en: en:
views: views:
general:
answer: "answer"
question: "question"
comment: "comment"
smile: "smile"
follower: "follower"
following: "following"
sessions: sessions:
destroy: "Logout" destroy: "Logout"
create: "Sign in" create: "Sign in"
@ -39,7 +46,7 @@ en:
subtitle: "Ask questions, give answers and learn more about your friends." subtitle: "Ask questions, give answers and learn more about your friends."
ask: ask:
title: "Ask and answer questions" 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: follow:
title: "Follow users and get followed" 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!" 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" subtitle: "About our service, features and other information"
links: links:
title: "Links" title: "Links"
# TODO: add placeholder for app title in desc desc: "Important pages and social media profiles from the %{app_title} team, which are recommended to visit!"
desc: "Important pages and social media profiles from the Retrospring team, which are recommended to visit!"
opensource: opensource:
title: "Open Source" title: "Open Source"
warning: "Retrospring is running on unfinished code, full of bugs. Caveat emptor." warning: "%{app_title} is running on unfinished code, full of bugs. Caveat emptor."
# TODO: add placeholders for links in desc 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}."
# TODO: add placeholder for app title in desc github: "Github repository"
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." bugtracker: "bug tracker"
repository: repository:
title: "Main Repository" title: "Main Repository"
desc: "The place where all the code magic and fixing happens!" desc: "The place where all the code magic and fixing happens!"
contributors: contributors:
title: "Contributors" title: "Contributors"
# TODO: add placeholder for app title in desc desc: "These people have contributed to %{app_title}'s source code."
desc: "These people have contributed to Retrospring's source code."
# TODO: add placeholders for links in howto # 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: team:
title: "The Team" title: "The Team"
# TODO: add placeholder for app title in desc # TODO: add placeholder for app title in desc
desc: "The people behind Retrospring!" desc: "The people behind %{app_title}!"
moderators: moderators:
title: "Moderators" title: "Moderators"
# TODO: add placeholder for app title in desc # 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: funding:
title: "Funding" title: "Funding"
# TODO: add placeholder for app title in desc # TODO: add placeholder for app title in desc
desc: "People which (previously) donated to Retrospring!" desc: "People which (previously) donated to %{app_title}!"
statistics: statistics:
title: "Statistics" title: "Statistics"
# TODO: add placeholder for app title in desc desc: "All-time statistics for %{app_title}, updated every time you refresh the page!"
desc: "All-time statistics for Retrospring, updated every time you refresh the page!"
discover: discover:
title: "Discover" title: "Discover"
# TODO: add placeholder for app title in subtitle subtitle: "The perfect place to find interesting content from the last week on %{app_title}!"
subtitle: "The perfect place to find interesting content from the last week on Retrospring!"
content: content:
title: "Popular Content" title: "Popular Content"
desc: "Answers with most smiles and most answered questions" desc: "Answers with most smiles and most answered questions"
@ -101,4 +105,8 @@ en:
new: "New Users" new: "New Users"
questions: "Most Asked Questions" questions: "Most Asked Questions"
answers: "Most Answers" answers: "Most Answers"
userbox:
new: "registered %{time} ago"
answers: "answered %{questions}"
questions: "asked %{questions}"
hello: "Hello world" hello: "Hello world"