Skip to content

i18n: extract task-creation flow strings (Part of #145) - #155

Open
everysingletear wants to merge 8 commits into
donetick:developfrom
everysingletear:i18n/task-creation
Open

i18n: extract task-creation flow strings (Part of #145)#155
everysingletear wants to merge 8 commits into
donetick:developfrom
everysingletear:i18n/task-creation

Conversation

@everysingletear

Copy link
Copy Markdown

Part of #145.

Extracts the hardcoded user-facing strings in the task-creation flow into
the existing i18next setup. This is a language-agnostic extraction PR: it only
adds English keys to public/locales/en/ and wraps the strings in t() — no
new language dictionaries, no behavior changes.

Components migrated

The full "add / create task" surface:

  • AddTaskModal (header, help section, subtasks, description)
  • AssigneePickerField
  • PriorityPickerField
  • LabelsPickerField
  • DueDatePickerField (Today/Tomorrow/Weekend, time-of-day presets)
  • RepeatPickerField (frequency, "repeat every", day-of-month)
  • NotificationPickerField (reminder counts — pluralized)
  • ProjectPickerField
  • AttachmentPickerField (file counts — pluralized)
  • SmartTaskTitleInput
  • SubTask
  • AdvancedOptionsSection (assignment strategies)

Notes

  • New keys live in the chores namespace (plus a few reused generics in
    common), following the existing feature-scoped namespace convention.
  • Count-based strings use i18next v4 plural suffixes (_one / _other) so
    other languages can supply their own plural forms.
  • Generic strings ("Save", "Cancel", "Delete", …) are reused from common
    rather than duplicated.
  • No RTL / layout changes. Build passes.

Testing

  • npm run build — green.
  • Task-creation flow exercised end-to-end; all strings resolve via t() with
    no visible change in English.

Wrap the assignee picker's user-facing strings in t():
- chores:assignee.label ("Assignee")
- chores:assignee.anyone ("Anyone")
- common:unknown ("Unknown" — shared user-name fallback)

Adds the English source keys only; no behavior change.
Wrap the reminder picker in t():
- chores:remind.* — label, title, on-due-date, and pluralized reminder
  count (count_one/count_other)
- relative-time split so translations control word order:
  chores:remind.unit.{minute,hour,day}_* (pluralized units) +
  chores:remind.{before,after} ("{{num}} {{unit}} ...", plain interpolation)
- common:apply / common:removeAll (shared buttons); common:cancel reused

Adds English source keys only; no behavior change.
Wrap the modal title, sentence label, placeholder, footer buttons and the
"task in a sentence" help block in t(). Help list items use plain t() with
the example keywords (P1, tomorrow, daily...) kept as literal <em> — they are
the parser's input tokens, not translatable copy. Adds common:create; reuses
common:cancel.

Partial: strings below the input section remain for a follow-up.
- Priority: reuse chores:priority for the label; add chores:noPriority.
  P1-P4 kept as literal codes.
- Labels: chores:labels.* incl. pluralized count (count_one/other) and
  the "Create label" action.
Wrap trigger/title, quick-date and quick-time labels, and Anytime/Specific
time in t() (chores:duePicker.*; reuse chores:dueDate). Replace the hardcoded
month/weekday abbreviation arrays with moment formatting so the calendar
localizes with the active language.
The @-mention "Anyone" option reuses chores:assignee.anyone. AddTaskModal
now has no remaining hardcoded copy (example keywords stay literal).
Project, Attachment (pluralized file count), SmartTaskTitleInput, SubTask,
AdvancedOptionsSection (assign-strategy options), and RepeatPickerField
(SectionLabel translates via key; frequency/occurrence/unit labels; day and
month names via moment).
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.

1 participant