trypost/lang/pt-BR/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.8 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' => 'Essas credenciais não correspondem aos nossos registros.',
'password' => 'A senha fornecida está incorreta.',
'throttle' => 'Muitas tentativas de login. Por favor, tente novamente em :seconds segundos.',
'flash' => [
'welcome' => 'Bem-vindo ao TryPost!',
'welcome_trial' => 'Bem-vindo ao TryPost! Seu período de teste começou.',
],
'legal' => 'Ao continuar, você concorda com nossos <a href=":terms_url" target="_blank">Termos de Serviço</a> e <a href=":privacy_url" target="_blank">Política de Privacidade</a>.',
'slides' => [
'calendar' => [
'title' => 'Calendário Visual',
'description' => 'Planeje e agende seu conteúdo com um calendário intuitivo de arrastar e soltar em todas as suas contas sociais.',
],
'scheduling' => [
'title' => 'Agendamento Inteligente',
'description' => 'Agende posts no LinkedIn, X, Instagram, TikTok, YouTube e mais — tudo em um só lugar.',
],
'media' => [
'title' => 'Mídia Rica',
'description' => 'Publique imagens, carrosséis, stories e reels. Cada plataforma recebe o formato correto automaticamente.',
],
'video' => [
'title' => 'Publicação de Vídeo',
'description' => 'Envie vídeos uma vez e publique no TikTok, YouTube Shorts, Instagram Reels e Facebook Reels.',
],
'team' => [
'title' => 'Workspaces em Equipe',
'description' => 'Convide sua equipe, atribua funções e gerencie múltiplas marcas em workspaces separados.',
],
'signatures' => [
'title' => 'Assinaturas',
'description' => 'Salve assinaturas reutilizáveis (hashtags, links, encerramentos) e anexe nos posts com um clique.',
],
],
'or_continue_with' => 'Ou continue com',
'or_continue_with_email' => 'Ou continue com e-mail',
'google_login' => 'Entrar com Google',
'google_signup' => 'Cadastrar com Google',
'github_login' => 'Entrar com GitHub',
'github_signup' => 'Cadastrar com GitHub',
'github_email_unavailable' => 'Não foi possível obter seu e-mail do GitHub. Torne seu e-mail público ou conceda a permissão de e-mail e tente novamente.',
'login' => [
'title' => 'Entrar na sua conta',
'description' => 'Digite seu email e senha abaixo para entrar',
'page_title' => 'Entrar',
'email' => 'Endereço de email',
'password' => 'Senha',
'show_password' => 'Mostrar senha',
'hide_password' => 'Esconder senha',
'forgot_password' => 'Esqueceu a senha?',
'remember_me' => 'Lembrar de mim',
'submit' => 'Entrar',
'no_account' => 'Não tem uma conta?',
'sign_up' => 'Cadastre-se',
],
'register' => [
'title' => 'Todo o seu calendário social num só lugar',
'description' => 'Crie sua conta e comece a agendar posts em todas as redes.',
'page_title' => 'Cadastro',
'signup_with_email' => 'Cadastrar com e-mail',
'name' => 'Nome',
'name_placeholder' => 'Nome completo',
'email' => 'Endereço de email',
'password' => 'Senha',
'show_password' => 'Mostrar senha',
'hide_password' => 'Esconder senha',
'submit' => 'Criar conta',
'has_account' => 'Já tem uma conta?',
'log_in' => 'Entrar',
],
'forgot_password' => [
'title' => 'Esqueceu a senha',
'description' => 'Digite seu email para receber um link de redefinição de senha',
'page_title' => 'Esqueceu a senha',
'email' => 'Endereço de email',
'submit' => 'Enviar link de redefinição',
'return_to' => 'Ou, volte para',
'log_in' => 'entrar',
],
'reset_password' => [
'title' => 'Redefinir senha',
'description' => 'Por favor, digite sua nova senha abaixo',
'page_title' => 'Redefinir senha',
'email' => 'Email',
'password' => 'Senha',
'confirm_password' => 'Confirmar Senha',
'confirm_placeholder' => 'Confirmar senha',
'submit' => 'Redefinir senha',
],
'verify_email' => [
'title' => 'Verificar email',
'description' => 'Por favor, verifique seu endereço de email clicando no link que acabamos de enviar.',
'page_title' => 'Verificação de email',
'link_sent' => 'Um novo link de verificação foi enviado para o endereço de email que você forneceu durante o cadastro.',
'resend' => 'Reenviar email de verificação',
'log_out' => 'Sair',
],
'accept_invite' => [
'page_title' => 'Aceitar Convite',
'title' => 'Você foi convidado!',
'description' => 'Você foi convidado para participar do workspace :workspace.',
'workspace' => 'Workspace',
'your_role' => 'Seu cargo',
'email' => 'Email',
'accept' => 'Aceitar Convite',
'decline' => 'Recusar Convite',
'login_prompt' => 'Entre ou crie uma conta para aceitar este convite.',
'log_in' => 'Entrar',
'create_account' => 'Criar Conta',
'expired_title' => 'Este convite não é mais válido',
'expired_description' => 'O workspace deste convite foi excluído. Peça ao dono da conta um novo convite se ainda precisar de acesso.',
'expired_action' => 'Ir para o início',
],
];