trypost/lang/uk/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
7.9 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' => 'Публікуйте зображення, каруселі, stories та reels. Кожна платформа автоматично отримує правильний формат.',
],
'video' => [
'title' => 'Публікація відео',
'description' => 'Завантажуйте відео один раз і публікуйте в TikTok, YouTube Shorts, Instagram Reels та Facebook Reels.',
],
'team' => [
'title' => 'Командні робочі простори',
'description' => 'Запрошуйте команду, призначайте ролі та керуйте кількома брендами в окремих робочих просторах.',
],
'signatures' => [
'title' => 'Підписи',
'description' => 'Зберігайте багаторазові підписи (хештеги, посилання, підписи) і додавайте їх до постів одним кліком.',
],
],
'or_continue_with' => 'Або продовжити через',
'or_continue_with_email' => 'Або продовжити через email',
'google_login' => 'Увійти через Google',
'google_signup' => 'Зареєструватися через Google',
'github_login' => 'Увійти через GitHub',
'github_signup' => 'Зареєструватися через GitHub',
'github_email_unavailable' => 'Не вдалося отримати ваш email з GitHub. Зробіть email публічним або надайте доступ до email, потім спробуйте ще раз.',
'login' => [
'title' => 'Увійдіть до облікового запису',
'description' => 'Введіть email і пароль нижче, щоб увійти',
'page_title' => 'Вхід',
'email' => 'Адреса email',
'password' => 'Пароль',
'show_password' => 'Показати пароль',
'hide_password' => 'Приховати пароль',
'forgot_password' => 'Забули пароль?',
'remember_me' => 'Запам’ятати мене',
'submit' => 'Увійти',
'no_account' => 'Немає облікового запису?',
'sign_up' => 'Зареєструватися',
],
'register' => [
'title' => 'Увесь ваш соціальний календар в одному місці',
'description' => 'Створіть обліковий запис і почніть планувати пости в усіх мережах.',
'page_title' => 'Реєстрація',
'signup_with_email' => 'Зареєструватися через email',
'name' => 'Ім’я',
'name_placeholder' => 'Повне ім’я',
'email' => 'Адреса email',
'password' => 'Пароль',
'show_password' => 'Показати пароль',
'hide_password' => 'Приховати пароль',
'submit' => 'Створити обліковий запис',
'has_account' => 'Уже маєте обліковий запис?',
'log_in' => 'Увійти',
],
'forgot_password' => [
'title' => 'Забули пароль',
'description' => 'Введіть email, щоб отримати посилання для скидання пароля',
'page_title' => 'Забули пароль',
'email' => 'Адреса email',
'submit' => 'Надіслати посилання для скидання',
'return_to' => 'Або повернутися до',
'log_in' => 'входу',
],
'reset_password' => [
'title' => 'Скинути пароль',
'description' => 'Введіть новий пароль нижче',
'page_title' => 'Скинути пароль',
'email' => 'Email',
'password' => 'Пароль',
'confirm_password' => 'Підтвердіть пароль',
'confirm_placeholder' => 'Підтвердіть пароль',
'submit' => 'Скинути пароль',
],
'verify_email' => [
'title' => 'Підтвердіть email',
'description' => 'Підтвердіть адресу email, натиснувши на посилання, яке ми щойно надіслали.',
'page_title' => 'Підтвердження email',
'link_sent' => 'Нове посилання для підтвердження надіслано на email, який ви вказали під час реєстрації.',
'resend' => 'Надіслати лист підтвердження ще раз',
'log_out' => 'Вийти',
],
'accept_invite' => [
'page_title' => 'Прийняти запрошення',
'title' => 'Вас запросили!',
'description' => 'Вас запросили приєднатися до робочого простору :workspace.',
'workspace' => 'Робочий простір',
'your_role' => 'Ваша роль',
'email' => 'Email',
'accept' => 'Прийняти запрошення',
'decline' => 'Відхилити запрошення',
'login_prompt' => 'Увійдіть або створіть обліковий запис, щоб прийняти це запрошення.',
'log_in' => 'Увійти',
'create_account' => 'Створити обліковий запис',
'expired_title' => 'Це запрошення більше не дійсне',
'expired_description' => 'Робочий простір для цього запрошення було видалено. Попросіть власника облікового запису надіслати нове запрошення, якщо вам ще потрібен доступ.',
'expired_action' => 'На головну',
],
];