diff --git a/.gitmodules b/.gitmodules index 49efb913..ff415f8d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "service-docs"] path = service-docs url = https://github.com/Retrospring/service-docs.git +[submodule "config/locales"] + path = config/locales + url = https://github.com/Retrospring/locales.git diff --git a/Gemfile b/Gemfile index e265cbbc..23ffa291 100644 --- a/Gemfile +++ b/Gemfile @@ -25,7 +25,6 @@ gem 'bootswatch-rails' gem 'sweetalert-rails' gem 'will_paginate' gem 'will_paginate-bootstrap' -gem 'http_accept_language' gem 'devise' gem 'devise-i18n' gem 'devise-async' @@ -41,6 +40,8 @@ gem 'fog-aws' gem 'momentjs-rails', '>= 2.9.0' gem 'bootstrap3-datetimepicker-rails', '~> 4.7.14' +gem 'twemoji-rails' + gem 'ruby-progressbar' gem 'rails_admin' diff --git a/Gemfile.lock b/Gemfile.lock index 041fa292..fc219d56 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -219,7 +219,6 @@ GEM hitimes (1.2.2) http (0.6.4) http_parser.rb (~> 0.6.0) - http_accept_language (2.0.5) http_parser.rb (0.6.0) i18n (0.7.0) i18n-js (3.0.0.rc10) @@ -436,6 +435,8 @@ GEM simple_oauth turbolinks (2.5.3) coffee-rails + twemoji-rails (1.2.1.3) + railties (>= 3.0.0) twitter (5.14.0) addressable (~> 2.3) buftok (~> 0.2.0) @@ -498,7 +499,6 @@ DEPENDENCIES font-kit-rails foreman haml - http_accept_language i18n-js jbuilder (~> 2.2.4) jquery-rails @@ -535,6 +535,7 @@ DEPENDENCIES thin tumblr_client turbolinks + twemoji-rails twitter uglifier (>= 1.3.0) unicorn diff --git a/app/assets/javascripts/application.js.erb.coffee b/app/assets/javascripts/application.js.erb.coffee index 6f7b98f3..5ac8d33c 100644 --- a/app/assets/javascripts/application.js.erb.coffee +++ b/app/assets/javascripts/application.js.erb.coffee @@ -3,6 +3,7 @@ #= require jquery.turbolinks #= require turbolinks #= require bootstrap +#= require twemoji #= require nprogress #= require nprogress-turbolinks #= require growl @@ -64,5 +65,17 @@ _ready = -> dotColor: '#5e35b1' lineColor: '#5e35b1' + if twemoji? + twemoji.parse document.body, + size: 16 + callback: (icon, options) -> + switch icon + # copyright, registered, trademark + when 'a9' or 'ae' or '2122' + false + else + ''.concat(options.base, options.size, '/', icon, options.ext) + + $(document).ready _ready $(document).on 'page:load', _ready diff --git a/app/assets/stylesheets/base.css.scss b/app/assets/stylesheets/base.css.scss index a9a0c63e..66320f71 100644 --- a/app/assets/stylesheets/base.css.scss +++ b/app/assets/stylesheets/base.css.scss @@ -16,6 +16,7 @@ body { @import "scss/user"; @import "scss/notifications"; @import "scss/groups"; +@import "scss/data"; @import "scss/mobile"; .j2-page { diff --git a/app/assets/stylesheets/scss/data.scss b/app/assets/stylesheets/scss/data.scss new file mode 100644 index 00000000..c4aa26c0 --- /dev/null +++ b/app/assets/stylesheets/scss/data.scss @@ -0,0 +1,10 @@ +.data-heading { + margin-bottom: 0; + font-weight: bold; + font-size: 1.1em; +} + +.data-header-preview { + height: auto; + width: 100%; +} diff --git a/app/controllers/ajax/moderation_controller.rb b/app/controllers/ajax/moderation_controller.rb index d0ca6629..636c1650 100644 --- a/app/controllers/ajax/moderation_controller.rb +++ b/app/controllers/ajax/moderation_controller.rb @@ -164,7 +164,7 @@ class Ajax::ModerationController < ApplicationController target_user = User.find_by_screen_name(params[:user]) @message = I18n.t('messages.moderation.privilege.nope') - return unless %w(blogger supporter moderator admin contributor).include? params[:type].downcase + return unless %w(blogger supporter moderator admin contributor translator).include? params[:type].downcase if %w(supporter moderator admin).include?(params[:type].downcase) and !current_user.admin? @status = :nopriv diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ffaae5e1..906d992b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -14,10 +14,10 @@ class ApplicationController < ActionController::Base if params[:hl].nil? if current_user.present? I18n.locale = current_user.locale - elsif not cookies[:hl].nil? - I18n.locale = cookies[:hl] - elsif not http_accept_language.user_preferred_languages.length > 0 - I18n.locale = http_accept_language.compatible_language_from(I18n.available_locales) or "en" + elsif not cookies[:lang].nil? + I18n.locale = cookies[:lang] + else + I18n.locale = 'en' end else I18n.locale = params[:hl] @@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base end end - cookies[:hl] = I18n.locale #unless cookies[:allow_cookies].nil? # some EU cookie bullsh- + cookies[:lang] = I18n.locale #unless cookies[:allow_cookies].nil? # some EU cookie bullsh- end # check if user got hit by the banhammer of doom diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 33cad9e1..5e660905 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -1,5 +1,5 @@ class UserController < ApplicationController - before_filter :authenticate_user!, only: %w(edit update edit_privacy update_privacy) + before_filter :authenticate_user!, only: %w(edit update edit_privacy update_privacy data) def show @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first! @@ -88,4 +88,7 @@ class UserController < ApplicationController @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first! @questions = @user.questions.where(author_is_anonymous: false).reverse_order.paginate(page: params[:page]) end + + def data + end end diff --git a/app/views/discover/_userbox.html.haml b/app/views/discover/_userbox.html.haml index f6e99400..6da53dca 100644 --- a/app/views/discover/_userbox.html.haml +++ b/app/views/discover/_userbox.html.haml @@ -19,4 +19,4 @@ - elsif type == "most" = t('views.discover.userbox.answers', questions: pluralize(a, t('views.general.question'))) - else - = t('views.discover.userbox.answers', questions: pluralize(q, t('views.general.question'))) + = t('views.discover.userbox.questions', questions: pluralize(q, t('views.general.question'))) diff --git a/app/views/user/_modal_privileges.html.haml b/app/views/user/_modal_privileges.html.haml index ae9988cf..351e030c 100644 --- a/app/views/user/_modal_privileges.html.haml +++ b/app/views/user/_modal_privileges.html.haml @@ -10,6 +10,7 @@ %ul.list-group.groups--list = render 'user/modal_privileges_item', privilege: 'blogger', description: t('views.modal.privilege.blogger'), user: @user = render 'user/modal_privileges_item', privilege: 'contributor', description: t('views.modal.privilege.contributor'), user: @user + = render 'user/modal_privileges_item', privilege: 'translator', description: t('views.modal.privilege.translator'), user: @user - if current_user.admin? = render 'user/modal_privileges_item', privilege: 'supporter', description: t('views.modal.privilege.supporter'), user: @user = render 'user/modal_privileges_item', privilege: 'moderator', description: t('views.modal.privilege.moderator'),user: @user diff --git a/app/views/user/_profile_info.html.haml b/app/views/user/_profile_info.html.haml index 7e96f469..14f37e10 100644 --- a/app/views/user/_profile_info.html.haml +++ b/app/views/user/_profile_info.html.haml @@ -20,6 +20,10 @@ .profile--panel-badge.panel-badge-info %i.fa.fa-pencil = t 'views.user.title.blogger' + - if @user.translator? + .profile--panel-badge.panel-badge-info + %i.fa.fa-globe + = t 'views.user.title.translator' - if @user.banned? .profile--panel-badge.panel-badge-default %i.fa.fa-ban diff --git a/app/views/user/_settings_tabs.html.haml b/app/views/user/_settings_tabs.html.haml index f2f8ea41..0f30d0fa 100644 --- a/app/views/user/_settings_tabs.html.haml +++ b/app/views/user/_settings_tabs.html.haml @@ -5,6 +5,6 @@ = list_group_item t('views.settings.tabs.profile'), edit_user_profile_path = list_group_item t('views.settings.tabs.privacy'), edit_user_privacy_path = list_group_item t('views.settings.tabs.sharing'), services_path - + = list_group_item "Your Data", user_data_path .hidden-xs= render "shared/links" diff --git a/app/views/user/data.html.haml b/app/views/user/data.html.haml new file mode 100644 index 00000000..3f4511f6 --- /dev/null +++ b/app/views/user/data.html.haml @@ -0,0 +1,193 @@ +- provide(:title, generate_title("Your Data")) +.container.j2-page + = render 'settings_tabs' + .col-md-9.col-xs-12.col-sm-9 + .panel.panel-default + .panel-body + %h2 Your Profile Data + %p Everything we have about you! Really, not that much as you might expect. + + %h3 General + .row + .col-md-6.col-sm-6.col-xs-12 + %h4 Profile + + %p.data-heading User name + %p.text-muted= current_user.screen_name + + %p.data-heading Display name + %p.text-muted + - if current_user.display_name.empty? + None set! + - else + = current_user.display_name + + %p.data-heading Bio + %p.text-muted + - if current_user.bio.blank? + None set! + - else + = current_user.bio + + %p.data-heading Location + %p.text-muted + - if current_user.location.blank? + None set! + - else + = current_user.location + + %p.data-heading Website + %p.text-muted + - if current_user.website.blank? + None set! + - else + = current_user.website + .col-md-6.col-sm-6.col-xs-12 + %h4 Pictures + %p.data-heading Profile picture + .media + .pull-left + %img.profile--img{src: current_user.profile_picture.url(:medium)} + .media-body + %ul + %li + %a{href: current_user.profile_picture.url(:small)} Small + %li + %a{href: current_user.profile_picture.url(:medium)} Medium + %li + %a{href: current_user.profile_picture.url(:medium)} Large + %li + %a{href: current_user.profile_picture.url(:original)} Original image + + %p.data-heading Header picture + %img.data-header-preview{src: current_user.profile_header.url(:mobile)} + %p + %a{href: current_user.profile_header.url(:mobile)} Mobile + | + %a{href: current_user.profile_header.url(:web)} Web + | + %a{href: current_user.profile_header.url(:retina)} Retina + | + %a{href: current_user.profile_header.url(:original)} Original image + .row + .col-md-6.col-sm-6.col-xs-12 + %h4 Statistics + + %p.data-heading Answers + %p.text-muted= current_user.answered_count + + %p.data-heading Questions + %p.text-muted= current_user.asked_count + + %p.data-heading Following + %p.text-muted= current_user.friend_count + + %p.data-heading Followers + %p.text-muted= current_user.follower_count + + %p.data-heading Smiles + %p.text-muted= current_user.smiled_count + current_user.comment_smiled_count + + %p.data-heading Comments + %p.text-muted= current_user.commented_count + .col-md-6.col-sm-6.col-xs-12 + %h4 Badges + + %p.data-heading Admin + %p + - if current_user.admin? + %span.label.label-success + %i.fa.fa-fw.fa-check + - else + %span.label.label-danger + %i.fa.fa-fw.fa-close + + %p.data-heading Moderator + %p + - if current_user.mod? + %span.label.label-success + %i.fa.fa-fw.fa-check + - else + %span.label.label-danger + %i.fa.fa-fw.fa-close + + %p.data-heading Supporter + %p + - if current_user.supporter? + %span.label.label-success + %i.fa.fa-fw.fa-check + - else + %span.label.label-danger + %i.fa.fa-fw.fa-close + + %p.data-heading Contributor + %p + - if current_user.contributor? + %span.label.label-success + %i.fa.fa-fw.fa-check + - else + %span.label.label-danger + %i.fa.fa-fw.fa-close + + %p.data-heading Blogger + %p + - if current_user.blogger? + %span.label.label-success + %i.fa.fa-fw.fa-check + - else + %span.label.label-danger + %i.fa.fa-fw.fa-close + + %p.data-heading Translator + %p + - if current_user.translator? + %span.label.label-success + %i.fa.fa-fw.fa-check + - else + %span.label.label-danger + %i.fa.fa-fw.fa-close + .row + .col-md-6.col-sm-6.col-xs-12 + %h3 IP + %p.data-heading Current Sign In + %p.text-muted= current_user.current_sign_in_ip + + %p.data-heading Last Sign In + %p.text-muted= current_user.last_sign_in_ip + .col-md-6.col-sm-6.col-xs-12 + %h3 Miscellaneous + + %p.data-heading Locale + %p.text-muted + - if current_user.locale.blank? + None set! + - else + = current_user.locale + + %p.data-heading Sign In count + %p.text-muted= current_user.sign_in_count + %h3 Dates + .row + .col-md-6.col-sm-6.col-xs-12 + %h4 Sign In + + %p.data-heading Current Sign In + %p.text-muted= localize(current_user.current_sign_in_at) + + %p.data-heading Last Sign In + %p.text-muted= localize(current_user.last_sign_in_at) + + %p.data-heading Remember me set at + %p.text-muted= localize(current_user.remember_created_at) + .col-md-6.col-sm-6.col-xs-12 + %h4 Create/Update + + %p.data-heading Account created + %p.text-muted + = localize(current_user.created_at) + = " (#{time_ago_in_words(current_user.created_at)} ago)" + + %p.data-heading Account last updated + %p.text-muted + = localize(current_user.updated_at) + = " (#{time_ago_in_words(current_user.updated_at)} ago)" diff --git a/config/locales b/config/locales new file mode 160000 index 00000000..9a8bf517 --- /dev/null +++ b/config/locales @@ -0,0 +1 @@ +Subproject commit 9a8bf51754efbf00e433fc1726fb3b7aeaff2bb4 diff --git a/config/locales/en.yml b/config/locales/en.yml deleted file mode 100644 index cd94d8ea..00000000 --- a/config/locales/en.yml +++ /dev/null @@ -1,473 +0,0 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - -en: - language: "English (US)" - frontend: - load: "Load more" - success: - title: "Success!" - error: - title: "Uh-oh..." - message: "An error occurred, a developer should check the console for details" - subscription: - subscribe: "Successfully subscribed." - unsubscribe: "Successfully unsubscribed." - fail: - subscribe: "Failed to subscribe to answer." - unsubscribe: "Failed to unsubscribe from answer." - group: - confirm: - title: "Really delete this group?" - text: "You will not be able to recover this group." - destroy_question: - confirm: - title: "Are you sure?" - text: "The question will be moved back to your inbox, but it won't delete any posts to social media." - destroy_comment: - confirm: - title: "Really delete?" - text: "You will not be able to recover this comment." - destroy_report: - confirm: - title: "Really delete?" - text: "You will not be able to recover this report." - destroy_own: - confirm: - title: "Are you sure?" - text: "The question will be removed." - inbox: - empty: "Nothing to see here." - confirm_all: - title: "Really delete %{count} questions?" - text: "They will be gone forever." - confirm: - title: "Really delete?" - text: "This question will be gone forever." - report: - confirm: - title: "Really report this %{type}?" - text: "A moderator will review your report and decide what happens.\nIf you'd like, you can also specify a reason." - input: "Specify a reason..." - flash: - ban: - error: "I'm sorry, %{name}, I'm afraid I can't do that." - reason: "Ban reason: %{reason}" - until: "Banned until: %{time}" - service: - create: - success: "Successfully added service" - error: "Could not add service :(" - failure: "An error occurred" - destroy: "Successfully removed service" - user: - update: - text: "Your profile has been updated!" - avatar: " It might take a few minutes until your new profile picture is shown everywhere." - header: " It might take a few minutes until your new profile header is shown everywhere." - error: "An error occurred. ;_;" - update_privacy: - success: "Your privacy settings have been updated!" - error: "An error occurred. ;_;" - messages: - noscript: "Please activate JavaScript." - error: "An error occurred." - parameter_error: "%{parameter} is required." - noauth: "requires authentication" - answer: - create: - fail: "Question is not in your inbox." - privacy_stronk: "This user does not want other users to answer their question." - peter_dinklage: "Answer is too short." - okay: "Successfully answered question." - destroy: - nopriv: "can't delete other people's answers" - okay: "Successfully deleted answer." - comment: - create: - rec_inv: "Your comment is too long." - okay: "Comment posted successfully." - destroy: - nopriv: "can't delete other people's comments" - okay: "Successfully deleted comment." - friend: - create: - fail: "You are already following that user." - okay: "Successfully followed user." - destroy: - fail: "You are not following that user." - okay: "Successfully unfollowed user." - group: - create: - noname: "Please give that group a name." - toolong: "Group name too long (30 characters max.)" - notfound: "Could not find user." - exists: "Group already exists." - okay: "Successfully created group." - destroy: - notfound: "Could not find group." - okay: "Successfully deleted group." - membership: - notfound: "Group not found." - add: "Successfully added user to group." - remove: "Successfully removed user from group." - inbox: - create: - okay: "Successfully added new question." - remove: - fail: "question not in your inbox" - okay: "Successfully deleted question." - remove_all: - okay: "Successfully deleted questions." - moderation: - vote: - fail: "You have already voted on this report." - okay: "Successfully voted on report." - destroy_vote: - fail: "You have not voted on that report." - okay: "Successfully removed vote from report." - destroy_report: - fail: "Something bad happened!" - okay: "WHERE DID IT GO??? OH NO!!!" - create_comment: - rec_inv: "Your comment is too long." - okay: "Comment posted successfully." - destroy_comment: - nopriv: "can't delete other people's comments" - okay: "Successfully deleted comment." - ban: - error: "Weird..." - nopriv: "You cannot ban an administrator!" - unban: "Unbanned user." - perma: "Permanently banned user." - temp: "Banned user until %{date}" - privilege: - nope: "nope!" - nopriv: "You'd better check YOUR privileges first!" - checked: "Successfully checked this user's %{privilege} privilege." - question: - destroy: - not_found: "Question does not exist" - not_authorized: "You are not allowed to delete this question" - okay: "Successfully deleted question." - create: - rec_inv: "Your question is too long." - not_found: "Group not found" - okay: "Question asked successfully." - preview: - fail: "Failed to render markdown." - okay: "Successfully rendered markdown." - report: - create: - login: "login required" - unknown: "unknown type" - not_found: "Could not find %{parameter}" - okay: "%{parameter} reported. A moderator will decide what happens with the #{parameter}." - smile: - create: - fail: "You have already smiled that answer." - okay: "Successfully smiled answer." - destroy: - fail: "You have not smiled that answer." - okay: "Successfully unsmiled answer." - create_comment: - fail: "You have already smiled that comment." - okay: "Successfully smiled comment." - destroy_comment: - fail: "You have not smiled that comment." - okay: "Successfully unsmiled comment." - subscription: - torpedo: "418 I'm a torpedo" - views: - placeholder: - inbox: "Write your answer here..." - comment: "Comment..." - question: "Type your question here…" - notifications: - show: "Show all notifications" - mark: " and mark them as read" - answer: - body: "answered %{question} %{time} ago" - question: "your question" - relationship: - body: "followed you %{time} ago" - smile: - body: "smiled at %{content} %{time} ago" # see below for 'content' vvvv - answer: "your answer" # content if smile, 'smiled at your answer' - comment: "your comment" # content if commentsmile, 'smiled at your comment' - comment: - body: "commented on %{content} %{time} ago" # see below for 'content' vvvv - your: "your answer" # 'commented on your answer' - their: "their answer" # 'commented on their answer' - user: "%{user}'s answer" # 'commented on user's asnwer' - # all three have the 'user' variable - tabs: - all: "All notifications" - answer: "Answers" - smile: "Smiles" - comment: "Comments" - commentsmile: "Comment Smiles" - relationship: "Followers" - 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: - answer: "Answer" - question: "Question" - comment: "Comment" - smile: "Smile" - follower: "Follower" - following: "Following" - timeline: "Timeline" - public: "Public" - user: "User" - terms: "Terms of Service" - privacy: "Privacy Policy" - about: "About" - group: - title: "Group" - members: "Members" - actions: - title: "Actions" - ask: "Ask" - ask_question: "Ask a question" - answer: "Answer" - options: "Options" - anonymous: "Hide your name" - delete: "Delete" - report: "Report" - return: "Return to Inbox" - subscribe: "Subscribe" - unsubscribe: "Unsubscribe" - view: "View comment smiles" - load: "Load more" - follow: "Follow" - unfollow: "Unfollow" - group: "Manage group memberships" - ban: "Ban Control" - privilege: "Check %{user}'s privileges" - save: "Save changes" - cancel: "Cancel" - close: "Close" - done: "Done" - y: "Yes" - n: "No" - sessions: - destroy: "Logout" - create: "Sign in" - new: "Sign up" - info: "With signing up you accept our %{terms}" - moderation: - tabs: - all: "All reports" - moderationbox: - reported: "%{user} reported a %{content} %{time} ago" - reason: "Reason:" - view: "View reported %{content}" - question: - title: "This question was not in your inbox? Answer it here!" - navigation: - timeline: "Timeline" - inbox: "Inbox" - discover: "Discover" - notifications: "Notifications" - show: "View profile" - settings: "Settings" - admin: "Kontrollzentrum" - sidekiq: "Sidekiq" - moderation: "Moderation Panel" - front: - subtitle: "Ask questions, give answers and learn more about your friends." - ask: - title: "Ask and answer questions" - 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!" - share: - title: "Sharing to other networks" - desc: "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!" - about: - subtitle: "About our service, features and other information" - links: - title: "Links" - desc: "Important pages and social media profiles from the %{app_title} team, which are recommended to visit!" - opensource: - title: "Open Source" - 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" - desc: "These people have contributed to %{app_title}'s source code." - howto: "Want to get listed here? %{fork} and create a new pull request with your changes." - fork: "Fork this repo" - team: - title: "The Team" - desc: "The people behind %{app_title}!" - moderators: - title: "Moderators" - desc: "The people on %{app_title} that look after you!" - funding: - title: "Funding" - desc: "People which (previously) donated to %{app_title}!" - statistics: - title: "Statistics" - desc: "All-time statistics for %{app_title}, updated every time you refresh the page!" - discover: - title: "Discover" - 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" - tab: - answers: "Most Liked" - questions: "Most Answers" - comments: "Most Controversial" - people: - title: "People" - desc: "Newcomers and people who asked the most questions" - tab: - new: "New Users" - questions: "Active Askers" - answers: "Most Answers" - userbox: - new: "registered %{time} ago" - answers: "answered %{questions}" - questions: "asked %{questions}" - answerbox: - asked: "%{user} asked %{time} ago" - read: "Read the entire answer" - answered: "%{hide} %{user}" # resolves into "Answered by %{user}" - hide: "Answered by" # ^ - time: "%{time} ago" - no_smile: "No one smiled this, yet." - no_comment: "There are no comments yet." - commentsmile: "People who smiled this comment" - questionbox: - title: "Ask something!" - 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}?" - load: "Asking..." - promote: - message: "Your question has been sent." - create: "Create an account" - another: "Ask another question" - join: "Join %{app_title} today! You'll be able to follow and ask people you know and a lot more." - settings: - tabs: - account: "Account" - profile: "Profile" - privacy: "Privacy" - sharing: "Sharing" - account: - modal: - title: "Save account changes" - username: "User name" - email: "Email address" - email_confirm: "Currently awaiting confirmation for %{resource}" - password: "Password" - password_confirm: "Confirm password" - password_help: "Leave this blank if you don't want to change it" - password_current: "Current password" - password_current_help: "We need your current password to confirm your changes" - delete: "Delete my account" - unsatisfied: "Unsatisfied?" - back: "Back" - profile: - displayname: "Your name" - avatar: "Profile picture" - avatar_adjust: "Adjust your new avatar" - header: "Profile header" - header_adjust: "Adjust your new header" - motivation: "Motivation header" - website: "Website" - location: "Location" - bio: "Bio" - placeholder: - motivation: "Ask me anything!" - location: "Where are you?" - bio: "Tell us something nice about you!" - privacy: - anonymous: "Allow anonymous questions" - public: "Show your answers in the public timeline" - stranger: "Allow other people to answer your questions" - service: - enabled: "Sharing is enabled for the following services:" - none: "You have not connected any services yet." - connect: "Connect to %{service}" - 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?" - permanent: "Permanently?" - reason: "Reason" - hammertime: "Hammer Time" - group: - title: "Manage group memberships" - tabs: - main: "Groups" - create: "Create new group" - create: "Create group" - name: "Group name" - members: "members" - privilege: - blogger: "The user gets that privilege if they blogged something (nice) about Retrospring." - contributor: "This user has contributed to justask (the software behind Retrospring)." - supporter: "This user monetarily supports the site." - moderator: "Someone trustworthy enough to help managing reports." - admin: "This user is part of the core team." - user: - follows_you: "Follows you" - title: - admin: "Admin" - moderator: "Moderator" - supporter: "Supporter" - contributor: "Contributor" - blogger: "Blogger" - banned: "Banned" diff --git a/config/locales/fr.yml b/config/locales/fr.yml deleted file mode 100644 index 5e7435d4..00000000 --- a/config/locales/fr.yml +++ /dev/null @@ -1,454 +0,0 @@ ---- -fr: - language: "Français" - frontend: - load: "Afficher plus" - success: - title: "Succès !" - error: - title: "Oh oh..." - message: "Une erreur est survenue, un développeur devrait jeter un œil à la console pour plus de détails." - subscription: - subscribe: "Abonné avec succès." - unsubscribe: "Désabonné avec succès." - fail: - subscribe: "Échec de l'abonnement à la réponse." - unsubscribe: "Échec du désabonnement à la réponse." - group: - confirm: - title: "Voulez-vous vraiment supprimer ce groupe ?" - text: "Vous ne pourrez pas le récupérer." - destroy_question: - confirm: - title: "Êtes-vous sûr ?" - text: "La question retournera dans votre boîte de réception, mais d'éventuels partages sur des réseaux sociaux ne seront pas supprimés." - destroy_comment: - confirm: - title: "Voulez-vous vraiment supprimer ce commentaire ?" - text: "Vous ne pourrez pas le récupérer." - destroy_report: - confirm: - title: "Voulez-vous vraiment supprimer ce signalement ?" - text: "Vous ne pourrez pas le récupérer." - destroy_own: - confirm: - title: "Êtes-vous sûr ?" - text: "Cette question sera supprimée." - inbox: - empty: "Rien à voir ici." - confirm_all: - title: "Voulez-vous vraiment supprimer %{count} questions ?" - text: "Elles disparaîtront à tout jamais." - confirm: - title: "Voulez-vous vraiment supprimer cette question ?" - text: "Elle disparaîtra à tout jamais." - report: - confirm: - title: "Voulez-vous vraiment signaler cette/ce %{type} ?" - text: |- - Un modérateur examinera votre signalement et prendra une décision appropriée. - Si vous le désirez, vous pouvez également indiquer une raison. - input: "Indiquez une raison..." - flash: - ban: - error: "Je suis désolé, %{name}, mais je ne peux pas vous laisser faire ça." - reason: "Raison du bannissement : %{reason}" - until: "Banni jusqu'au : %{time}" - service: - create: - success: "Service ajouté avec succès" - error: "Le service n'a pas pu être ajouté :(" - failure: "Une erreur est survenue" - destroy: "Service supprimé avec succès" - user: - update: - text: "Votre profil a été mis à jour !" - avatar: " Plusieurs minutes peuvent être nécessaires pour que votre image de profil soit affichée partout." - header: " Plusieurs minutes peuvent être nécessaires pour que votre nouvelle image d'en-tête soit affichée partout." - error: "Une erreur est survenue. ;_;" - update_privacy: - success: "Vos paramètres de confidentialité ont été mis à jour !" - error: "Une erreur est survenue. ;_;" - messages: - noscript: "Veuillez activer JavaScript." - error: "Une erreur est survenue." - parameter_error: "%{parameter} est requis." - noauth: "authentification requise" - answer: - create: - fail: "Cette question n'est pas dans votre boîte de réception." - privacy_stronk: "Cet utilisateur ne veut pas que d'autres utilisateurs répondent à sa question." - peter_dinklage: "Votre réponse est trop courte." - okay: "Vous avez répondu à la question avec succès." - destroy: - nopriv: "vous ne pouvez pas supprimer la réponse de quelqu'un d'autre" - okay: "Réponse supprimée avec succès." - comment: - create: - rec_inv: "Votre commentaire est trop long." - okay: "Le commentaire a été publié avec succès." - destroy: - nopriv: "vous ne pouvez pas supprimer le commentaire de quelqu'un d'autre" - okay: "Commentaire supprimé avec succès." - friend: - create: - fail: "Vous suivez déjà cet utilisateur." - okay: "Vous suivez désormais cet utilisateur." - destroy: - fail: "Vous ne suivez pas cet utilisateur." - okay: "Vous ne suivez plus cet utilisateur." - group: - create: - noname: "Veuillez donner un nom à ce groupe." - toolong: "Le nom du groupe est trop long (30 caractères max.)" - notfound: "L'utilisateur est introuvable." - exists: "Ce groupe existe déjà." - okay: "Le groupe a été créé avec succès." - destroy: - notfound: "Le groupe est introuvable." - okay: "Le groupe a été supprimé avec succès." - membership: - notfound: "Le groupe est introuvable." - add: "L'utilisateur a été ajouté avec succès." - remove: "L'utilisateur a été enlevé avec succès." - inbox: - create: - okay: "Nouvelle question ajouté avec succès." - remove: - fail: "la question n'est pas dans votre boîte aux lettres" - okay: "La question a été supprimée avec succès." - remove_all: - okay: "Les questions ont été supprimées avec succès." - moderation: - vote: - fail: "Vous avez déjà voté sur ce signalement." - okay: "Vous avez voté sur le signalement avec succès." - destroy_vote: - fail: "Vous n'avez pas voté sur ce signalement." - okay: "Vous avez retiré votre vote sur ce signalement avec succès." - destroy_report: - fail: "Quelque chose de mauvais est arrivé !" - okay: "OÙ EST-IL PASSÉ ??? OH, NON !!!" - create_comment: - rec_inv: "Votre commentaire est trop long." - okay: "Votre commentaire a été publié avec succès." - destroy_comment: - nopriv: "vous ne pouvez pas supprimer le commentaire de quelqu'un d'autre" - okay: "Commentaire supprimé avec succès." - ban: - error: Bizarre... - nopriv: "Vous ne pouvez pas bannir un administrateur !" - unban: "Bannissement levé avec succès." - perma: "Utilisateur banni définitivement." - temp: "Utilisateur banni jusqu'au %{date}" - privilege: - nope: "non !" - nopriv: "Vérifier d'abord VOS privilèges !" - checked: "Privilège %{privilege} de l'utilisateur vérifié avec succès." - question: - destroy: - not_found: "La question n'existe pas" - not_authorized: "Vous n'êtes pas autorisé à supprimer cette question" - okay: "La question a été supprimée avec succès." - create: - rec_inv: "Votre question est trop longue." - not_found: "Le groupe est introuvable." - okay: "La question a été posée avec succès." - preview: - fail: "Échec de rendu du markdown." - okay: "Markdown rendu avec succès." - report: - create: - login: "connexion requise" - unknown: "type inconnu" - not_found: "%{parameter} est introuvable" - okay: "%{parameter} signalé(e). Un modérateur décidera de ce qu'il adviendra avec le/la %{parameter}." - smile: - create: - fail: "Vous souriez déjà à cette question." - okay: "Vous souriez à la question." - destroy: - fail: "Vous n'avez pas souri à cette réponse." - okay: "Vous ne souriez plus à la question." - create_comment: - fail: "Vous avez déjà souri à ce commentaire." - okay: "Vous souriez au commentaire." - destroy_comment: - fail: "Vous n'avez pas souri à ce commentaire." - okay: "Vous ne souriez plus au commentaire." - subscription: - torpedo: "418 Je suis une torpille" - views: - placeholder: - inbox: "Écrivez votre réponse ici..." - comment: "Laissez un commentaire..." - question: "Tapez votre question ici..." - notifications: - show: "Afficher toutes les notifications" - mark: " et les marquer comme lues" - answer: - body: "a répondu à %{question} il y a %{time}" - question: "votre question" - relationship: - body: "vous a suivi il y a %{time}" - smile: - body: "a souri à %{content} il y a %{time}" - answer: "votre réponse" - comment: "votre commentaire" - comment: - body: "a laissé un commentaire sur %{content} il y a %{time}" - your: "votre réponse" - their: "sa réponse" - user: "la réponse de %{user}" - tabs: - all: "Toutes les notifications" - answer: "Réponses" - smile: "Sourires" - comment: "Commentaires" - commentsmile: "Sourires sur le commentaire" - relationship: "Abonnés" - inbox: - empty: "Rien à voir ici." - sidebar: - questions: - title: "À court de questions ?" - button: "Obtenir de nouvelles questions" - share: - title: "Partager" - button: "Partager sur %{service}" - actions: - title: "Actions" - button: "Supprimer toutes les questions" - entry: - asked: "%{user} a posé cette question il y a %{time}" - response: "réponse" - sharing: - title: Partage - post: "Poster sur %{service}" - none: "Vous n'avez pas connecté de services pour l'instant. Visitez vos %{settings} pour en connecter un." - settings: "paramètres des services" - general: - answer: "Réponse" - question: "Question" - comment: "Commentaire" - smile: "Sourire" - follower: "Abonné" - following: "Abonnement" - timeline: "Fil d'actualité" - public: "Public" - user: "Utilisateur" - terms: "Conditions générales d'utilisation" - privacy: "Politique de confidentialité" - about: "À propos" - group: - title: "Groupe" - members: "Membres" - actions: - title: "Actions" - ask: "Demander" - ask_question: "Poser une question" - answer: "Réponse" - options: "Paramètres" - anonymous: "Masquer votre nom" - delete: "Supprimer" - report: "Signaler" - return: "Retourner à la boîte de récéption" - subscribe: "S'abonner" - unsubscribe: "Se désabonner" - view: "Voir le sourires sur le commentaire" - load: "Charger plus" - follow: "Suivre" - unfollow: "Ne plus suivre" - group: "Gérer l'appartenance à un groupe" - ban: "Contrôle des bannissements" - privilege: "Vérifier les privilèges de %{user}" - save: "Enregistrer les modifications" - cancel: "Annuler" - close: "Fermer" - done: "Terminé" - y: "Oui" - n: "Non" - sessions: - destroy: "Se déconnecter" - create: "Se connecter" - new: "S'inscrire" - info: "En vous inscrivant, vous acceptez nos %{terms}" - moderation: - tabs: - all: "Tous les signalements" - moderationbox: - reported: "%{user} a signalé un/une %{content} il y a %{time}" - reason: "Raison :" - view: "Voir %{content} signalé" - question: - title: "Cette question n'était pas dans votre boîte de réception ? Répondez-y ici !" - navigation: - timeline: "Fil d'actualité" - inbox: "Boîte de réception" - discover: "Découvrir" - notifications: "Notifications" - show: "Voir le profil" - settings: "Paramètres" - admin: "Centre de contrôle" - sidekiq: "Sidekiq" - moderation: "Panneau de modération" - front: - subtitle: "Posez des questions, répondez-y, et apprenez-en plus sur vos amis." - ask: - title: "Posez et répondez à des questions" - desc: "Avec %{app_title} vous pouvez poser des questions à la populace et répondre aux questions d'autres utilisateurs ou d'inconnus. Envie d'en savoir plus ? Continuez la conversation dans les commentaires !" - follow: - title: "Suivez des utilisateurs et soyez suivi" - desc: "Suivre des utilisateurs vous permet d'avoir un fil personnalisé de tous ceux dont vous voulez savoir plus. Vous pouvez aussi poser une question à tous vos abonnés à la fois !" - share: - title: "Partage vers d'autres réseaux" - desc: "Envie de partager votre réponse à une question pour que plus de monde puisse la lire ? Avec un simple clic sur le bouton \"Répondre\", votre réponse est partagée où que vous vouliez !" - about: - subtitle: "À propos de notre service, de nos fonctionnalités, et autres informations" - links: - title: "Liens" - desc: "Pages importantes et profils sur les réseaux sociaux de l'équipe %{app_title}, que nous vous recommandons de visiter !" - opensource: - title: "Open Source" - warning: "%{app_title} fonctionne sur du code incomplet, plein de bugs. Caveat emptor." - desc: "Envie de nous aider ? Que vous soyez un développeur Ruby, un codeur CoffeeScript ou un designer frontend, vous pouvez dès maintenant aider %{app_title} à obtenir les fonctionnalités longuement désirées par nos utilisateurs en créant un fork sur notre %{github}. Si ce n'est pas le cas, vous pouvez toujours signaler des bugs et suggérer des fonctionnalités sur notre %{bugtracker}." - github: "Dépôt GitHub" - bugtracker: "tracker des bugs" - repository: - title: "Dépôt principal" - desc: "Là où la magie du code et les réparations s'effectuent !" - contributors: - title: "Contributeurs" - desc: "Ces personnes ont contribué au code source de %{app_title}." - howto: "Vous souhaitez être listé ici ? %{fork} et envoyez une pull request avec vos changements." - fork: "Faites un fork de ce repo" - team: - title: "L'Équipe" - desc: "Ceux derrière %{app_title} !" - moderators: - title: "Modérateurs" - desc: "Ceux qui veillent sur vous sur %{app_title} !" - funding: - title: "Financement" - desc: "Ceux qui ont (précédemment) fait un don à %{app_title} !" - statistics: - title: "Statistiques" - desc: "Statistiques globales pour %{app_title}, mises à jour dès que vous rafraîchissez la page !" - discover: - title: "Découvrir" - subtitle: "L'endroit idéal pour trouver du contenu digne d'intérêt datant de la dernière semaine sur %{app_title} !" - content: - title: "Contenu populaire" - desc: "Réponses les plus souries et questions les plus répondues" - tab: - answers: "Les plus aimées" - questions: "Les plus répondues" - comments: "Les plus controversées" - people: - title: "Personnes" - desc: "Nouveaux arrivants et personnes ayant posé le plus de questions" - tab: - new: "Nouveaux utilisateurs" - questions: "Les plus actifs" - answers: "Les plus répondues" - userbox: - new: "enregistré depuis %{time}" - answers: "a répondu à %{questions}" - questions: "a posé %{questions}" - answerbox: - asked: "%{user} a posé cette question il y a %{time}" - read: "Lire la réponse entière" - answered: "%{hide} %{user}" - hide: "Répondu par" - time: "Il y a %{time}" - no_smile: "Personne n'a souri, pour le moment." - no_comment: "Il n'y a pas encore de commentaires." - commentsmile: "Personnes qui ont souri à ce commentaire" - questionbox: - title: "Posez une question !" - banned: "Cet utilisateur a subi les foudres du Marteau de la Justice." - required: "Cet utilisateur refuse les questions de non-inscrits. Pourquoi ne pas vous %{signup} ?" - load: "Envoi..." - promote: - message: "Votre question a été envoyée." - create: "Créer un compte" - another: "Poser une autre question" - join: "Rejoignez %{app_title} dès aujourd'hui ! Vous pourrez suivre vos connaissances, leur poser des questions, et bien plus." - settings: - tabs: - account: "Compte" - profile: "Profil" - privacy: "Confidentialité" - sharing: "Partage" - account: - modal: - title: "Enregistrer les modifications" - username: "Nom d'utilisateur" - email: "Adresse e-mail" - email_confirm: "En attente de la confirmation pour %{resource}" - password: "Mot de passe" - password_confirm: "Confirmer le mot de passe" - password_help: "Laissez vide si vous ne souhaitez pas changer" - password_current: "Mot de passe actuel" - password_current_help: "Nous avons besoin de votre mot de passe actuel pour opérer les changements" - delete: "Supprimer mon compte" - unsatisfied: "Insatisfait ?" - back: "Retour" - profile: - displayname: "Votre nom" - avatar: "Image de profil" - avatar_adjust: "Ajustez votre nouvel avatar" - header: "Image d'en-tête" - header_adjust: "Ajustez votre nouvelle en-tête" - motivation: "En-tête de motivation" - website: "Site web" - location: "Lieu" - bio: "Biographie" - placeholder: - motivation: "Posez-moi une question !" - location: "Où êtes-vous?" - bio: "Dites-nous quelque chose d'intéressant à propos de vous !" - privacy: - anonymous: "Autoriser les questions anonymes" - public: "Montrer vos réponses dans le fil d'actualité public" - stranger: "Permettre à d'autres utilisateurs de répondre à vos questions" - service: - enabled: "Partage activé pour les services suivants :" - none: "Vous n'avez lié aucun réseau social pour le moment" - connect: "Lier à %{service}" - disconnect: "Révoquer l'accès" - confirm: "Voulez-vous vraiment révoquer l'accès à %{service} ?" - modal: - ask: - title: "Demander à vos abonnés" - choose: "Choisir un groupe :" - loading: "Envoi..." - bancontrol: - title: "Centre de contrôle des bannissements" - ban: "Bannir ?" - permanent: "Définitivement ?" - reason: "Raison" - hammertime: "L'heure du jugement" - group: - title: "Gérer les adhésions aux groupes" - tabs: - main: "Groupes" - create: "Créer un nouveau groupe" - create: "Créer le groupe" - name: "Nom du groupe" - members: "membres" - privilege: - blogger: "L'utilisateur obtient ce titre s'il a posté un article (agréable) à propos de Retrospring." - contributor: "Cet utilisateur a contribué à justask, le logiciel derrière Retrospring." - supporter: "Cet utilisateur supporte financièrement le site." - moderator: "Quelqu'un suffisamment de confiance pour aider à la gestion des signalements." - admin: "Cet utilisateur fait partie de l'équipe principale." - user: - follows_you: "Vous suit" - title: - admin: "Administrateur" - moderator: "Modérateur" - supporter: "Supporter" - contributor: "Contributeur" - blogger: "Blogger" - banned: "Banni" diff --git a/config/routes.rb b/config/routes.rb index 8cb2a9ca..af4b4d6b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -65,6 +65,8 @@ Rails.application.routes.draw do match '/settings/privacy', to: 'user#edit_privacy', via: :get, as: :edit_user_privacy match '/settings/privacy', to: 'user#update_privacy', via: :patch, as: :update_user_privacy + match '/settings/data', to: 'user#data', via: :get, as: :user_data + namespace :ajax do match '/ask', to: 'question#create', via: :post, as: :ask match '/destroy_question', to: 'question#destroy', via: :post, as: :destroy_question diff --git a/db/migrate/20150619123121_add_translator_to_users.rb b/db/migrate/20150619123121_add_translator_to_users.rb new file mode 100644 index 00000000..849d5ebc --- /dev/null +++ b/db/migrate/20150619123121_add_translator_to_users.rb @@ -0,0 +1,5 @@ +class AddTranslatorToUsers < ActiveRecord::Migration + def change + add_column :users, :translator, :boolean, default: :false + end +end diff --git a/db/schema.rb b/db/schema.rb index a2d647b9..33b792fd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150508144336) do +ActiveRecord::Schema.define(version: 20150619123121) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -19,11 +19,12 @@ ActiveRecord::Schema.define(version: 20150508144336) do create_table "answers", force: :cascade do |t| t.text "content" t.integer "question_id" - t.integer "comment_count", default: 0, null: false + t.integer "comment_count", default: 0, null: false t.integer "user_id" t.datetime "created_at" t.datetime "updated_at" - t.integer "smile_count", default: 0, null: false + t.integer "smile_count", default: 0, null: false + t.boolean "nsfw", default: false end add_index "answers", ["user_id", "created_at"], name: "index_answers_on_user_id_and_created_at", using: :btree @@ -113,6 +114,60 @@ ActiveRecord::Schema.define(version: 20150508144336) do t.datetime "updated_at" end + create_table "oauth_access_grants", force: :cascade do |t| + t.integer "resource_owner_id", null: false + t.integer "application_id", null: false + t.string "token", null: false + t.integer "expires_in", null: false + t.text "redirect_uri", null: false + t.datetime "created_at", null: false + t.datetime "revoked_at" + t.string "scopes" + end + + add_index "oauth_access_grants", ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree + + create_table "oauth_access_tokens", force: :cascade do |t| + t.integer "resource_owner_id" + t.integer "application_id" + t.string "token", null: false + t.string "refresh_token" + t.integer "expires_in" + t.datetime "revoked_at" + t.datetime "created_at", null: false + t.string "scopes" + end + + add_index "oauth_access_tokens", ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree + add_index "oauth_access_tokens", ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree + add_index "oauth_access_tokens", ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree + + create_table "oauth_applications", force: :cascade do |t| + t.string "name", null: false + t.string "uid", null: false + t.string "secret", null: false + t.text "redirect_uri", null: false + t.string "scopes", default: "", null: false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "owner_id" + t.string "owner_type" + t.string "description" + t.string "icon_file_name" + t.string "icon_content_type" + t.integer "icon_file_size" + t.datetime "icon_updated_at" + t.integer "crop_x" + t.integer "crop_y" + t.integer "crop_w" + t.integer "crop_h" + t.boolean "icon_processing" + end + + add_index "oauth_applications", ["name"], name: "index_oauth_applications_on_name", unique: true, using: :btree + add_index "oauth_applications", ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree + add_index "oauth_applications", ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree + create_table "questions", force: :cascade do |t| t.string "content" t.boolean "author_is_anonymous" @@ -121,7 +176,8 @@ ActiveRecord::Schema.define(version: 20150508144336) do t.integer "user_id" t.datetime "created_at" t.datetime "updated_at" - t.integer "answer_count", default: 0, null: false + t.integer "answer_count", default: 0, null: false + t.boolean "nsfw", default: false end add_index "questions", ["user_id", "created_at"], name: "index_questions_on_user_id_and_created_at", using: :btree @@ -178,12 +234,12 @@ ActiveRecord::Schema.define(version: 20150508144336) do end create_table "users", force: :cascade do |t| - t.string "email", default: "", null: false - t.string "encrypted_password", default: "", null: false + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", default: 0, null: false + t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" @@ -191,19 +247,19 @@ ActiveRecord::Schema.define(version: 20150508144336) do t.datetime "created_at" t.datetime "updated_at" t.string "screen_name" - t.integer "friend_count", default: 0, null: false - t.integer "follower_count", default: 0, null: false - t.integer "asked_count", default: 0, null: false - t.integer "answered_count", default: 0, null: false - t.integer "commented_count", default: 0, null: false + t.integer "friend_count", default: 0, null: false + t.integer "follower_count", default: 0, null: false + t.integer "asked_count", default: 0, null: false + t.integer "answered_count", default: 0, null: false + t.integer "commented_count", default: 0, null: false t.string "display_name" - t.integer "smiled_count", default: 0, null: false - t.boolean "admin", default: false, null: false - t.string "motivation_header", default: "", null: false - t.string "website", default: "", null: false - t.string "location", default: "", null: false - t.text "bio", default: "", null: false - t.boolean "moderator", default: false, null: false + t.integer "smiled_count", default: 0, null: false + t.boolean "admin", default: false, null: false + t.string "motivation_header", default: "", null: false + t.string "website", default: "", null: false + t.string "location", default: "", null: false + t.text "bio", default: "", null: false + t.boolean "moderator", default: false, null: false t.string "profile_picture_file_name" t.string "profile_picture_content_type" t.integer "profile_picture_file_size" @@ -220,10 +276,13 @@ ActiveRecord::Schema.define(version: 20150508144336) do t.boolean "privacy_show_in_search", default: true t.boolean "permanently_banned", default: false t.boolean "blogger", default: false + t.boolean "nsfw", default: false + t.boolean "show_nsfw", default: false + t.boolean "privacy_allow_nsfw_questions", default: true t.boolean "contributor", default: false t.string "ban_reason" t.datetime "banned_until" - t.integer "comment_smiled_count", default: 0, null: false + t.integer "comment_smiled_count", default: 0, null: false t.string "profile_header_file_name" t.string "profile_header_content_type" t.integer "profile_header_file_size" @@ -233,6 +292,10 @@ ActiveRecord::Schema.define(version: 20150508144336) do t.integer "crop_h_y" t.integer "crop_h_w" t.integer "crop_h_h" + t.string "socket_key", default: "" + t.datetime "socket_key_expiry", default: '0001-01-01 00:00:00' + t.string "locale" + t.boolean "translator", default: false end add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree