You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(i18n): expand coverage and harden locale handling (follow-up to #1765) (#1766)
Resolve outstanding translation gaps and PR-review findings on top of the
initial i18n landing.
Locale infrastructure
- Add LocaleContext/LocaleProvider so language changes from the dropdown
apply immediately without a page refresh.
- Memoize the provider's context value (useMemo + useCallback) and reset
the explicit-locale flag when user.id changes so cookie/navigator
fallbacks are not permanently shadowed.
- Wire date-fns locale helpers through useDateFnsLocale across history,
command, server-stat, and report components.
Translation completeness
- Translate every remaining English string surfaced in the bug reports:
homepage, dashboard, dashboard/appeals, player pages, notifications,
account/email, account/password, and the entire admin panel
(servers, roles, webhooks, notification rules, documents, etc.).
- Add German messages for ~470 new keys and keep en.json/de.json at
full key parity (562 keys each).
Translatability quality
- Replace sentence-splitting with single rich-text ICU keys that embed
React components (<actor>, <punisher>, <player>, <badge>, <path>,
<docs>) for the report header, appeal description, comment timestamps,
punishment update messages, and push-notification setup steps.
- Use ICU select for permanent vs. temporary appeal grammar and ICU
plural for player counts (active/past bans, mutes, warnings, notes,
kicks, report records).
- Collapse concatenated page titles for account/email, account/password,
and admin/servers/[id] into single parameterized keys.
- Standardize on common.permanent (drop duplicate pages.punishment.permanent)
and rename actions.warn -> actions.warning to match the GraphQL type.
Bug fixes
- Fix t.rich rendering in PushNotificationButton by using rich-text tag
syntax and a chunks-based render function instead of a placeholder.
- Drop the default-arg t() call in CommentWithUpload so t() is only
invoked when no placeholder prop is supplied.
- Restore unrelated comments accidentally removed from ServerForm.
Backend
- Localize adminNavigation labels via the resolver and expose the
locale on User type for client-side reconciliation.
0 commit comments