Skip to content

i18n: extract Authorization screens into a new auth namespace (Part of #145) - #208

Merged
meauxt merged 1 commit into
donetick:developfrom
everysingletear:i18n/auth-v2
Aug 13, 2026
Merged

i18n: extract Authorization screens into a new auth namespace (Part of #145)#208
meauxt merged 1 commit into
donetick:developfrom
everysingletear:i18n/auth-v2

Conversation

@everysingletear

Copy link
Copy Markdown
Contributor

Part of #145. Replaces #168, which was extracted against the pre-revamp screens and could not be rebased — the zone had been reshaped enough that the old hunks had nothing left to apply to. This is a fresh extraction against current develop.

Every user-facing string under src/views/Authorization/ moves into a new auth namespace. English only — no translations here, so it is language-agnostic and reviewable as a pure refactor.

What moves

Screen Covered
LoginView primary/sub-account tabs, credential form, social and Authentik buttons, welcome-back state, every auth error toast
Signup account creation form and each field-validation message
ForgotPasswordView reset request flow and its toasts
UpdatePasswordView new-password entry, including mismatch and length errors
Authenticating the OAuth landing screen and its MFA branches
MFAVerificationModal code entry, backup codes, error states
AuthFields / LoginSettings shared field labels and the server settings panel

auth is registered in src/i18n/config.js; public/locales/en/auth.json holds the 103 keys. Your Crowdin config picks up /public/locales/en/*.json by glob, so the namespace flows into the pipeline with no change to crowdin.yml.

On "no behaviour change"

Every t() value is the string that rendered before, character for character — checked mechanically against this branch's base rather than by eye, across all 130 call sites.

The e2e suite is a second, independent check: it selects auth controls by visible text (getByRole('button', { name: 'Create account' }), getByText('Username must be at least 4 characters')), so a green auth.spec.js means nothing rendered differently.

The one place the diff isn't purely mechanical

AuthPasswordField had label = 'Password' as a prop default, and neither LoginView nor Signup passed a label. A prop default is evaluated at module scope, where t isn't available, so the label moves to the call sites and both now pass it explicitly. Same rendered output; flagging it because it is the only structural change in the diff.

AuthDivider had children = 'or' for the same reason — it now falls back to t('or') when no children are given.

Scope notes

MFAVerificationModal is included this time. I left it out of #168 because it looked entangled with the MFA flow; on a second read it isn't — the diff there is string replacement only. Authenticating.jsx is included for a similar reason: it sits in the same zone, and leaving it hardcoded would only have meant a follow-up round.

Rebased on current develop; build is green.

Every user-facing string under src/views/Authorization/ moves to i18next.
English only — no translations in this PR, so it is language-agnostic and
reviewable as a pure refactor.

Covered:
- LoginView — primary/sub-account tabs, credential form, social and
  Authentik buttons, welcome-back state, every auth error toast
- Signup — account creation form and each field-validation message
- ForgotPasswordView / UpdatePasswordView — reset flow and its toasts
- Authenticating — the OAuth landing screen, including its MFA branches
- MFAVerificationModal — code entry, backup codes, error states
- AuthFields / LoginSettings — shared field labels and server settings

`auth` is registered in src/i18n/config.js; public/locales/en/auth.json
holds the 103 keys. The Crowdin config picks up /public/locales/en/*.json
by glob, so the namespace flows into the pipeline with no change to
crowdin.yml.

No behaviour change: every t() value is the string that rendered before,
character for character — checked mechanically against this branch's base.
The e2e suite selects auth controls by visible text ('Create account',
'Username must be at least 4 characters'), so a green run is the proof.

Two fixes fell out of the extraction:
- AuthPasswordField had label='Password' as a prop default, so neither
  LoginView nor Signup passed one. A default cannot be translated at module
  scope, so the label moves to the call sites and both now pass it.
- AuthDivider defaulted children to 'or' for the same reason; it now falls
  back to t('or').

@meauxt meauxt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@everysingletear Thank you <3

@meauxt
meauxt merged commit 323ffe7 into donetick:develop Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants