Merge remote-tracking branch 'personal/merge/tootsuite/master' into gs-master
This commit is contained in:
commit
f7c4d4464b
@ -31,7 +31,7 @@ class ApplicationController < ActionController::Base
|
||||
private
|
||||
|
||||
def https_enabled?
|
||||
Rails.env.production? && ENV['LOCAL_HTTPS'] == 'true'
|
||||
Rails.env.production?
|
||||
end
|
||||
|
||||
def store_current_location
|
||||
|
@ -50,7 +50,7 @@
|
||||
"column_header.unpin": "取消固定",
|
||||
"column_subheading.navigation": "导航",
|
||||
"column_subheading.settings": "设置",
|
||||
"compose_form.hashtag_warning": "This toot won't be listed under any hashtag as it is unlisted. Only public toots can be searched by hashtag.",
|
||||
"compose_form.hashtag_warning": "这条嘟文被设置为“不公开”,因此它不会出现在任何话题标签的列表下。只有公开的嘟文才能通过话题标签进行搜索。",
|
||||
"compose_form.lock_disclaimer": "你的帐户没有{locked}。任何人都可以在关注你后立即查看仅关注者可见的嘟文。",
|
||||
"compose_form.lock_disclaimer.lock": "开启保护",
|
||||
"compose_form.placeholder": "在想啥?",
|
||||
@ -214,7 +214,7 @@
|
||||
"search_popout.tips.user": "用户",
|
||||
"search_results.total": "共 {count, number} 个结果",
|
||||
"standalone.public_title": "大家都在干啥?",
|
||||
"status.block": "Block @{name}",
|
||||
"status.block": "屏蔽 @{name}",
|
||||
"status.cannot_reblog": "无法转嘟这条嘟文",
|
||||
"status.delete": "删除",
|
||||
"status.embed": "嵌入",
|
||||
@ -223,7 +223,7 @@
|
||||
"status.media_hidden": "隐藏媒体内容",
|
||||
"status.mention": "提及 @{name}",
|
||||
"status.more": "更多",
|
||||
"status.mute": "Mute @{name}",
|
||||
"status.mute": "隐藏 @{name}",
|
||||
"status.mute_conversation": "隐藏此对话",
|
||||
"status.open": "展开嘟文",
|
||||
"status.pin": "在个人资料页面置顶",
|
||||
|
13
app/views/user_mailer/email_changed.zh-cn.html.erb
Normal file
13
app/views/user_mailer/email_changed.zh-cn.html.erb
Normal file
@ -0,0 +1,13 @@
|
||||
<p><%= @resource.email %>,你好呀!</p>
|
||||
|
||||
<% if @resource&.unconfirmed_email? %>
|
||||
<p>我们发送这封邮件是为了提醒你,你在 <%= @instance %> 上使用的电子邮件地址即将变更为 <%= @resource.unconfirmed_email %>。</p>
|
||||
<% else %>
|
||||
<p>我们发送这封邮件是为了提醒你,你在 <%= @instance %> 上使用的电子邮件地址已经变更为 <%= @resource.unconfirmed_email %>。</p>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
如果你并没有请求更改你的电子邮件地址,则他人很有可能已经入侵你的帐户。请立即更改你的密码;如果你已经无法访问你的帐户,请联系实例的管理员请求协助。
|
||||
</p>
|
||||
|
||||
<p>来自 <%= @instance %> 管理团队</p>
|
11
app/views/user_mailer/email_changed.zh-cn.text.erb
Normal file
11
app/views/user_mailer/email_changed.zh-cn.text.erb
Normal file
@ -0,0 +1,11 @@
|
||||
<%= @resource.email %>,你好呀!
|
||||
|
||||
<% if @resource&.unconfirmed_email? %>
|
||||
我们发送这封邮件是为了提醒你,你在 <%= @instance %> 上使用的电子邮件地址即将变更为 <%= @resource.unconfirmed_email %>。
|
||||
<% else %>
|
||||
我们发送这封邮件是为了提醒你,你在 <%= @instance %> 上使用的电子邮件地址已经变更为 <%= @resource.unconfirmed_email %>。
|
||||
<% end %>
|
||||
|
||||
如果你并没有请求更改你的电子邮件地址,则他人很有可能已经入侵你的帐户。请立即更改你的密码;如果你已经无法访问你的帐户,请联系实例的管理员请求协助。
|
||||
|
||||
来自 <%= @instance %> 管理团队
|
@ -0,0 +1,13 @@
|
||||
<p><%= @resource.email %>,你好呀!</p>
|
||||
|
||||
<p>你正在更改你在 <%= @instance %> 使用的电子邮件地址。</p>
|
||||
|
||||
<p>点击下面的链接以确认操作:<br>
|
||||
<%= link_to '确认我的电子邮件地址', confirmation_url(@resource, confirmation_token: @token) %></p>
|
||||
|
||||
<p>上面的链接按不动?把下面的链接复制到地址栏再试试:<br>
|
||||
<span><%= confirmation_url(@resource, confirmation_token: @token) %></span>
|
||||
|
||||
<p>记得读一读我们的<%= link_to '使用条款', terms_url %>哦。</p>
|
||||
|
||||
<p>来自 <%= @instance %> 管理团队</p>
|
@ -0,0 +1,10 @@
|
||||
<%= @resource.email %>,你好呀!
|
||||
|
||||
你正在更改你在 <%= @instance %> 使用的电子邮件地址。
|
||||
|
||||
点击下面的链接以确认操作:
|
||||
<%= confirmation_url(@resource, confirmation_token: @token) %>
|
||||
|
||||
记得读一读我们的使用条款哦:<%= terms_url %>
|
||||
|
||||
来自 <%= @instance %> 管理团队
|
@ -17,15 +17,17 @@ zh-CN:
|
||||
unconfirmed: 继续操作前请先确认你的帐户。
|
||||
mailer:
|
||||
confirmation_instructions:
|
||||
subject: Mastodon 帐户确认信息
|
||||
subject: Mastodon:确认 %{instance} 帐户信息
|
||||
email_changed:
|
||||
subject: Mastodon 电子邮件地址已被修改
|
||||
subject: Mastodon:电子邮件地址已被修改
|
||||
password_change:
|
||||
subject: Mastodon 密码已被重置
|
||||
subject: Mastodon:密码已被重置
|
||||
reconfirmation_instructions:
|
||||
subject: Mastodon:确认 %{instance} 电子邮件地址
|
||||
reset_password_instructions:
|
||||
subject: Mastodon 重置密码信息
|
||||
subject: Mastodon:重置密码信息
|
||||
unlock_instructions:
|
||||
subject: Mastodon 帐户解锁信息
|
||||
subject: Mastodon:帐户解锁信息
|
||||
omniauth_callbacks:
|
||||
failure: 由于%{reason},无法从%{kind}获得授权。
|
||||
success: 成功地从%{kind}获得授权。
|
||||
|
@ -263,12 +263,18 @@ zh-CN:
|
||||
unresolved: 未处理
|
||||
view: 查看
|
||||
settings:
|
||||
activity_api_enabled:
|
||||
desc_html: 本站用户发布的嘟文数,以及本站的活跃用户数和一周内新用户数
|
||||
title: 公开用户活跃度的统计数据
|
||||
bootstrap_timeline_accounts:
|
||||
desc_html: 用半角逗号分隔多个用户名。只能添加来自本站且未开启保护的帐户。如果留空,则默认关注本站所有的管理员。
|
||||
title: 新用户默认关注
|
||||
contact_information:
|
||||
email: 用于联系的公开电子邮件地址
|
||||
username: 用于联系的公开用户名
|
||||
peers_api_enabled:
|
||||
desc_html: 截至目前本实例在网络中已发现的域名
|
||||
title: 公开已知实例的列表
|
||||
registrations:
|
||||
closed_message:
|
||||
desc_html: 本站关闭注册期间的提示信息。可以使用 HTML 标签
|
||||
|
@ -47,22 +47,18 @@ describe ApplicationController, type: :controller do
|
||||
include_examples 'respond_with_error', 422
|
||||
end
|
||||
|
||||
it "does not force ssl if LOCAL_HTTPS is not 'true'" do
|
||||
it "does not force ssl if Rails.env.production? is not 'true'" do
|
||||
routes.draw { get 'success' => 'anonymous#success' }
|
||||
ClimateControl.modify LOCAL_HTTPS: '' do
|
||||
allow(Rails.env).to receive(:production?).and_return(true)
|
||||
get 'success'
|
||||
expect(response).to have_http_status(:success)
|
||||
end
|
||||
allow(Rails.env).to receive(:production?).and_return(false)
|
||||
get 'success'
|
||||
expect(response).to have_http_status(:success)
|
||||
end
|
||||
|
||||
it "forces ssl if LOCAL_HTTPS is 'true'" do
|
||||
it "forces ssl if Rails.env.production? is 'true'" do
|
||||
routes.draw { get 'success' => 'anonymous#success' }
|
||||
ClimateControl.modify LOCAL_HTTPS: 'true' do
|
||||
allow(Rails.env).to receive(:production?).and_return(true)
|
||||
get 'success'
|
||||
expect(response).to redirect_to('https://test.host/success')
|
||||
end
|
||||
allow(Rails.env).to receive(:production?).and_return(true)
|
||||
get 'success'
|
||||
expect(response).to redirect_to('https://test.host/success')
|
||||
end
|
||||
|
||||
describe 'helper_method :current_account' do
|
||||
|
@ -46,7 +46,7 @@ RSpec.configure do |config|
|
||||
config.include ActiveSupport::Testing::TimeHelpers
|
||||
|
||||
config.before :each, type: :feature do
|
||||
https = Rails.env.production? || ENV['LOCAL_HTTPS'] == 'true'
|
||||
https = ENV['LOCAL_HTTPS'] == 'true'
|
||||
Capybara.app_host = "http#{https ? 's' : ''}://#{ENV.fetch('LOCAL_DOMAIN')}"
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user