i18n: extract the chore list and its modals (Part of #145) - #210
Conversation
b2f073a to
e62459f
Compare
|
@everysingletear i think we have a conflict on this one |
e62459f to
65c6aed
Compare
|
Rebased — it's clean now. The conflict was in the dictionary only, and it was the one I flagged when I opened this: six No code file in this PR was touched upstream in the meantime, so the diff you approved is unchanged apart from that dictionary shrink. Thank you for merging the other four. |
|
@everysingletear sorry i think there is one more |
Part of donetick#145. Twenty-three files across the task list zone: the list and card views, sorting and grouping, multi-select and its toolbar and help sheet, archived tasks, the assignee card, the chore action menu, the nudge/NFC/photo modals, the rich text editor, the scan panel, the notification templates and the keyboard-shortcut toasts. Extends the existing `chores` namespace, so `src/i18n/config.js` is untouched. English only — no translations, no behaviour change. Every t() value is checked against this branch's base: the string must appear character-for-character in the code it replaces (247 call sites). Two values are matched loosely and worth naming: archived.closeMultiSelect in both the archived view and the toolbar. The base builds that tooltip as `${size === 0 ? 'Close' : 'Clear'} multi-select (Esc)`, so only one branch of the ternary exists contiguously in the source. Both keys hold exactly what each branch renders; the tooltip is kept whole so a translator can reorder it. Rebased on current `develop` again after donetick#215 and donetick#216 landed — the dictionary conflict was theirs, not the code's. No code file in this PR was touched upstream in the meantime.
65c6aed to
7d36090
Compare
|
Both are clean now — GitHub agrees: this one and #155 are The conflict was the dictionary again, not the code. Each time one of my PRs lands, the next one in the queue collides on I rebuild these branches from Two other things I've closed out today, so the queue reflects reality:
#147 (moment locales) is rebased and worth a look when you have a moment: |
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.
…eral
`CHORE_STATUS` is a module-level object literal, and a `useTranslation`
call ended up inside it:
const CHORE_STATUS = {
const { t } = useTranslation('chores')
NO_DUE_DATE: 'No due date',
That is a syntax error, so the file cannot be parsed at all. It does not
break the build because nothing imports `ChoresOverview` — vite never
compiles it — but it breaks eslint, editors, and anything else that walks
the whole tree.
The hook moves into the component, which is where the file's `t()` calls
actually live.
This one arrived with donetick#210, the same way donetick#216 brought the ActivitiesCard
crash: my tooling wrote the hook in mechanically and nothing downstream
parsed the result. Both are now covered by the `no-undef` pass I described
in the other commit — it reports the parse error too.
i18n: extract the chore list and its modals (
choresnamespace)Part of #145.
Twenty-three files across the task list zone: the list and card views,
sorting and grouping, multi-select and its toolbar and help sheet,
archived tasks, the assignee card, the chore action menu, the
nudge/NFC/photo modals, the rich text editor, the scan panel, the
notification templates and the keyboard-shortcut toasts.
Extends the existing
choresnamespace, sosrc/i18n/config.jsisuntouched. 185 keys added to
en/chores.json, 15 toen/common.jsonfor strings that are generic rather than task-specific.
English only — no translations, no behaviour change. Every t() value is
checked against this branch's base: the string must appear
character-for-character in the code it replaces (247 call sites).
Two values are matched loosely and worth naming:
archived.closeMultiSelectin both the archived view and the toolbar.The base builds that tooltip as
${size === 0 ? 'Close' : 'Clear'} multi-select (Esc), so only one branchof the ternary exists contiguously in the source. Both keys hold exactly
what each branch renders; the tooltip is kept whole so a translator can
reorder it.
Note on ordering: six
upload.*keys inen/common.jsonare also addedby the
commonextraction PR, since files in both zones surface the sameupload errors. The key/value pairs are identical, so whichever lands
second needs at most a trivial dictionary rebase. The code files do not
overlap between the two PRs.