This repository was archived by the owner on Nov 20, 2026. It is now read-only.
Repository navigation
[AI] fix(i18n): stage Vietnamese only when the CHE-831 gate passes (CHE-1024) - #136
Closed
congvc-bot-x99[bot] wants to merge 7 commits into
Closed
congvc-bot-x99[bot] wants to merge 7 commits into
congvc-bot-x99[bot] wants to merge 7 commits into
Conversation
added 3 commits
October 6, 2026 05:07
…HE-1024) Browser and Electron packaging and the CI setup action no longer copy locale-fork/vi.json unconditionally. All three call bin/stage-vietnamese.mts, which removes any earlier vi.json and stages the fork catalog only when check:i18n passes; a partial batch is withheld and logged. Docs name the mechanism. Addresses signed FAIL 01a10df6-8d31-7793-851b-0cefeefaba45.
…024)
i18next-parser reads the 'satisfies' form as part of the message key, so
the ported gate extracted 'Unsupported template type: {{ type } satisfies
TransObjectLiteral}'. Same one-line change as in 79135d1 (CHE-831).
|
Hi! I'm the It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃 |
added 4 commits
October 6, 2026 05:47
…re it in CI (CHE-1024)
Replace the whole-English-catalogue enable signal with the CHE-830 UC5 /
CHE-831 current-screen-batch contract.
- locale-fork/batches.json: reviewed batch manifest { version: 1, current:
null | { name, keys, sharedKeys } }. Shipped with current: null. No screen
batch is declared by this change: which screens/keys form the first batch
is a CHE-830/CHE-831 decision made by a reviewed edit of this manifest.
- bin/check-vietnamese-batch.mts (yarn check:i18n): checks only keys and
sharedKeys (plural groups by base key) against the English extraction by
reusing the unchanged checkVietnamese on that subset; unknown/duplicate
keys and malformed manifests fail; out-of-batch keys are ignored; prints a
deterministic JSON completeness line. --catalogue is information only.
No batch declared: loud message, exit 0 (CI); --require-batch (staging):
exit 1 so Vietnamese is withheld.
- bin/check-vietnamese.mts: now a library (global checkVietnamese logic and
tests unchanged; helpers exported; blob differs from 79135d1).
- bin/stage-vietnamese.mts: stages only on a complete declared batch.
- .github/workflows/vietnamese-coverage.yml: required job running bin tests
and yarn check:i18n as a failing step.
- bin/package-electron: forward --skip-translations to the nested browser
build.
- Docs and release note describe exactly this mechanism.
Allow .mts extension imports in the bin root tsconfig (needed by Node type stripping), brace single-line ifs, avoid a template-curly string in a test.
…ork catalogue (CHE-1024)
3 tasks
Author
|
Closing as orphan: linked issue CHE-831 is |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
CHE-1024 correction (answers signed reviews
01a10e36-a242-7683-ac3d-f2070b609bef: F1, F2, P2; and01a10e59-d635-780f-bf36-87356ede4bc7: F3), stacked on PR #135. AI-authored (Claude Opus, Multica agent x99-claude-opus); needs an independent different-lab verifier and current-head OCR before ready. This author makes no acceptance claim.packages/desktop-client/locale-fork/batches.jsonis a reviewed manifest{ "version": 1, "current": null | { "name", "keys", "sharedKeys" } }(English keys, plural groups by base key).bin/check-vietnamese-batch.mts(yarn check:i18n) checks onlykeys+sharedKeys: each must exist in the English extraction, have a non-empty Vietnamese translation, and keep placeholders,<Trans>tags and plural forms (the unchangedcheckVietnameseruns on that subset). English keys outside the batch are ignored. Unknown/duplicate keys and malformed manifests fail. PrintsVietnamese batch completeness: {batch, required, present, errors, complete}; exit 1 on any in-batch error.--catalogueprints the whole-catalogue count for information only."current": null. Which screens/keys form the first batch is a CHE-830/CHE-831 decision made by a reviewed edit of this manifest; none is invented here and no translation or batch acceptance is claimed. With no batch: Vietnamese is withheld everywhere (not staged, stalevi.jsonremoved);yarn check:i18nexits 0 with a loud "no screen batch declared" line; staging (--require-batch) exits 1..github/workflows/vietnamese-coverage.yml(adapted from79135d1d9;ubuntu-latest, pinned checkout, read-only permissions, nocontinue-on-error) runsyarn vitest run --project binandyarn check:i18nas a failing step. Packaging staging still only withholds (exit 0).bin/package-electronforwards--skip-translationsto the nestedyarn build:browser.bin/check-vietnamese.mtsis now a library:checkVietnameselogic and its tests are unchanged, helpers are exported, and its formermainmoved into the batch gate; so its blob no longer equals79135d1d9.tsconfig.root.jsonallows.mtsimports forbin/*.mts.bin/stage-vietnamese.mtsno longer copies the whole fork catalogue. When (and only when) the declared batch passes, it writeslocale/vi.jsonwith exactly the validated keys (batchkeys+sharedKeys, plural groups expanded to the Vietnamese plural forms the gate checked; forvithat is_other), in source order, 2-space JSON plus trailing newline.bin/check-vietnamese-batch.mtsgains akeysresult field and a--keys-out <file>flag (written only on a complete batch) so staging reuses the gate's own key set; validation logic is unchanged. Partial or malformed out-of-batch screens (missing, placeholder mismatch, unclosed tag, wrong plural form, key not in English) never reach the staged file. The target is still removed first; a failed gate, missing manifest orcurrent: nullstage nothing.currentstaysnull: no batch is declared or accepted.bin/stage-vietnamese.mtsstages only on a complete declared batch. Docs (multi-currency.md) and the release note describe exactly this.locale-fork/vi.json,locale-fork/GLOSSARY.md. Inheritedlint/autofixfailures (GLOSSARY formatting, calendar import order) are not touched and not waived.Related issue(s)
CHE-1024, CHE-830, CHE-831
Testing
F3 head
d91fd7adc:yarn vitest run --project bin107 passed (red first: 11 failed before the fix);yarn workspace @actual-app/web run test src/i18n6 passed; typecheck,oxfmt --check,oxlint --type-aware(0 errors) and docs build exit 0; real treeyarn check:i18nexit 0, real stager with a planted stalelocale/vi.jsonwithholds and removes it,--catalogue136/2,851 (information only). Earlier, from committed headddda62910:yarn vitest run --project bin96 passed (red first: 2 files failed to import before the implementation);yarn workspace @actual-app/web run test src/i18n6 passed;yarn typecheck,oxfmt --checkandoxlint --type-aware --quieton changed files, andyarn workspace docs run buildexit 0. Real tree:yarn check:i18nexit 0 (no batch declared, Vietnamese hidden);--catalogueshows 136/2,851 (information only). Fixture controls with the exact CI commandyarn check:i18n: complete batch plus unrelated untranslated key exits 0; removing an in-batch key exits 1; empty state exits 0; duplicate-key manifest exits 1. NOT RUN: network packaging, real translated bundle, workflow execution on GitHub, docs spelling action. Evidence zip kept on the X99 workdir.Checklist
Bundle Stats
View detailed bundle stats
desktop-client
Total
Changeset
src/languages.tslocale/vi.jsonView detailed bundle breakdown
Added
No assets were added
Removed
Bigger
No assets were bigger
Smaller
Unchanged
loot-core
Total
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
api
Total
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
cli
Total
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
crdt
Total
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged