i18n: extract authorization screen strings (Part of #145) - #168
i18n: extract authorization screen strings (Part of #145)#168everysingletear wants to merge 2 commits into
Conversation
Add an `auth` namespace and register it in the i18n config, then move the login screen off hardcoded English: primary and sub-account tabs, the credential form, social and Authentik buttons, the welcome-back state and every auth error toast. Login is the first screen a non-English user ever sees, so it was the most visible gap left in the coverage. Part of donetick#145
Extend the `auth` namespace to the remaining authorization flows: account creation with its field-validation messages, the password reset request, and the new-password entry screen, including all toasts. Completes the authorization zone — no hardcoded user-facing English is left under src/views/Authorization/ apart from MFA verification, which touches other logic and is better handled separately. Part of donetick#145
|
am sorry i think our work overlap :( did not saw this until today |
Hi — thank you for this project. I came across it some months ago and it has taken a real load of chores off my family; I wanted to give something back. I'd had a long gap between projects and picked internationalisation as the way in. My family isn't comfortable in English, and hardcoding a translation over your strings felt like the disrespectful shortcut — so I did it properly instead: i18next namespaces, extracted locale files under I've worked through most of the app on that pattern. The Authorization PR already open is a representative sample: four files, 75 keys, every string mapping 1:1 to what rendered before, no behaviour change, green build. Here's what I'd propose, if it works for you:
Happy to slow down, change the split, or drop any of it. You know the codebase and its direction far better than I do. P.S. A separate and entirely optional thing: I also spent some time on a more contemporary look for the UI. That's a product decision, not a refactor, so I'm keeping it well away from the i18n PRs — but if you're curious I can post screenshots in a separate issue and you can decide whether it's worth a conversation at all. |
|
that perfect thank you for you help! if you can rebase this one we should be good to go on auth. and for the rest what you mention sounds good! |
|
Thanks — and it turns out a rebase won't do it here, so I'd rather say that plainly than force-push something misleading. This branch extracted the login strings as those screens were before the revamp. That part I don't mind; it's an afternoon, and the key names carry over so nothing is wasted. What gives me pause is that #185 is still open and these screens have been reshaped twice in the past week. Redoing the extraction today stands a fair chance of needing a third pass. So I'd rather leave this one parked and start where your refactors haven't been. I've posted a full audit in #145 — I went through all 129 components on my fork against current If you'd rather I close this PR outright and open a fresh one once the auth screens settle, that's fine too — say which you prefer. |
Part of #145.
Extracts every user-facing string under
src/views/Authorization/into a newauthnamespace. English only — no translations in this PR, so it is language-agnostic and safe to review as a pure refactor.What moves
LoginViewSignupForgotPasswordViewUpdatePasswordViewauthis registered insrc/i18n/config.js;public/locales/en/auth.jsonholds the 75 keys.Why this zone first
Login is the first screen a non-English user ever reaches, and right now it is entirely hardcoded — someone who picks a language in settings still gets an English login screen on their next cold start. It is also self-contained: four files, no shared components, so it does not collide with in-flight work elsewhere.
It should also compose well with the Crowdin setup that just landed on
develop— the config picks up/public/locales/en/*.jsonby glob, so this namespace flows into the translation pipeline with no change tocrowdin.yml.Notes
MFAVerificationModalis deliberately left out — it is entangled with the MFA flow logic and deserves its own pass rather than being smuggled in here.develop; build is green.