trypost/lang/en/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.6 KiB
PHP

<?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' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
'flash' => [
'welcome' => 'Welcome to TryPost!',
'welcome_trial' => 'Welcome to TryPost! Your trial has started.',
],
'legal' => 'By continuing, you agree to our <a href=":terms_url" target="_blank">Terms of Service</a> and <a href=":privacy_url" target="_blank">Privacy Policy</a>.',
'slides' => [
'calendar' => [
'title' => 'Visual Calendar',
'description' => 'Plan and schedule your content with an intuitive drag-and-drop calendar across all your social accounts.',
],
'scheduling' => [
'title' => 'Smart Scheduling',
'description' => 'Schedule posts across LinkedIn, X, Instagram, TikTok, YouTube, and more — all from one place.',
],
'media' => [
'title' => 'Rich Media',
'description' => 'Publish images, carousels, stories, and reels. Each platform gets the right format automatically.',
],
'video' => [
'title' => 'Video Publishing',
'description' => 'Upload videos once and publish to TikTok, YouTube Shorts, Instagram Reels, and Facebook Reels.',
],
'team' => [
'title' => 'Team Workspaces',
'description' => 'Invite your team, assign roles, and manage multiple brands from separate workspaces.',
],
'signatures' => [
'title' => 'Signatures',
'description' => 'Save reusable signatures (hashtags, links, signoffs) and append them to posts with one click.',
],
],
'or_continue_with' => 'Or continue with',
'or_continue_with_email' => 'Or continue with email',
'google_login' => 'Log in with Google',
'google_signup' => 'Sign up with Google',
'github_login' => 'Log in with GitHub',
'github_signup' => 'Sign up with GitHub',
'github_email_unavailable' => 'Unable to retrieve your email from GitHub. Make your GitHub email public or grant the email scope, then try again.',
'login' => [
'title' => 'Log in to your account',
'description' => 'Enter your email and password below to log in',
'page_title' => 'Log in',
'email' => 'Email address',
'password' => 'Password',
'show_password' => 'Show password',
'hide_password' => 'Hide password',
'forgot_password' => 'Forgot password?',
'remember_me' => 'Remember me',
'submit' => 'Log in',
'no_account' => "Don't have an account?",
'sign_up' => 'Sign up',
],
'register' => [
'title' => 'Your whole social calendar, in one place',
'description' => 'Create your account and start scheduling posts across every network.',
'page_title' => 'Register',
'signup_with_email' => 'Sign up with email',
'name' => 'Name',
'name_placeholder' => 'Full name',
'email' => 'Email address',
'password' => 'Password',
'show_password' => 'Show password',
'hide_password' => 'Hide password',
'submit' => 'Create account',
'has_account' => 'Already have an account?',
'log_in' => 'Log in',
],
'forgot_password' => [
'title' => 'Forgot password',
'description' => 'Enter your email to receive a password reset link',
'page_title' => 'Forgot password',
'email' => 'Email address',
'submit' => 'Email password reset link',
'return_to' => 'Or, return to',
'log_in' => 'log in',
],
'reset_password' => [
'title' => 'Reset password',
'description' => 'Please enter your new password below',
'page_title' => 'Reset password',
'email' => 'Email',
'password' => 'Password',
'confirm_password' => 'Confirm Password',
'confirm_placeholder' => 'Confirm password',
'submit' => 'Reset password',
],
'verify_email' => [
'title' => 'Verify email',
'description' => 'Please verify your email address by clicking on the link we just emailed to you.',
'page_title' => 'Email verification',
'link_sent' => 'A new verification link has been sent to the email address you provided during registration.',
'resend' => 'Resend verification email',
'log_out' => 'Log out',
],
'accept_invite' => [
'page_title' => 'Accept Invite',
'title' => "You've been invited!",
'description' => "You've been invited to join the :workspace workspace.",
'workspace' => 'Workspace',
'your_role' => 'Your role',
'email' => 'Email',
'accept' => 'Accept Invite',
'decline' => 'Decline Invite',
'login_prompt' => 'Log in or create an account to accept this invite.',
'log_in' => 'Log in',
'create_account' => 'Create Account',
'expired_title' => 'This invite is no longer valid',
'expired_description' => 'The workspace for this invite was deleted. Ask the account owner for a new invite if you still need access.',
'expired_action' => 'Go to home',
],
];