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
AiPendingActionsInbox.formatRelative is a fifth untranslated copy of the same relative-time helper — the keys it needs are already in all ten packs #7173
Found while implementing #7163 (PR #7172), which converted the plugin-detail copies. Filed rather than swept in: packages/plugin-chatbot/ is outside that card's declared lane.
Measured on origin/main head d8ec8d6d4
packages/plugin-chatbot/src/AiPendingActionsInbox.tsx:117-131 holds its own relative-time helper, returning hardcoded English:
if (sec < 45) return 'just now';
const min = Math.round(sec / 60);
if (min < 60) return `${min}m ago`;
const hr = Math.round(min / 60);
if (hr < 24) return `${hr}h ago`;
const day = Math.round(hr / 24);
if (day < 30) return `${day}d ago`;
So a zh/ja/ar session reading the AI pending-actions inbox gets English relative times on every row.
Why this is filed separately rather than as "one more of the same"
It is the fifth spelling of this helper in the repo, and the variants are not interchangeable — worth knowing before anyone tries to unify them:
The rounding and threshold differences are real behaviour differences, not drift to be normalised away without a decision.
The keys already exist — no new pack rows needed for the four branches
detail.justNow, detail.minutesAgo ({{count}}m ago), detail.hoursAgo, detail.daysAgo are present and translated in all ten packs. Verified by reading the pack OBJECTS, not a dotted-key grep — the packs are nested, so a grep for detail.justNow returns a false zero against the en pack that defines it. Positive controls detail.back / detail.noActivity = 10/10; negative control detail.zzzAbsentControl7163 = 0/10.
Whether this component should reach for detail.* keys from plugin-chatbot, or get its own namespaced rows, is the one open question here — it is a namespace decision, not a mechanical one.
Scope note for whoever takes it
AiPendingActionsInbox.tsx has essentially no translation wiring of its own (2 incidental matches, neither a t() call), though the package does use the hooks elsewhere (ChatbotEnhanced.tsx imports useObjectTranslation and useSafeTranslate; FloatingChatbotTrigger.tsx uses useObjectTranslation).
That makes it the unwired-component shape, not the lookup-swap shape. #7142 wired a single string into an otherwise untranslated component and shipped something visibly half-done; #7149 is what finishing that afterwards cost. Sweep the file whole or leave it — the same ruling #7163 was given.
Evidence bar
An en-only test is green before the fix too — each key's en value is byte-identical to the literal it would replace — so English cannot discriminate a pack lookup from a hardcoded string. Assert in zh/ar, and assert the provider-less path separately (it must yield English from the defaults map, never a raw key, and must interpolate {{count}}).
Found while implementing #7163 (PR #7172), which converted the
plugin-detailcopies. Filed rather than swept in:packages/plugin-chatbot/is outside that card's declared lane.Measured on
origin/mainheadd8ec8d6d4packages/plugin-chatbot/src/AiPendingActionsInbox.tsx:117-131holds its own relative-time helper, returning hardcoded English:So a zh/ja/ar session reading the AI pending-actions inbox gets English relative times on every row.
Why this is filed separately rather than as "one more of the same"
It is the fifth spelling of this helper in the repo, and the variants are not interchangeable — worth knowing before anyone tries to unify them:
ActivityTimeline/RecordComments(bothplugin-detail, both translated as of PR fix(plugin-detail,i18n): RecordComments and PointInTimeRestore resolve their copy from the packs #7172):Math.floor, breaks at 1/60/24/7, tailtoLocaleDateString().PointInTimeRestore(plugin-detail, translated as of PR fix(plugin-detail,i18n): RecordComments and PointInTimeRestore resolve their copy from the packs #7172):Math.floor, no days branch, tailtoLocaleString().RecordMetaFooter(plugin-detail, already translated):Math.floorover seconds, clamps future timestamps tojust now, unbounded days.Math.round(not floor), thresholds45s/30d(not 60s / 7d), tailtoLocaleDateString().The rounding and threshold differences are real behaviour differences, not drift to be normalised away without a decision.
The keys already exist — no new pack rows needed for the four branches
detail.justNow,detail.minutesAgo({{count}}m ago),detail.hoursAgo,detail.daysAgoare present and translated in all ten packs. Verified by reading the pack OBJECTS, not a dotted-key grep — the packs are nested, so a grep fordetail.justNowreturns a false zero against theenpack that defines it. Positive controlsdetail.back/detail.noActivity= 10/10; negative controldetail.zzzAbsentControl7163= 0/10.Whether this component should reach for
detail.*keys fromplugin-chatbot, or get its own namespaced rows, is the one open question here — it is a namespace decision, not a mechanical one.Scope note for whoever takes it
AiPendingActionsInbox.tsxhas essentially no translation wiring of its own (2 incidental matches, neither at()call), though the package does use the hooks elsewhere (ChatbotEnhanced.tsximportsuseObjectTranslationanduseSafeTranslate;FloatingChatbotTrigger.tsxusesuseObjectTranslation).That makes it the unwired-component shape, not the lookup-swap shape. #7142 wired a single string into an otherwise untranslated component and shipped something visibly half-done; #7149 is what finishing that afterwards cost. Sweep the file whole or leave it — the same ruling #7163 was given.
Evidence bar
An
en-only test is green before the fix too — each key'senvalue is byte-identical to the literal it would replace — so English cannot discriminate a pack lookup from a hardcoded string. Assert in zh/ar, and assert the provider-less path separately (it must yield English from the defaults map, never a raw key, and must interpolate{{count}}).Never an inline
defaultValue(#3517).