feat(cli): extract gt-vue messages - #2013
Open
eoinest wants to merge 33 commits into
Open
Conversation
Contributor
size-limit report 📦
|
Contributor
Author
4 similar comments
Contributor
Author
Contributor
Author
Contributor
Author
Contributor
Author
eoinest
force-pushed
the
e/cli/add-vue-extraction
branch
from
August 1, 2026 02:15
06c9325 to
6b25a85
Compare
This was referenced Aug 1, 2026
Contributor
Author
eoinest
force-pushed
the
e/cli/add-vue-extraction
branch
from
August 1, 2026 02:49
6b25a85 to
ff312d4
Compare
Contributor
Author
2 similar comments
Contributor
Author
Contributor
Author
eoinest
force-pushed
the
e/cli/add-vue-extraction
branch
from
August 5, 2026 20:15
7995c24 to
c46120e
Compare
Contributor
Author
1 similar comment
Contributor
Author
archie-mckenzie
previously approved these changes
Aug 6, 2026
Contributor
Author
3 similar comments
Contributor
Author
Contributor
Author
Contributor
Author
This was referenced Aug 6, 2026
Contributor
Author
eoinest
force-pushed
the
e/cli/add-vue-extraction
branch
from
August 6, 2026 19:40
236ca99 to
9978985
Compare
eoinest
force-pushed
the
e/cli/add-vue-extraction
branch
from
August 7, 2026 02:18
d1c70d8 to
89b82bf
Compare
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.
Summary
@generaltranslation/vue-extractoras a standalone published package, parallel to the Python extractor. The package owns Vue SFC/script/compiler semantics; thegtCLI owns discovery, I/O, hashing, deduplication, and command behavior.T,Var, formatter placeholders,Branch,Plural,useGT,useMessages, andmsgfrom script setup, combined script blocks, Options API setup returns, aliases, namespaces, CommonJS, and statically resolvable expressions.loadTranslationswiring, and make the deliberate fail-closed validation versus file-only stage behavior explicit.Testing
@generaltranslation/vue-extractor: 37 files / 1,164 testsgt: 124 files / 2,239 testsvue-tsc, SSR, and production buildsNotes
gtintegration.Greptile Summary
This PR adds
@generaltranslation/vue-extractoras a new standalone package and wires it into thegtCLI through a lazy-loaded adapter, enabling extraction of Vue SFC/script/template translations in parallel with the existing React and Python extractors.packages/vue-extractor): A 12,500-line static analyzer that parses Vue SFCs (template + script/script-setup + Options API), resolves GT component aliases, handles JSX, and matches Vue compiler whitespace/delimiter behavior for hash parity — without ever executing project code.packages/cli): Adds Vue-aware workspace discovery, per-scope compiler-option resolution from Vite/Nuxt configs, atomic file creation with symlink and path-traversal guards, fail-closed validation for Vue, and a Vue setup wizard that installsgt-vue, generatesloadTranslations.js, and configures credentials with the correctVITE_prefix.Confidence Score: 5/5
returnbefore anever-typed call invalidateProject. None of these affect runtime correctness.Important Files Changed
selectVueWorkspacePackagesproperly seeds from direct gt-vue owners then follows reverse dependency edges.Sequence Diagram
sequenceDiagram participant CLI as gt CLI (VueCLI / InlineCLI) participant CIUFL as createInlineUpdatesForLibraries participant CVIU as createVueInlineUpdates participant ISS as inlineSourceScopes participant RVCO as resolveVueCompilerOptions participant EFVS as extractFromVueSource (vue-extractor) participant PP as postProcess (hash + dedup) CLI->>CIUFL: [GT_VUE, ...others], filePatterns, flags CIUFL->>ISS: readInlineSourceScopes(cwd, library) ISS-->>CIUFL: scopes[] (workspace BFS for Vue) CIUFL->>CIUFL: "exclude *.vue from non-Vue patterns" par Vue extraction CIUFL->>CVIU: filePatterns (Vue-specific) CVIU->>ISS: readInlineSourceScopes + readDefaultInlineSourcePatterns ISS-->>CVIU: scopes[] CVIU->>RVCO: resolveVueCompilerOptions(scope, viteConfigPath?) RVCO-->>CVIU: compilerOptions or errors[] alt errors present CVIU-->>CIUFL: "{updates:[], errors, warnings:[]}" else no errors loop each .vue / .js / .ts file CVIU->>EFVS: "extractFromVueSource(source, file, {compilerOptions, requireGTProvenance})" EFVS-->>CVIU: "{results, errors, warnings}" end CVIU->>PP: calculateHashes + dedupeUpdates CVIU-->>CIUFL: "{updates, errors, warnings}" end and React/other extraction CIUFL->>CIUFL: createInlineUpdates (existing React path) end CIUFL->>CIUFL: flatMap results, dedupeUpdates (cross-library) CIUFL-->>CLI: "{updates, errors, warnings}"Reviews (20): Last reviewed commit: 2735158 | Re-trigger Greptile