Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate docs/security #82

Merged
merged 7 commits into from
Jun 12, 2022
Merged

Conversation

kylinbin
Copy link
Contributor

@kylinbin kylinbin commented Jun 15, 2021

第一次翻译 & 提交,烦请指正。不知道提交之后为什么显示英文原文的每句长度有变化,我是用 Poedit 来编辑的,并没有改动英文原文。

  • 在 README.md 中勾选翻译的章节条目(把方括号里的空格替换为 x).
  • 在本地生成文档并预览输出,处理所有错误和异常。
  • 运行 pre-commit 钩子,处理所有问题。
  • 更新 .po 文件顶部的 Last-Translator 字段。
  • 如果你是第一个翻译者,同时更新 .po 文件顶部的 FIRST AUTHOR <EMAIL@ADDRESS>,替换为你的名字和 Email 地址。

@greyli
Copy link
Member

greyli commented Jun 15, 2021

不知道提交之后为什么显示英文原文的每句长度有变化,我是用 Poedit 来编辑的,并没有改动英文原文。

这是 Poedit 的问题(#36)。

Copy link
Collaborator

@FesonX FesonX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻译大体上没有什么问题,主要是中英文之间空格使用多余,或者括号未使用中文。
一些英文原文的长度变化问题,未做修正

msgstr ""
"另外值得注意的是不使用引号的属性。 虽然 Jinja2 可以通过转义 HTML 避免 XSS 问题,"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"另外值得注意的是不使用引号的属性。 虽然 Jinja2 可以通过转义 HTML 避免 XSS 问题,"
"另外值得注意的是未经引号包裹的属性。 虽然 Jinja2 可以通过转义 HTML 避免 XSS 问题,"

msgstr ""
"有一类 XSS 问题, Jinja 的转义并不能防止。``a`` 标签的 ``href`` 属性可以包含一"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"有一类 XSS 问题, Jinja 的转义并不能防止。``a`` 标签的 ``href`` 属性可以包含一"
"有一类 XSS 问题,Jinja 的转义并不能防止。``a`` 标签的 ``href`` 属性可以包含一"

msgstr ""
"如果你的认证信息存储在 cookie 中,你就有了隐式状态管理。“登录”的状态是由一个 "
"cookie 控制的,对每个页面的请求都会发送这个 cookie。不幸的是,由第三方网站引发的"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"cookie 控制的,对每个页面的请求都会发送这个 cookie。不幸的是,由第三方网站引发的"
"cookie 控制的,对每个页面的请求都会发送这个 cookie。不幸的是,由第三方网站发起的"

msgstr ""
"想象一下有数百万的并发用户的 Facebook ,有人发出小猫咪图片的链接。 当用户访问该"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"想象一下有数百万的并发用户的 Facebook ,有人发出小猫咪图片的链接。 当用户访问该"
"想象一下有数百万并发用户的 Facebook,有人发出小猫咪图片的链接。 当用户访问该"

msgstr ""
"如何防止这种情况呢?基本上你可以这样做:每一个修改服务器内容的请求,必须使用一个"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"如何防止这种情况呢?基本上你可以这样做:每一个修改服务器内容的请求,必须使用一个"
"如何防止这种情况呢?基本思路是:每一个修改服务器内容的请求,必须使用一个"


#: ../../security.rst:142
msgid "Content Security Policy (CSP)"
msgstr ""
msgstr "内容安全策略 (CSP)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "内容安全策略 (CSP)"
msgstr "内容安全策略CSP"

msgstr ""
"下面这些选项可以添加到 ``Set-Cookie`` 头部中以提高安全性。Flask 配置选项可以将这"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"下面这些选项可以添加到 ``Set-Cookie`` 头部中以提高安全性。Flask 配置选项可以将这"
"下面这些选项可以添加到 ``Set-Cookie`` 头部中以提高安全性。Flask 有配置选项可以将这"

msgstr ""
"下面这些选项可以添加到 ``Set-Cookie`` 头部中以提高安全性。Flask 配置选项可以将这"
"些选项设置在会话 cookie 或者其他 cookie 上。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"些选项设置在会话 cookie 或者其他 cookie 上。"
"些设置在会话 cookie 或者其他 cookie 上。"

msgstr ""
"``SameSite`` 限制 cookies 与外部网站的请求一起发送。可设置为 ``’Lax’`` (推荐)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"``SameSite`` 限制 cookies 与外部网站的请求一起发送。可设置为 ``’Lax’`` (推荐)"
"``SameSite`` 限制 cookies 与外部网站的请求一起发送。可设置为 ``’Lax’``(推荐)"

"replay attacks, where intercepted cookies can be sent at a later time. ::"
msgstr ""
"对于会话 cookie,如果设置了 :attr:`session.permanent <flask.session."
"permanent>` ,那么就用 :data:`PERMANENT_SESSION_LIFETIME` 设置到期时间,Flask 的"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"permanent>` ,那么就用 :data:`PERMANENT_SESSION_LIFETIME` 设置到期时间,Flask 的"
"permanent>`,那么就用 :data:`PERMANENT_SESSION_LIFETIME` 设置到期时间,Flask 的"

@kylinbin kylinbin force-pushed the translate-docs-security branch from 146a06e to 47fdff7 Compare June 6, 2022 15:23
@kylinbin
Copy link
Contributor Author

kylinbin commented Jun 6, 2022

@FesonX 「主要是中英文之间空格使用多余,或者括号未使用中文」,确实这两个问题比较多,除了揪出来的,还有几个漏网之鱼,统一改完了,感谢 😄

@FesonX FesonX self-assigned this Jun 7, 2022
@FesonX FesonX removed their assignment Jun 9, 2022
@FesonX
Copy link
Collaborator

FesonX commented Jun 9, 2022

审核完毕 @greyli

@greyli greyli merged commit 849576f into flaskcwg:main Jun 12, 2022
@greyli
Copy link
Member

greyli commented Jun 12, 2022

Merged, thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants