Skip to content

i18n: Azerbaijani falls back to English on several surfaces; broken plurals and admin section keys #318

Description

@cavidelizade

Follow-up to #32 / the i18n work in #312. The English/Azerbaijani catalogs are in sync key-for-key (2112 each), but several surfaces were migrated by passing an inline English default to t() without ever adding the key to the catalog. That satisfies the lint gate, but it means Azerbaijani silently falls back to English on those screens, and a few keys are wrong.

1. Dynamic-key families missing from the catalog

These prefixes have zero (or partial) keys in locales/en/translation.json and az/translation.json, so they render English in every locale:

  • home.widget.* (WorkspaceHomePage.tsx)
  • notifications.tab.* (NotificationsPage.tsx)
  • pages.tab.* / pages.sort.* (PagesPage.tsx)
  • nav.project.* (Sidebar.tsx)
  • views.filter.datePreset.* (ProjectSavedViewActiveFilters.tsx)
  • editor.slash.* / editor.toolbar.* / editor.colorName.* (page editor)
  • settings.notifications.row.*, settings.estimates.typeOption.*

2. Instance-admin section keys don't match

InstanceAdminLayout.tsx:321-322 looks up instanceAdmin.section.<x>.label and .desc, but the catalog only has the flat instanceAdmin.section.<x> keys (registered in i18n/dynamicKeys.ts). The .label/.desc lookups always miss → the 8 Azerbaijani section translations are dead and never shown.

3. Broken plurals

  • common.time.daysAgo_one and _other are both "{{count}} day ago" → "3 day ago"
  • settings.webhooks.retriesCount_one = "{{count}} retries" → "1 retries"
  • drafts.moduleCount_one = "{{count}} Modules" → "1 Modules"

4. .ts files aren't covered by the gate

The i18next/no-literal-string rule runs mode: jsx-text-only on src/**/*.tsx only, so hardcoded UI strings in .ts modules slip through — e.g. components/work-item/editorSlashCommands.ts ('Heading 1', 'Bullet list', …) and constants/workspace.ts ('Select a range').

Fix

Add the missing key families to both catalogs, align the instance-admin keys (query the flat keys or rename catalog + dynamicKeys.ts to .label/.desc), fix the plural _one/_other variants, and route the .ts display strings through t()/dynamic keys.

I'll open a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions