Repository navigation
chore(i18n): move to General Translation v12 and drop the four GT patches - #46460
Merged
Merged
Conversation
chenxin-yan
force-pushed
the
chore/gt-samsara
branch
from
December 1, 2026 05:44
c4cdb13 to
7f9ebd8
Compare
Contributor
|
This PR conflicts with See the conflict window. |
chenxin-yan
force-pushed
the
chore/gt-samsara
branch
2 times, most recently
from
December 1, 2026 08:40
378a059 to
7383952
Compare
This was referenced Dec 1, 2026
Merged
chenxin-yan
added a commit
to generaltranslation/gt
that referenced
this pull request
Dec 1, 2026
…components (#3076) ## Summary `getCurrentMessages()` gives code outside components an `m` for the locale on screen, but nothing says when that answer changes. Text such code already produced, such as a document title or a terminal's accessible names, stays in the old language until the app builds its own notifier. T3 Code's web app carries one: ```tsx // apps/web/src/i18n/I18nProvider.tsx, in pingdotgg/t3code#46460 function ActiveMessages() { const messages = useMessages(); // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- titles and labels set outside React re-read m() when GT shows another language; … useLayoutEffect(notifyMessagesChanged, [messages]); return null; } ``` `onCurrentMessagesChange()` is the other half of the getter: ```ts import { getCurrentMessages, mFallback, onCurrentMessagesChange } from 'gt-react'; const stop = onCurrentMessagesChange(() => { document.title = (getCurrentMessages() ?? mFallback)(title); }); ``` ```diff <PublishConditions/> (first child of the outermost provider) useLayoutEffect publishConditions(conditions) published.push(conditions) + Promise.resolve().then(() => tellListeners(true)) cleanup published.splice(...) + Promise.resolve().then(() => tellListeners(true)) +tellListeners(ofChange) + current = readPublishedConditions() + if ofChange and current is what listeners were last told of: return + for each listener in a copy of the Set, if it is still in the Set: + try listener() catch → console.error(error) initializeGTForTesting() (the testing entries' initializeGT) set the config, cache and condition store + tellListeners() ``` - **When it runs:** after each change of what `getCurrentMessages()` returns. That is a provider mounting or unmounting, showing another locale, publishing the translations it has loaded, or being hidden or shown again by Suspense. A translation that only reaches the cache, such as one a nested provider holds or a split translations file that arrives late (#2968), does not run it; the changeset and JSDoc say so. - **Once per change:** a change of locale releases one set of conditions and publishes the next in the same commit. Listeners are told in a microtask after it, and only when the answer differs from the last one they were told of, so they never see the `undefined` in between. Commits made before that microtask runs are told of once, with the latest answer, so a change one of them undoes may not reach them. A listener added after a publish but before its microtask, which may have read an answer the others were not told of, resets what was told, so the next round reaches it even if the answer changes back. A listener that renews itself inside a round reads what was just told and resets nothing. - **Timing:** after the commit that shows the change, before the browser paints it. - **A listener that throws:** it is logged with `console.error` and the rest still run. The provider's commit is not affected. - **A listener that was stopped:** one that an earlier listener stops in the same round is not called. - **A listener that starts listening again while it runs:** it is called once. The round goes over a copy of the listeners, so it cannot come back to one and keep the browser from painting. - **No `queueMicrotask`:** the notification is queued with a promise, as `oncePerTask()` already does, so a provider still mounts in a browser without it and fake timers do not hold it. - **Each registration:** a listener is wrapped when it is added, so stopping one registration of a function leaves its others listening. - **Where it is exported:** `gt-react` and `gt-react-native` (parity), their `testing` entries, and gt-react's `react-server` entry. - **Testing entries:** no provider mounts there, so their `initializeGT()` tells the same listeners, which is what changes what their `getCurrentMessages()` returns. There is one set of listeners, held globally, so a setup file loaded as CommonJS reaches a listener added from an ES module. The `react-server` entry exports a no-op that keeps no listener, so `initializeGTForTesting()` in the same process cannot reach a server listener. - **External store:** `useSyncExternalStore(onCurrentMessagesChange, getCurrentMessages, () => undefined)` lets a component outside the provider follow the language on screen. The third argument is what a server render and hydration read. A component that follows it and renders the provider itself has to pass the same `translations` object each time: a new literal publishes a new answer, renders the component again, and React stops with "Maximum update depth exceeded" (reproduced). The changeset says so. ## Evidence - **Before:** the new cases in `packages/react/src/provider/__tests__/GTProvider.test.tsx` fail with `TypeError: onCurrentMessagesChange is not a function`. **After:** `gt-react` 257 passed, `@generaltranslation/react-core` 209 passed, `gt-react-native` 40 passed. - The first case mounts a self-loading provider, changes locale and unmounts, and reads `getCurrentMessages()?.('Save')` in the listener: `['Save', 'Speichern', 'Enregistrer', undefined]`. `Save` is the source while the provider shows its fallback. - The existing Suspense case now also listens: `['Speichern', 'Enregistrer', 'Speichern']` as the German provider is hidden and shown again. - Review round 1 added four cases, each failing first: - a component on `useSyncExternalStore(testing.onCurrentMessagesChange, testing.getCurrentMessages)` kept its Russian text after `initializeGT()` set the testing entry back to English: `expected [ 'Закрыть Ada', 'Закрыть Ada' ] to deeply equal [ 'Закрыть Ada', 'Close Ada' ]`; - a listener that throws: `expected "error" to be called 1 times, but got 0 times`; - a listener stopped by an earlier one: `expected "spy" to not be called at all, but actually been called 1 times`; - `publishConditions()` with `queueMicrotask` undefined: `queueMicrotask is not a function`. This one is a unit test in react-core, because React's own test queue needs `queueMicrotask`. - Review round 2 added three more, each failing first: - a listener that stops and listens again inside its own call: `expected [ 'fr', 'fr', 'fr', 'fr', 'fr' ] to deeply equal [ 'fr' ]`; - a testing listener that throws: `initializeGT()` threw `listener failed` and the next listener was not called; - a listener added through one copy of `gt-react/testing` and `initializeGT()` called on another (`vi.resetModules()`): `expected "spy" to be called 1 times, but got 0 times`. - Without the "already told" check, the first case fails: `expected [ 'Save', 'Speichern', …(4) ] to deeply equal [ 'Save', 'Speichern', …(2) ]` (run with a temporary edit, not committed). - Review round 3 added two cases and tightened one, each failing first: - one function added twice and one registration stopped: `expected "spy" to be called 1 times, but got 0 times`; - a listener added between a publish and its release: `expected 'fr' to be undefined`; - the package test under `--conditions=react-server` now adds a listener, calls `initializeGTForTesting()` and counts calls outside the listener: `heard` was 1 against the old entry. Before, its `assert.fail` sat inside a listener that was stopped at once, and the listener guard would have swallowed it. - Review round 4 extended the self-renewal case through a change of locale, with a second listener that stays: `expected [ 'fr', 'fr' ] to deeply equal [ 'fr' ]` before the reset was limited to a listener that read an answer not yet told. - Gates: `turbo build typecheck test` passes apart from `gt-next#test`, which fails at the local Rust link step only; its 992 JS tests pass. `pnpm lint`, `pnpm format`, `pnpm check:export-owners`, `pnpm check:reexports` and `pnpm size` exit 0. ## Merge Danger **Door:** two-way A new export. Nothing existing changes behaviour: a provider with no listener queues one microtask per publish and release, which reads the published list and returns. **Blast Radius:** bundle size - `gt-react { initializeGTSPA, GTProvider, useGT }` goes from 29.99 kB to 30.1 kB (30,101 B), so this raises its limit in `.size-limit.cjs` from 30 kB to 30.2 kB. Wrapping each registration put it 1 B over 30.1 kB. The provider has to queue the notification and guard each listener, so the cost cannot move out of that entry. A thrown error is logged as it is, without a GT diagnostic around it: the diagnostic measured 30.19 kB. - In the `testing` entries the function runs after `initializeGT()`, not after a change made through the condition store, such as `createOrUpdateBrowserConditionStore({ locale })`. The changeset and the JSDoc of the testing `initializeGT()` say so.
chenxin-yan
added a commit
to generaltranslation/gt
that referenced
this pull request
Dec 1, 2026
…3079) ## Summary The plugin read the compiled files of dependencies as well as the app's own. When a JSX call's element type is not a name, it reported invalid GT usage and failed the build: ```js // node_modules/@tanstack/react-router/dist/esm/Matches.js const inner = /* @__PURE__ */ jsxs((isServer ?? router.isServer) || … ? SafeFragment : React$1.Suspense, { ``` ``` [gt-compiler] ERROR: React invocation first argument must be a function …/@tanstack/react-router/dist/esm/Matches.js:22:31 InvalidLibraryUsageError: [gt-compiler] Encountered invalid library usage. ``` Two changes, the first added in review round 1: ```diff transformInclude(id) + a dependency → false // under node_modules, and still under it once links are resolved .tsx / .jsx / .ts / .js → true handleReactInvocation(call) // collection and injection - no arguments → error - first argument a spread → error - type is not a name → error + type is not a name → return // not a GT component type is not a GT import → return ``` - **The plugin reads what `gt generate` reads: the app's own source.** The CLI's default `src` holds no dependency, and it stops following an import at `node_modules` (`followHelpers.ts`), so a dependency's text is in no catalog. Wrapping it with `enableAutoJsxInjection`, or hashing it, found no translation. - **This is the default elsewhere too.** React Compiler compiles a file only if its path has no `node_modules` (`sources`), `@vitejs/plugin-react` excludes `/node_modules/`, and `gt-tanstack-start` already skipped them for its users. - **A workspace package is always read.** With `preserveSymlinks` the bundler leaves it under `node_modules`, where it is a link, so the path is resolved before it counts as a dependency. - **A dependency that uses GT still works:** its `<T>` and `t` calls are hashed in the browser, as without the plugin. - **An element type that is not a name is not a GT component,** which is always used by name. This still matters for the app's own files when a JSX transform has run before the plugin. ## Evidence - **Before:** the two cases in `an element whose type is not a name` fail: `[gt-compiler] Encountered invalid library usage.` and, for the dependency, `expected true to be false`. **After:** `@generaltranslation/compiler` 1054 passed. The `<T>` beside the unnamed element in the same file is hashed. - **Review round 1:** with `enableAutoJsxInjection`, text beside such an element in a dependency (`jsxs('div', { children: ['Status: ', jsx(ok ? Ready : Pending, {})] })`) still failed the build, because the insertion pass wrapped both and collection then rejected the element. The plugin no longer reads that file. - **Review round 3:** a workspace package linked into `app/node_modules/ui` was taken for a dependency; a test builds that layout with a real link. That round also tried reading a dependency whenever its code names a GT package. Round 4 showed why not: the list of names has to repeat what each pass follows, a comment naming `gt-react` is enough to match, and with `enableAutoJsxInjection` such a file brings back the build failure this PR is about. The rule is one line again. - T3 Code's web app (pingdotgg/t3code#46460) depends on `@tanstack/react-router` 1.170.10. Its production build with the plugin logged this error 4 times, for `Match.js:78`, `Match.js:167`, `Match.js:241` and `Matches.js:22`, and failed. With this PR those are gone; the build passes at the top of this stack. ## Merge Danger **Door:** two-way **Blast Radius:** dependencies - A package under `node_modules` that uses GT no longer gets build-time hashes or build checks. Its messages are hashed in the browser, as they are without the plugin. - With `experimentalSplitTranslations`, such a message is read from the unsplit file. If the app's own code compiles the same message, it lives in that chunk's file instead and the dependency shows the source text until that chunk loads. This is the limit split translations already state for call sites hashed in the browser. - With `experimentalSplitTranslations`, an app whose `initializeGTSPA` call lives in an installed package is not started by the build. The build says so ("did not find the initializeGTSPA that starts the app", which now names an installed package among the causes), as it does for a namespace import or a re-export. With `minifyHashes` on top, that app renders the source text; that is the case for every cause of this warning and is noted on #3082. - No `include` option to opt a dependency in: nobody has asked, and `gt generate` would need its `src` pointed at the same files. - Three error messages are removed. None of them described a use of GT.
chenxin-yan
added a commit
to generaltranslation/gt
that referenced
this pull request
Dec 1, 2026
…React Compiler (#3080) ## Summary Fixes #3073. In a Vite build the plugin ran after React Compiler, which moves the children of an element into variables. A valid `<T>` then looked like one holding dynamic content, and the build failed: ``` [gt-compiler] ERROR: The <T> component cannot contain any dynamic content. Wrap the "t1" variable in a <Var> component. src/Journey.tsx:27:3 InvalidLibraryUsageError: [gt-compiler] Encountered invalid library usage. ``` The plugin's transform now asks to run first, so it reads each file as it was written. The two PRs below this one let it hash, check and wrap a file that still holds JSX. ```diff gtUnplugin - transform(code, id) { … } + transform: { order: 'pre', handler(code, id) { … } } // Vite, Rollup: first, wherever the plugin is listed + enforce: 'pre' // webpack, rspack: a pre-loader transform(code, id) + file imports `c` from react/compiler-runtime? // another plugin ran React Compiler first + skip the JSX passes, warn once ``` - **Order no longer depends on the `plugins` array.** A hook with `order: 'pre'` runs before every transform without one, including the one `@vitejs/plugin-react` runs React Compiler in. - **When React Compiler does run first,** as an earlier plugin of a Rollup build can, the build no longer fails. In such a file each `<T>` is hashed in the browser and not checked, and text that `enableAutoJsxInjection` would wrap is left untranslated. The plugin says so once, naming the file and the fix. Both runtime entries are recognised: `react/compiler-runtime` (React 19) and `react-compiler-runtime` (React 17 and 18). - **Parser:** a file now arrives as TypeScript, so the parser also reads import attributes, `using` declarations and `accessor` fields. - **Type assertions:** the passes used to run after TypeScript was compiled away. The lowered copy already drops `as`, `satisfies`, `!` and `<Type>` (#3077); here a tag declared as `const t = useGT() as GT` keeps its templates hashed. - **gt-tanstack-start** rebuilt the transform hook as `{ filter, handler }`, which dropped `order`. Its adapter now keeps it. ## Evidence - **Before → after, real Vite 8 builds** of five components (`/tmp/gt-compile-matrix`, the fixture of #3074): | Setup | `<T>` with two `<Var>` | Hash | | --- | --- | --- | | No React Compiler | built | `8eb6c9bfe67524e2` | | `react({ compiler: true })` + plugin | **build fails** → built, compiled by React Compiler | `8eb6c9bfe67524e2` | | Babel React Compiler + plugin | **build fails** → built, compiled by React Compiler | `8eb6c9bfe67524e2` | ```js t3 = /* @__PURE__ */ jsx(T, { _hash: "8eb6c9bfe67524e2", children: /* @__PURE__ */ jsxs("p", { children: ["From ", t1, " to ", t2, "."] }) }); ``` - **T3 Code's web app** (pingdotgg/t3code#46460: Vite 8, `react({ compiler: true })`, about 1,550 source files, about 2,000 `<T>`), production build with the plugin: - **Before:** fails. 21 `<T>` errors across 18 files, plus the 4 errors from `@tanstack/react-router` that the previous PR removes. - **After:** passes with no compiler error and no file it could not parse. - The build writes 1,596 distinct `<T>` hashes and 6,245 template hashes. All 6,245 template hashes and 1,595 of the `<T>` hashes are keys of the catalog the CLI wrote for that app. - The one `<T>` hash that is not a catalog key is a CLI bug, not this PR: the app has its own component named `RelativeTime`, which the CLI extracts as GT's. The browser computes the same hash as the compiler does. Reported on #2971. - Build time: 9.8 s without the plugin, 10.9 s with it (one run each). - **`tests/apps/compiler-cli-parity`** (real Vite build against the CLI): 574 matched, 0 mismatched. - **`tests/apps`** for Vite, Rollup, Rolldown, esbuild and webpack build, and each bundle holds its `<T>` and template hashes. - **`tests/apps/vite-chunk-translations`** `check`: the same 2 checks fail as on `samsara` (#3048), no others. - **Before:** the new cases in `running before the other transforms` fail, the React Compiler one with `[gt-compiler] Encountered invalid library usage.` **After:** `@generaltranslation/compiler` 1075 passed, `gt-tanstack-start` 172 passed. - **Review round 1**, each failing first: - `const t = useGT() as GT`, `const t = useGT()!` and `const t = <GT>(await getGT())` left `` t`Save` `` unhashed. - gt-tanstack-start's compiler plugin had no `order`: `expected { filter: … } to match object { order: 'pre' }`. - A file compiled for React 18, which imports `react-compiler-runtime`, still failed with `Encountered invalid library usage`. - The warning did not say that automatic JSX translation is skipped for such a file. - A build with hash minification did not name such a file among those whose messages are hashed when the app runs. - Review round 3, each failing first: - a hand-written file that imports a type, another helper or the namespace from `react-compiler-runtime` was read as compiled by React Compiler, so its `<T>` got no hash. The check is now a value import of `c`, the memo cache every compiled component calls; - a file React Compiler compiled that imports no `<T>` to render (an icon, a component that only calls `useLocale()`, one that imports only the type of `T`, or one that imports the namespace without rendering `<GT.T>`) was named in the hash-minification warning, which pushed the files that matter out of its list. - Gates at this commit: `turbo build typecheck test` 117 of 118 tasks (`gt-next#test` fails at the local Rust link step only; its 992 JS tests pass). `pnpm lint`, `pnpm format`, `pnpm size`, `pnpm check:export-owners` and `pnpm check:reexports` exit 0. ## Merge Danger **Door:** two-way **Blast Radius:** every build that uses the bundler plugin - The plugin now parses source files, not compiled ones. A file Babel's parser cannot read is logged and left untouched, as before, but the syntax it meets is wider. T3 Code's source files all parsed. - A changed file is written back by Babel's generator as TypeScript and JSX, before the other transforms see it. - A lowered copy is made of every file that holds JSX, which costs build time. - With the Babel version of React Compiler, a template the plugin leaves tagged (a helper given an unnamed value, a `msg` template) still keeps its component from being compiled. That is unchanged and tracked in #3074. - Not built here: gt-next with `type: 'babel'` and gt-tanstack-start beyond their own test apps in the gate, and a Windows build.
…ches
Moves web, mobile and desktop to the General Translation v12 prerelease,
where the fixes carried in patches/ live in the library.
- gt("Hi {name}", { name }) becomes gt`Hi ${{ name }}`, and msg() the same,
by a one-off script that uses GT's own ICU parser.
- Every catalog entry is carried over under its new key; nothing is
retranslated.
- Web sets GT up with initializeGT and lets GT's provider load catalogs, and
its browser tests get that provider from render(); desktop uses gt-i18n's
initializeGT, setLocale and m; mobile tests use gt-react-native/testing.
- Mobile's Babel config adds two GT plugins: lowerTaggedTemplates, so React
Compiler compiles components that hold a tagged template with values, and
precomputeMessages, which hashes messages at build time.
- scripts/i18n-check.ts runs gt generate --check in the three apps.
chenxin-yan
force-pushed
the
chore/gt-samsara
branch
from
December 1, 2026 23:31
7383952 to
fbbd818
Compare
chenxin-yan
marked this pull request as ready for review
December 2, 2026 00:39
Resolves conflicts with main at 63c054e: - Sidebar update UI (SidebarUpdatePill, UpdateEverythingDialog): takes main's version and converts its messages to GT v12 tagged templates. - VoiceSettingsPanel: keeps the PR's v12 messages and applies main's language-filter menu change, with its messages converted to v12. - Web catalogs: regenerated with `gt generate`; main's new "Nothing to update" translations are carried over to the v12 key. Also restores translations the v12 key migration changed by accident, where two messages share English text under different contexts. Each value is main's, with the same placeholders: - web: French and Polish "Desktop" (Electron diagnostics), "Input" (voice settings) in fr/pl/pt-BR/ru/zh, Polish snooze wording ("uśpij"), and Polish/Russian minute/hour plural forms. - mobile: French and Polish "Desktop", Chinese "Desktop" (machine type), and "Play" in fr/pt-BR/ru/zh. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in main at cd9cda5. Converts its new messages to GT v12 tagged templates: - ImageAnnotationOverlay: keeps the PR's v12 messages and applies main's arrow and text-label tools, with their messages converted. - Mobile ThreadHeader and ThreadRouteScreen: the "Open in Devin" and stop confirmation messages. Catalogs are regenerated with `gt generate`; main's five new strings keep their translations in every locale under the v12 keys. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in main at 4453c5a. incoming-share-model keeps the PR's v12 messages and applies main's shared-image name change, with the two messages that now take `name` converted to v12. Catalogs are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in main at 1e6e7d7 and converts its new "Could not reopen view" toast title to a v12 tagged template. Catalogs are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
rami-ballout
added a commit
to rami-ballout/t3code
that referenced
this pull request
Dec 2, 2026
Resolves the conflict with the General Translation v12 move (pingdotgg#46460): the close button label uses the new gt template form. Co-Authored-By: Claude Fable 5.2 <[email protected]>
AISupplyGuy
added a commit
to AISupplyGuy/t3code
that referenced
this pull request
Dec 2, 2026
General Translation v12 (pingdotgg#46460) only extracts tagged-template messages, so the Labs row now uses gt`…`. The catalogs are regenerated with each locale's existing notch translations kept under the new keys. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Dec 2, 2026
Merged
Merged
FOX-cOSMIC
added a commit
to FOX-cOSMIC/FOX-cOSMIC-t3
that referenced
this pull request
Dec 2, 2026
Upstream moved to GT v12 (pingdotgg#46460), whose extractor skips string calls. Our read-aloud, context-ring, compaction and All time strings now use tagged templates, the catalogs are regenerated, and our earlier translations are restored by their English source text. The mobile All label drops its $context option, which v12 no longer supports. Co-Authored-By: Claude Opus 5.5 <[email protected]>
FOX-cOSMIC
added a commit
to FOX-cOSMIC/FOX-cOSMIC-t3
that referenced
this pull request
Dec 2, 2026
Upstream moved to GT v12 (pingdotgg#46460), whose extractor skips string calls. Our read-aloud, context-ring, compaction and All time strings now use tagged templates, the catalogs are regenerated, and our earlier translations are restored by their English source text. The mobile All label drops its $context option, which v12 no longer supports. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jason5545
added a commit
to jason5545/t3code
that referenced
this pull request
Dec 2, 2026
…12's message format Upstream pingdotgg#46460 moved to General Translation v12, which stores msg("Update to {version}") as ["Update to ", ["version"]] and rehashes every entry. The fork's reviewed Chinese was carried to the new keys where the English parses to the same message, and the context translations (Working, Open, Code, Direct and the rest) were moved to their new hashes computed from each message's context. gtCatalog.ts now reads v12 plural and select branches, so drafts and the mainland-wording check see their text. 346 new strings were drafted from upstream's zh and read against their English.
vedprakash2302
added a commit
to vedprakash2302/Cody
that referenced
this pull request
Dec 2, 2026
- GT v12 (pingdotgg#46460): Cody's branded strings in the startup recovery page, the macOS "up to date" dialog, the sidebar home label, the worktree base labels (web and mobile) and Cody's side chat, scheduled task and Windows sign-in copy now use tagged-template messages; plurals use plural/part. - OpenCode Edit from here (pingdotgg#47060) superseded Cody's own rewrite; adapter.ts takes upstream's code, Cody keeps its two extra rollback error tests. - Thread details (pingdotgg#47015): Cody's side chat delete row keeps its hover handling and reads the row's project from upstream's childThread. - Side chat pane, selection toolbar: kept Cody's bar, title menu and Ask in side chat inside upstream's GT v12 copy. - Sync notes: GT v12 message forms and the pingdotgg#47060 supersession.
sandscooling
pushed a commit
to sandscooling/t3code
that referenced
this pull request
Dec 2, 2026
Sync 1201d: 87 upstream commits to 5709d8c. Seven additive hunks in Sidebar.tsx, SettingsPanels.tsx and SidebarThreadRow.tsx, from upstream pingdotgg#46460 (General Translation v12) and pingdotgg#47105 (stable sidebar row callbacks). Fork strings with options move to the v12 template form, including fork files that did not conflict. Fork strings without a catalog entry still render in English. No fork feature dropped. Lockfile changed; upstream migration 125. Co-Authored-By: Claude Opus 5.5 <[email protected]>
chomamateusz-agent
added a commit
to chomamateusz/t3code
that referenced
this pull request
Dec 2, 2026
All 27 patches carried onto 902d26d (carry tip 52c96331459a, tree 07b9c6951edf); no patch retired, authors, dates and subjects unchanged. - Upstream b4b58d2 (pingdotgg#46460, General Translation v12): every patch's own strings are written as v12 tagged templates with the same English, plural() replaces ICU plural branches, and MFunctionType becomes M (0003, 0004, 0005, 0007, 0008, 0011, 0014, 0017, 0018, 0019, 0020, 0023, 0024, 0026). - 0009 keeps its stacked status cell beside upstream's folder-row Snooze (pingdotgg#46765, pingdotgg#46818) and takes upstream's pointer-events-none on the hidden time label. - 0014 ports upstream's new Sidebar.folderRow.browser.test.tsx to the grouped cards. - 0025 keeps the question-thread snooze guard beside upstream ff26e6a (pingdotgg#46857), which moved the snooze check out of isAutoSettlementCandidate. - i18n catalogs stay as upstream has them; markers unchanged (all source forms present).
Jarne47
added a commit
to Jarne47/t3code
that referenced
this pull request
Dec 2, 2026
…onal fork Upstream moved to General Translation v12 (pingdotgg#46460): gt()/msg() calls became tagged templates and every catalog was re-keyed. Conflict resolutions: - ServerEnvironment.ts: keep fork's environmentName capability next to upstream's new threadWorkspaceMoves. - AppSidebarLayout.tsx: keep the fork's sidebar layout toggle button beside the main sidebar trigger, on the new gt`...` API. - Sidebar.tsx: keep the fork's persistent Pinned/Active drag dividers with upstream's gt({ context })`...` labels. - ZoomableImage.tsx: adopt upstream's toolbar spacing for overlays in short windows; fork full-screen media still fits the whole viewer with no offset. - fileContextMenu.ts: keep the fork's "Open" vs "Open in default app" label split for folders, add upstream's pencil icon. - ConnectionsSettings.tsx: keep the fork's machine name editor next to the machine actions menu. - LabsSettingsPanel.tsx: keep turning off the legacy sidebar when Boring sidebar is turned on. - SettingsPanels.tsx: keep personal-build updater labels and description, the project grouping Select (separate / repository / repository+subfolder), and the fork's follow-up hint for its Mod+Enter send shortcut fix. - SidebarUpdateReleaseNotes.tsx: keep passing the current version so personal builds link to the fork's releases, with upstream's plural template. - pnpm-lock.yaml: keep @formkit/auto-animate, take upstream's @generaltranslation/api 0.7.0. - apps/web i18n catalogs: took upstream's re-keyed catalogs, regenerated, and carried the fork's existing translations onto the new keys. Fork fixes: converted the remaining fork gt("...")/msg("...", {...}) calls in CommandPalette, threadActionMenu.logic, KeybindingsSettings.logic and FilePreviewPanel to the v12 tagged-template API. Co-Authored-By: Claude Opus 5.5 <[email protected]>
imetn
added a commit
to imetn/t4code
that referenced
this pull request
Dec 2, 2026
…per Opus 5.5 audit - sync-t4-i18n: carry over T4-only/curated translations across GT re-keys (GT v12 prep), add 3-way merge against lastSyncedUpstreamCommit, reject ambiguous English matches, validate --ref & corrupt JSON, guard against empty/mass-prune (>5%) before writing any file, fix --check exit code, and warn on orphan locales - check-t4-upstream-audit & .t4-upstream-sync.json: share strict lock parser, isolate patch checks in a temp HEAD index, add I18N_ONLY & MERGE_COMMIT buckets, evaluate locks before anchored redlines (fixing resourceTelemetry false positives), validate range args, support --binary/--full-index/--root/-z, and always audit structured deferredPrs (pingdotgg#46460, pingdotgg#46267) - check-t4-locks & check-t4-branding: fail loudly on malformed lock entries or commented-out t4-overrides.css import, catch renames/untracked files (--no-renames -z), add --strict, and replace regex comment stripping with string/template/regex-aware lexical scanning plus split JSX detection - AntigravityTurnOutcome & provider-acp: separate keyed retry buckets (resumeAttemptKey) + previousOutcomeFailure so mixed 500 -> location-400 retries work, guard retired checks and out-of-order concurrent completions, respect 24h mtime window on sessionReachedModel, and normalize protobuf length-varint prefixes for all known gRPC status codes - Add unit tests covering all 4 T4 sync/guard scripts plus Antigravity/ACP retry edge cases
imetn
added a commit
to imetn/t4code
that referenced
this pull request
Dec 2, 2026
chhoumann
added a commit
to chhoumann/t3code
that referenced
this pull request
Dec 2, 2026
Upstream moved to GT v12 (pingdotgg#46460), where a message is a tagged template and the CLI no longer extracts gt("...") or msg("...", {...}) calls. The fork's sandbox UI still used the call form, so 126 of its messages had no catalog key under the merged code. The 130 call sites in 17 files are now tagged templates, and the six pluralized tool summaries use plural() and part like their neighbours. sandboxes.ts takes the resolver type M from gt-i18n, since gt-i18n/types is gone. The 108 web and 18 mobile catalog entries move to their v12 keys in place. Every locale held the English seed for them, so no translation is lost. The catalogs hold the same keys and values as gt generate writes, without its reordering.
This was referenced Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
T3 Code is on General Translation (GT) 11 and carries four local patches against it, plus its own code around it:
patches/[email protected],@[email protected]and@[email protected]cache work GT repeated for every translated string, which stalled taps on Android (Android: tapping a chat in the thread list waits ~350 ms on the JS thread before the screen opens #40941).patches/[email protected]makes a language change apply at once on Android.gt-react-nativefor a hand-written fake.Every GT update means porting the patches again.
Change
Moves the three apps to GT v12 (the
samsaraprerelease on npm), where those fixes live in the library, and removes the patches and the local code they needed.gt-reactandgt-react-native12.0.0-samsara.15,gt-i18n2.0.0-samsara.15 and thegtCLI 3.0.0-samsara.16. Mobile and web add@generaltranslation/compiler2.0.0-samsara.14: mobile for its Babel plugins, web for the bundler plugin. The four patches and theirpnpm-workspace.yamlentries are deleted.gt("Hi {name}", { name })becomesgt`Hi ${{ name }}`andmsg("…", values)becomesmsg`…`. A one-off script did this rewrite with GT's own ICU parser; about 160 files were then edited by hand (types that hold a message, tables of messages, tests).runtime.tsonly warms the requested locale before first render, so the splash screen is still replaced by the finished app.initializeGT, the call GT pairs with a provider that loads its own catalogs, in place ofinitializeGTSPApinned to English. GT's hooks then need the provider, so a browser test gets it fromrender(), which takes{ locale: "de" }to render a translation. That replaces the provider, catalog load and cookie reset 14 test files wrote by hand.onCurrentMessagesChange().<T>and message at build time and fails the build on a misuse. It is applied to builds only (apply: "build"): left on in dev it takes the dev server's cold start from 4.4 s to 7.3 s (compiler: the bundler plugin adds about 3 s to a Vite dev start on a large app generaltranslation/gt#3093). The dev server and the tests compute the same hashes at run time, so they do not run the plugin's output; that is the cost of the split.i18n/messages.tsusesinitializeGT,setLocaleandmfromgt-i18n;scripts/i18n-generate.mjsis deleted (i18n:generateisgt generate).getNativeLocales(), so the code that read them from GT's native module is deleted.gt-react-nativeto itstestingentry, so the fake module andnative-locale.test.tsare deleted.babel.config.jsadds two GT Babel plugins.lowerTaggedTemplatesis there becausebabel-plugin-react-compiler1.0.0 skips any component that contains a tagged template with values; with it, the React Compiler coverage test passes with the same seven known bailouts.precomputeMessageshashes each message at build time, which Hermes is slow to do on a phone.scripts/i18n-check.tsis nowgt generate --checkin the three apps.docs/internals/14_i18n.mdis updated for the new API and the two build steps.These land together because the apps share
packages/client-runtimeandpackages/shared, which hold messages in the new form.pnpm installadded the new GT versions tominimumReleaseAgeExclude, because they were published less than a day before this commit.Scope
This is a dependency migration, not a bug fix, and no maintainer asked for it. I wrote the General Translation changes T3 Code needed: generaltranslation/gt#3017, generaltranslation/gt#3068, generaltranslation/gt#3081 and generaltranslation/gt#3092, all released. The sections below show what the move costs, so you can say whether you want it. Close it if you do not.
Verification
Run on macOS on this commit, which is rebased onto
mainat 699b871, unless a line says otherwise.vp run check:changed: passes (unused patches, format, lint, knip, typecheck of 43 packages, 502 test files, React Compiler coverage of 587 files).i18n:checkand the web production build pass. The build runs GT's bundler plugin.react(preserve-manual-memoization)inapps/mobile/src/features/keyboard/CommandPalette.tsxandapps/mobile/src/features/threads/thread-list-v2-items.tsx, which this branch adds. The linter reads the source before the Babel plugin runs, so it cannot analyse a component that has both a tagged template with values and a manualuseMemo. The build compiles both components (the coverage test passes for them).DesktopLinuxUrlHandler.test.ts).Net.test.ts,shell.test.ts).mainon this machine. I checked that on f7a9d69, an older commit ofmain, not on today's.main(the builds of the benchmark below): the production web build in Chromium, the unpackaged desktop app, and Release builds of the mobile app on an iOS 27.2 simulator and an Android 16 emulator. Each started in English and in German and switched language in place, and the rendered text was checked in every launch. The desktop native menu was checked in German.The checks below ran before the rebase and on the previous GT prerelease (samsara.14), and were not repeated:
vp run dev: starts in English; choosing Deutsch, then Русский, in Settings changes the text and<html lang>without reloading the page; a reload in Russian shows Russian on the first app frame; GT logs nothing to the console.вчера в 18:04,Сохранено 1 из 21 заголовка,Сохранено 1 из 5 заголовков.Performance
Three builds of this repo on one commit (a269a67, this branch's base before its last rebase):
mainwith the four GT patches removed,main, and this branch. Medians of 10 runs (5 for the web build), in milliseconds unless a unit is given.mainwithout the four patchesmainmainwithout the patches did not reliably show German on Android: 0 of 11 cold starts with German saved, and 4 of 10 live switches. With the patch and on this branch it was 11 of 11 and 10 of 10.mainand this branch were measured in one session;mainwithout the patches in an earlier session the same day.main.No UI changes, so no screenshots.
Written by Claude (
claude-fable-5-2) in the pi coding agent.