Commit cfc675e
* fix(i18n): unconditional Chinese in the chatbot confirm card and field inspector (#2884, #2885)
Two issues split out of the #2871 survey because neither is a language
*branch* — both render Chinese for every user regardless of locale.
#2884 — the confirm-before-change card. Heading, buttons, hint and the verb
column of each change row were Chinese literals. They now follow the same
prop-with-English-default convention the plan card already uses, with the
console passing translated values from `console.ai.*`.
The serious half was the outbound message: clicking Confirm sent
'确认修改,应用你刚才提议的改动。' unconditionally, so an English user's click
told the agent in Chinese to apply the changes and the agent answered in
Chinese for the rest of the thread. It now routes through the same `convZh`
conversation-language switch as `planApproveMessage`. The Chinese string is
unchanged, so the cloud confirm gate sees byte-for-byte what it already
accepted; `i18n.test.ts` pins it against the mirrored `APPROVAL_RE`.
Also here: the error banner's `Response failed` / `Details` / `Retry` were
hard-coded English, and it and the quota banner used a bare `t(key)` that
renders the raw key with no `I18nProvider` mounted — both now use
`useSafeTranslate`. The `「…」` corner brackets are now neutral quotes.
#2885 — `ObjectFieldInspector` appended a bare `(草稿)` to draft objects in
the lookup picker, the only Chinese literal in a file whose other 101 strings
all go through `t(key, locale)`. It now reads `engine.inspector.draftSuffix`.
The 18 new keys went into all ten locale packs, so the #2872 part (a) gap
held at 469/471 rather than widening. Both new guards were mutation-tested.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TubWYdWquVkS9dj733sDmC
* fix(plugin-chatbot): terminate the changesTitleLabel doc comment
The `*/` was lost in an editing pass, so `changesTitleLabel?: string;` was
swallowed into the comment and never declared on `ChatbotEnhancedProps`.
`tsc --noEmit` in app-shell caught it as "Property 'changesTitleLabel' does
not exist", which failed `@object-ui/app-shell#build` and left the Console
Performance Budget job reporting blank metrics.
The documented default was wrong too — the heading defaults to "Confirm
changes"; only the button was shortened to "Confirm".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TubWYdWquVkS9dj733sDmC
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent fc13718 commit cfc675e
18 files changed
Lines changed: 640 additions & 43 deletions
File tree
- .changeset
- packages
- app-shell/src
- console/ai
- views/metadata-admin
- inspectors
- i18n/src
- __tests__
- locales
- plugin-chatbot/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1596 | 1596 | | |
1597 | 1597 | | |
1598 | 1598 | | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
1599 | 1622 | | |
1600 | 1623 | | |
1601 | 1624 | | |
| |||
2176 | 2199 | | |
2177 | 2200 | | |
2178 | 2201 | | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
2179 | 2210 | | |
2180 | 2211 | | |
2181 | 2212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
| |||
1866 | 1869 | | |
1867 | 1870 | | |
1868 | 1871 | | |
| 1872 | + | |
1869 | 1873 | | |
1870 | 1874 | | |
1871 | 1875 | | |
| |||
Lines changed: 85 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
1479 | 1479 | | |
1480 | 1480 | | |
1481 | 1481 | | |
1482 | | - | |
| 1482 | + | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | 1485 | | |
| |||
1507 | 1507 | | |
1508 | 1508 | | |
1509 | 1509 | | |
1510 | | - | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1511 | 1514 | | |
1512 | 1515 | | |
1513 | 1516 | | |
| |||
1518 | 1521 | | |
1519 | 1522 | | |
1520 | 1523 | | |
1521 | | - | |
| 1524 | + | |
1522 | 1525 | | |
1523 | 1526 | | |
1524 | 1527 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
114 | 132 | | |
115 | 133 | | |
116 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
855 | 872 | | |
856 | 873 | | |
857 | 874 | | |
| |||
1911 | 1928 | | |
1912 | 1929 | | |
1913 | 1930 | | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
1914 | 1938 | | |
1915 | 1939 | | |
1916 | 1940 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
857 | 874 | | |
858 | 875 | | |
859 | 876 | | |
| |||
1913 | 1930 | | |
1914 | 1931 | | |
1915 | 1932 | | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
1916 | 1940 | | |
1917 | 1941 | | |
1918 | 1942 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1490 | 1490 | | |
1491 | 1491 | | |
1492 | 1492 | | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
1493 | 1508 | | |
1494 | 1509 | | |
1495 | 1510 | | |
| |||
2568 | 2583 | | |
2569 | 2584 | | |
2570 | 2585 | | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
2571 | 2593 | | |
2572 | 2594 | | |
2573 | 2595 | | |
| |||
0 commit comments