trypost/lang/zh/auth.php
Grigory Frolov 0db9e0706d
Visible Terms and Privacy links on the auth screens (#317)
* feat: visible Terms/Privacy links on the auth screens

Social-platform app reviews (TikTok explicitly) require both links to be
reachable from the public site without logging in or opening a menu.

* Cover the legal links with tests and tidy the layout

The links are a compliance artifact an outside reviewer checks, but
nothing asserted they exist. A refactor of this layout could drop the
footer silently and the next platform submission would fail the same
check that prompted the PR. A feature test asserts the shared prop
reaches both guest screens and carries whatever the install configured,
and a browser test asserts the two links actually render to a logged-out
visitor.

Declares legal on SharedData, so the props read through the interface
rather than its index signature and the inline cast goes away.

Adds rel="noopener noreferrer" to both anchors, matching every other
target="_blank" in the codebase, and orders the imports the way eslint
expects so the file lands clean rather than relying on --fix in CI.

Drops the comment explaining why the links are there: that rationale
belongs in the commit and the pull request, and the sibling comments in
this file describe markup rather than justify decisions.

* Reuse the legal sentence the register screen already had

The register screen has shown "By continuing, you agree to our Terms of
Service and Privacy Policy" in production for a long time, translated
into all sixteen locales. Only the login screen was missing it, and the
two URLs were hardcoded inside the translated string, so a self-hosted
install could not point them at its own documents.

So this keeps what already worked and changes only those two things. The
markup moves into one component, which the login screen now renders as
well. The translated sentence keeps its wording and its link labels; only
the href becomes an i18n placeholder that the component fills from
config. That is one line per locale, and no new translation keys.

Reverting the footer out of AuthSplitLayout also stops the links from
appearing on the workspace index and create screens, which reach that
layout too and are seen after login rather than before it.

The sentence no longer hides on a self-hosted install. It was hidden
because it named TryPost's own documents; now that the URLs are
configuration, an install that sets them wants it shown.

A feature test covers the shared prop on both screens and the placeholder
in every locale; a browser test covers the rendered sentence, since the
links are a compliance artifact an outside reviewer checks and nothing
guarded them.

* Let the browser assertions do their own waiting

The test hand-rolled a polling loop in injected JavaScript to wait for
the element to mount, because the project notes say browser assertions do
not wait for SPA paint.

They do. visit() returns a PendingAwaitablePage backed by
AwaitableWebpage, whose __call wraps every method in
Execution::waitForExpectation and retries until the Playwright timeout,
which defaults to five seconds. The plugin even deprecates waitForText in
favour of assertSee for this reason. The loop was re-implementing the
retry that already surrounded each call, less well and with a helper
whose name has to be unique across the whole suite because these are
global functions.

Halves the file and drops the injected script. assertSeeLink also says
more than the old check did: it asserts the labels are links, not just
text that happens to appear.

---------

Co-authored-by: Paulo Castellano <paulo@castellanos.llc>
2026-09-01 18:20:38 -03:00

140 lines
5.5 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => '这些凭据与我们的记录不匹配。',
'password' => '提供的密码不正确。',
'throttle' => '登录尝试次数过多,请在 :seconds 秒后重试。',
'flash' => [
'welcome' => '欢迎使用 TryPost',
'welcome_trial' => '欢迎使用 TryPost你的试用已开始。',
],
'legal' => '继续即表示你同意我们的<a href=":terms_url" target="_blank">服务条款</a>和<a href=":privacy_url" target="_blank">隐私政策</a>。',
'slides' => [
'calendar' => [
'title' => '可视化日历',
'description' => '通过直观的拖放日历,跨所有社交账号规划和安排你的内容。',
],
'scheduling' => [
'title' => '智能排期',
'description' => '在一个地方向 LinkedIn、X、Instagram、TikTok、YouTube 等平台安排发帖。',
],
'media' => [
'title' => '丰富媒体',
'description' => '发布图片、轮播、快拍和 Reels。每个平台都会自动获得合适的格式。',
],
'video' => [
'title' => '视频发布',
'description' => '一次上传视频,即可发布到 TikTok、YouTube Shorts、Instagram Reels 和 Facebook Reels。',
],
'team' => [
'title' => '团队工作区',
'description' => '邀请团队成员、分配角色,并在独立的工作区中管理多个品牌。',
],
'signatures' => [
'title' => '签名',
'description' => '保存可复用的签名(话题标签、链接、落款),一键附加到帖子中。',
],
],
'or_continue_with' => '或使用以下方式继续',
'or_continue_with_email' => '或使用邮箱继续',
'google_login' => '使用 Google 登录',
'google_signup' => '使用 Google 注册',
'github_login' => '使用 GitHub 登录',
'github_signup' => '使用 GitHub 注册',
'github_email_unavailable' => '无法从 GitHub 获取你的邮箱。请将你的 GitHub 邮箱设为公开,或授予邮箱权限后重试。',
'login' => [
'title' => '登录你的账户',
'description' => '请在下方输入你的邮箱和密码以登录',
'page_title' => '登录',
'email' => '邮箱地址',
'password' => '密码',
'show_password' => '显示密码',
'hide_password' => '隐藏密码',
'forgot_password' => '忘记密码?',
'remember_me' => '记住我',
'submit' => '登录',
'no_account' => '还没有账户?',
'sign_up' => '注册',
],
'register' => [
'title' => '你的整个社交日历,尽在一处',
'description' => '创建账户,开始在每个平台上安排发帖。',
'page_title' => '注册',
'signup_with_email' => '使用邮箱注册',
'name' => '姓名',
'name_placeholder' => '全名',
'email' => '邮箱地址',
'password' => '密码',
'show_password' => '显示密码',
'hide_password' => '隐藏密码',
'submit' => '创建账户',
'has_account' => '已经有账户了?',
'log_in' => '登录',
],
'forgot_password' => [
'title' => '忘记密码',
'description' => '输入你的邮箱以接收密码重置链接',
'page_title' => '忘记密码',
'email' => '邮箱地址',
'submit' => '发送密码重置链接',
'return_to' => '或者,返回',
'log_in' => '登录',
],
'reset_password' => [
'title' => '重置密码',
'description' => '请在下方输入你的新密码',
'page_title' => '重置密码',
'email' => '邮箱',
'password' => '密码',
'confirm_password' => '确认密码',
'confirm_placeholder' => '确认密码',
'submit' => '重置密码',
],
'verify_email' => [
'title' => '验证邮箱',
'description' => '请点击我们刚刚发送到你邮箱的链接以验证你的邮箱地址。',
'page_title' => '邮箱验证',
'link_sent' => '新的验证链接已发送至你注册时填写的邮箱地址。',
'resend' => '重新发送验证邮件',
'log_out' => '退出登录',
],
'accept_invite' => [
'page_title' => '接受邀请',
'title' => '你收到了一份邀请!',
'description' => '你被邀请加入 :workspace 工作区。',
'workspace' => '工作区',
'your_role' => '你的角色',
'email' => '邮箱',
'accept' => '接受邀请',
'decline' => '拒绝邀请',
'login_prompt' => '登录或创建账户以接受此邀请。',
'log_in' => '登录',
'create_account' => '创建账户',
'expired_title' => '此邀请已失效',
'expired_description' => '该邀请对应的工作区已被删除。如仍需访问,请向账户所有者索取新邀请。',
'expired_action' => '返回首页',
],
];