Skip to content

i18n: extract the chore list and its modals (Part of #145) - #210

Merged
meauxt merged 1 commit into
donetick:developfrom
everysingletear:i18n/chores
Aug 15, 2026
Merged

i18n: extract the chore list and its modals (Part of #145)#210
meauxt merged 1 commit into
donetick:developfrom
everysingletear:i18n/chores

Conversation

@everysingletear

@everysingletear everysingletear commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

i18n: extract the chore list and its modals (chores namespace)

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 chores namespace, so src/i18n/config.js is
untouched. 185 keys added to en/chores.json, 15 to en/common.json
for 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.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.

Note on ordering: six upload.* keys in en/common.json are also added
by the common extraction PR, since files in both zones surface the same
upload 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.

@meauxt

meauxt commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@everysingletear i think we have a conflict on this one

@everysingletear

Copy link
Copy Markdown
Contributor Author

Rebased — it's clean now.

The conflict was in the dictionary only, and it was the one I flagged when I opened this: six upload.* keys were added by both this PR and #209, because files in both zones surface the same upload errors. #209 landed first, so those keys are already on develop and this PR now adds 9 keys to en/common.json instead of 15.

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.

@meauxt

meauxt commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@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.
@everysingletear

Copy link
Copy Markdown
Contributor Author

Both are clean now — GitHub agrees: this one and #155 are MERGEABLE, checks green, and this one still carries your approval.

The conflict was the dictionary again, not the code. Each time one of my PRs lands, the next one in the queue collides on en/chores.json or en/common.json because the merged one already added some of the same keys. No code file in either PR has been touched upstream at any point.

I rebuild these branches from develop rather than resolving the conflict by hand, so the dictionary ends up as your current file plus only the keys the PR's own files actually use — which is also why the diff shrinks a little each round.

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: AVAILABLE_LANGUAGES lists ten languages, but only he and ja have their moment locale imported, so dates and relative times render in English for the other seven regardless of the chosen language.

@meauxt
meauxt merged commit 96ba672 into donetick:develop Aug 15, 2026
2 checks passed
everysingletear added a commit to everysingletear/frontend that referenced this pull request Aug 15, 2026
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.
everysingletear added a commit to everysingletear/frontend that referenced this pull request Aug 15, 2026
…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.
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