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. |
|
Yes, that sounds good. Please feel free to close this and open a new one. Thank you for your flexibility! |
|
Closing this one as agreed — thank you. The replacement is #208, extracted fresh against current Two notes on scope. The extraction is verified mechanically rather than by eye: every value in One thing the extraction surfaced, flagged in the PR as well: I also saw you localized the settings views yourself, so I've dropped that zone from my list. To avoid colliding a third time I'll claim each zone in #145 before starting it rather than after. |
Part of donetick#145. This is the narrowed version of this PR, as announced in donetick#145 and donetick#168. The original diff covered twelve files; six of them were rewritten under me since — the modal unification, donetick#186, and the AddTaskModal autocomplete work. Those hunks no longer applied, which is why GitHub kept showing this as conflicting. Rather than resolve conflicts that aren't really conflicts, this force-push reduces the PR to the seven files that are still untouched on `develop`: AssigneePickerField, AttachmentPickerField, DueDatePickerField, LabelsPickerField, ProjectPickerField, SmartTaskTitleInput, SubTask The rewritten half goes back in the queue behind your work, and I'll re-extract it against the current shape rather than replaying the old diff. Rebased on current `develop`. 16 keys added to `en/chores.json`, 1 to `en/common.json`. English only — no translations, no behaviour change; every t() value is verified to appear character-for-character in the code it replaces.
Part of donetick#145. Narrowed version of this PR, as announced in donetick#145 and donetick#168. The original diff covered twelve files; six were rewritten under me since — the modal unification, donetick#186, and the AddTaskModal autocomplete work. Those hunks no longer applied, which is why this kept showing as conflicting. Rather than resolve conflicts that aren't really conflicts, this reduces the PR to the seven files still untouched on `develop`: AssigneePickerField, AttachmentPickerField, DueDatePickerField, LabelsPickerField, ProjectPickerField, SmartTaskTitleInput, SubTask The rewritten half goes back in the queue behind your work, to be re-extracted against the current shape rather than replayed. Rebased on current `develop`. AttachmentPickerField is re-extracted on top of your z-index refactor (462af85) rather than carried over — my branch predates it and still imported the removed `constants/zIndex`. 16 keys added to `en/chores.json`, 1 to `en/common.json`. English only — no translations, no behaviour change; every t() value is checked to appear character-for-character in the code it replaces (17 call sites).
Part of donetick#145. Narrowed version of this PR, as announced in donetick#145 and donetick#168. The original diff covered twelve files; six were rewritten under me since — the modal unification, donetick#186, and the AddTaskModal autocomplete work. Those hunks no longer applied, which is why this kept showing as conflicting. This reduces the PR to the seven files still untouched on `develop`: AssigneePickerField, AttachmentPickerField, DueDatePickerField, LabelsPickerField, ProjectPickerField, SmartTaskTitleInput, SubTask The rewritten half goes back in the queue behind your work, to be re-extracted against the current shape rather than replayed. Rebased on current `develop`. AttachmentPickerField is re-extracted on top of your z-index refactor (462af85) rather than carried over — my branch predates it and still imported the removed `constants/zIndex`. 15 keys added to `en/chores.json`, 1 to `en/common.json`. English only — no translations, no behaviour change; every t() value is checked to appear character-for-character in the code it replaces (17 call sites).
Part of donetick#145. Narrowed version of this PR, as announced in donetick#145 and donetick#168. The original diff covered twelve files; six were rewritten under me since — the modal unification, donetick#186, and the AddTaskModal autocomplete work. This reduces the PR to the seven files still untouched on `develop`: AssigneePickerField, AttachmentPickerField, DueDatePickerField, LabelsPickerField, ProjectPickerField, SmartTaskTitleInput, SubTask The rewritten half goes back in the queue behind your work, to be re-extracted against the current shape rather than replayed. Rebased on current `develop` after donetick#210 landed — the conflict was in the dictionaries only, and it shrank as a result: 20 keys to `en/chores.json` and 1 to `en/common.json`, since donetick#210 already carried the rest. AttachmentPickerField is re-extracted on top of your z-index refactor (462af85) rather than carried over; my branch predates it and still imported the removed `constants/zIndex`. English only — no translations, no behaviour change; every t() value is checked to appear character-for-character in the code it replaces (23 call sites). Also run through `eslint --rule no-undef`, which is what I should have been doing before donetick#216 and donetick#210 — see donetick#231.
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.