Skip to content
This repository was archived by the owner on Nov 20, 2026. It is now read-only.

[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
author/CHE-1197/8c839986from
author/CHE-1024/5e7a1c3b-vi-gate
Closed

congvc-bot-x99[bot] wants to merge 7 commits into
author/CHE-1197/8c839986from
author/CHE-1024/5e7a1c3b-vi-gate

Conversation

@congvc-bot-x99

@congvc-bot-x99 congvc-bot-x99 Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Description

CHE-1024 correction (answers signed reviews 01a10e36-a242-7683-ac3d-f2070b609bef: F1, F2, P2; and 01a10e59-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.

  • F1 (screen batch, not whole catalogue): packages/desktop-client/locale-fork/batches.json is 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 only keys + sharedKeys: each must exist in the English extraction, have a non-empty Vietnamese translation, and keep placeholders, <Trans> tags and plural forms (the unchanged checkVietnamese runs on that subset). English keys outside the batch are ignored. Unknown/duplicate keys and malformed manifests fail. Prints Vietnamese batch completeness: {batch, required, present, errors, complete}; exit 1 on any in-batch error. --catalogue prints the whole-catalogue count for information only.
  • No batch is declared. The manifest ships with "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, stale vi.json removed); yarn check:i18n exits 0 with a loud "no screen batch declared" line; staging (--require-batch) exits 1.
  • F2 (required CI): new .github/workflows/vietnamese-coverage.yml (adapted from 79135d1d9; ubuntu-latest, pinned checkout, read-only permissions, no continue-on-error) runs yarn vitest run --project bin and yarn check:i18n as a failing step. Packaging staging still only withholds (exit 0).
  • P2: bin/package-electron forwards --skip-translations to the nested yarn build:browser.
  • bin/check-vietnamese.mts is now a library: checkVietnamese logic and its tests are unchanged, helpers are exported, and its former main moved into the batch gate; so its blob no longer equals 79135d1d9. tsconfig.root.json allows .mts imports for bin/*.mts.
  • F3 (filtered staging): bin/stage-vietnamese.mts no longer copies the whole fork catalogue. When (and only when) the declared batch passes, it writes locale/vi.json with exactly the validated keys (batch keys + sharedKeys, plural groups expanded to the Vietnamese plural forms the gate checked; for vi that is _other), in source order, 2-space JSON plus trailing newline. bin/check-vietnamese-batch.mts gains a keys result 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 or current: null stage nothing. current stays null: no batch is declared or accepted.
  • bin/stage-vietnamese.mts stages only on a complete declared batch. Docs (multi-currency.md) and the release note describe exactly this.
  • Unchanged: locale-fork/vi.json, locale-fork/GLOSSARY.md. Inherited lint/autofix failures (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 bin 107 passed (red first: 11 failed before the fix); yarn workspace @actual-app/web run test src/i18n 6 passed; typecheck, oxfmt --check, oxlint --type-aware (0 errors) and docs build exit 0; real tree yarn check:i18n exit 0, real stager with a planted stale locale/vi.json withholds and removes it, --catalogue 136/2,851 (information only). Earlier, from committed head ddda62910: yarn vitest run --project bin 96 passed (red first: 2 files failed to import before the implementation); yarn workspace @actual-app/web run test src/i18n 6 passed; yarn typecheck, oxfmt --check and oxlint --type-aware --quiet on changed files, and yarn workspace docs run build exit 0. Real tree: yarn check:i18n exit 0 (no batch declared, Vietnamese hidden); --catalogue shows 136/2,851 (information only). Fixture controls with the exact CI command yarn 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

  • Release notes added
  • Independent verification pending

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 44 → 42 14.17 MB → 13.99 MB (-184.6 kB) -1.27%
loot-core 1 4.67 MB 0%
api 2 3.88 MB 0%
cli 1 8.02 MB 0%
crdt 1 11.16 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
44 → 42 14.17 MB → 13.99 MB (-184.6 kB) -1.27%
Changeset
File Δ Size
src/languages.ts 📉 -99 B (-5.78%) 1.67 kB → 1.58 kB
locale/vi.json 🔥 -15.89 kB (-100%) 15.89 kB → 0 B
View detailed bundle breakdown

Added
No assets were added

Removed

Asset File Size % Changed
static/js/TransactionList2.js 168.62 kB → 0 B (-168.62 kB) -100%
static/js/vi.js 15.89 kB → 0 B (-15.89 kB) -100%

Bigger
No assets were bigger

Smaller

Asset File Size % Changed
static/js/months.js 593.39 kB → 593.29 kB (-99 B) -0.02%

Unchanged

Asset File Size % Changed
static/js/index.js 1.78 MB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/DateSelect.js 2.37 MB 0%
static/js/FormulaEditor.js 767.24 kB 0%
static/js/ManageRules.js 83.15 kB 0%
static/js/NotesTagFormatter.js 25.94 kB 0%
static/js/PayeeRuleCountLabel.js 12.81 kB 0%
static/js/ReportRouter.js 1.57 MB 0%
static/js/ScheduleEditForm.js 75.41 kB 0%
static/js/SchedulesTable.js 171.25 kB 0%
static/js/TourHost.js 169.22 kB 0%
static/js/TourProvider.js 1.54 kB 0%
static/js/TransactionList.js 79.22 kB 0%
static/js/Value.js 1.8 MB 0%
static/js/bootstrapHyperFormula.js 302 B 0%
static/js/ca.js 170.64 kB 0%
static/js/client.js 452.05 kB 0%
static/js/columns.js 673.76 kB 0%
static/js/de.js 186.43 kB 0%
static/js/en-GB.js 13.69 kB 0%
static/js/en.js 272.82 kB 0%
static/js/es.js 183.73 kB 0%
static/js/fr.js 178.59 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 152.08 kB 0%
static/js/narrow.js 290.14 kB 0%
static/js/nb-NO.js 135.89 kB 0%
static/js/nl.js 151.78 kB 0%
static/js/pl.js 148.93 kB 0%
static/js/pt-BR.js 178.74 kB 0%
static/js/ru.js 211 kB 0%
static/js/theme.js 31.68 kB 0%
static/js/uk.js 210.69 kB 0%
static/js/useAccountBalances.js 220.92 kB 0%
static/js/useFormatList.js 10.4 kB 0%
static/js/useLocalPref.js 97.2 kB 0%
static/js/useReducedMotion.js 594 B 0%
static/js/wide.js 285.94 kB 0%
static/js/workbox-window.prod.es5.js 7.21 kB 0%
static/js/zh-Hans.js 107.31 kB 0%
static/js/zh-Hant.js 130.92 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.67 MB 0%
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

Asset File Size % Changed
kcab.worker.CfRaXv_7.js 4.67 MB 0%

api

Total

Files count Total bundle size % Changed
2 3.88 MB 0%
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

Asset File Size % Changed
index.js 3.88 MB 0%
models.js 0 B 0%

cli

Total

Files count Total bundle size % Changed
1 8.02 MB 0%
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

Asset File Size % Changed
cli.js 8.02 MB 0%

crdt

Total

Files count Total bundle size % Changed
1 11.16 kB 0%
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

Asset File Size % Changed
index.js 11.16 kB 0%

congvc-bot[bot] added 3 commits October 6, 2026 05:07
Byte-identical port of bin/check-vietnamese.mts and
bin/__tests__/check-vietnamese.test.ts plus the check:i18n script from
79135d1 (#5, CHE-831).
Gate logic is unchanged; it is not merged into this stack.
…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).
@github-actions github-actions Bot added the AI generated PR authored with AI assistance label Oct 5, 2026
@autofix-troubleshooter

Copy link
Copy Markdown

Hi! I'm the autofix logoautofix.ci troubleshooter bot.

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! 😃

congvc-bot[bot] 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.
@congvc-bot-x99

Copy link
Copy Markdown
Author

Closing as orphan: linked issue CHE-831 is done, so no agent owns this PR. Branch kept; reopen if the work is still needed. Decided by Cheese on 30/10/2026 ICT (PR backlog cleanup, option A).

@congvc-bot-x99 congvc-bot-x99 Bot closed this Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

AI generated PR authored with AI assistance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant