Skip to content

fix(i18n): translate the Sales Home tab labels and the two public-form titles; en carries the approval flow names (#2284) - #2289

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2284-locale-rows
Oct 25, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2284-locale-rows

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #2284

What changed

Row Status on main before this PR Change
1. Approval flow and step names zh-CN / ja-JP / es-ES already translated flows.<flow>.label and flows.<flow>.approvals.<node>.label for all six approval flows (landed in #2274 with the 18.1.0 bump) en pack now carries the same keys with the source wording (new flows block in src/sales/translations/en/app.ts)
2. Sales Home tab labels The three page:tabs items had no value, so 18.1.0 emits no key (pageTabItemKey returns undefined, and the item gets no slot) Each item gets value (my_leads, my_open_deals, my_open_tasks: the ?tab= token, the key of the view it embeds); all four packs carry pages.sales_home_page.components.home_tabs.items.<value>.label, worded as the pack already words the embedded view
3. Public form titles web_to_lead / web_to_case authored no title; translateFormTitle translates only an authored title, so there was nothing to translate Each form authors a title (Contact Us, Contact Support); all four packs carry objects.<o>._views.<view>.title (zh-CN 联系我们 / 联系支持团队, ja-JP お問い合わせ / サポートへのお問い合わせ, es-ES Contáctenos / Contactar con Soporte)

Metadata touched only where a key must be declared: src/sales/pages/home.page.ts (three values), src/sales/views/lead.view.ts and src/service/views/case.view.ts (one title each).

Pin. test/i18n-references.test.ts gets a describe block that holds the source half lint cannot see: if a tab item loses its value or a form loses its title, the key disappears and lint stays green. The block asserts both authoring facts and the key in every locale. The existing _views orphan guard now counts a named formViews key as shipped, because the form title is keyed under it.

Changeset: .changeset/2284-locale-rows.md (patch).

Measurement (installed @objectstack/* 18.1.0)

os i18n check pnpm lint (os lint --strict)
Before (main) 1691/1691 keys, 0 missing, exit 0. Rows 2 and 3 were not reported, because no key existed for them exit 0, 0 i18n warnings
Metadata slots added, packs not yet 15 warnings (5 keys × zh-CN/ja-JP/es-ES) exit 1: i18n/missing-page ×9, i18n/missing-view ×6
After 1696/1696, 0 missing, exit 0 exit 0, 0 i18n warnings
Ablation: one key per row removed (zh-CN opportunity_approval.approvals.manager_review, ja-JP home_tabs.items.my_open_deals, es-ES crm_case._views.web_to_case.title) exit 1: i18n/missing-flow, i18n/missing-page, i18n/missing-view
Ablation: value removed from one tab, title from web_to_case new pin goes red on both tests

Platform halves read in the installed packages: cli/dist/utils/i18n-extract.js (approval flows.*.approvals.*.label, page:tabs items by value, pushContainerFormTitles), spec translateView / translateFormTitle / translatePageTabItems, and rest GET /forms/:slug, which translates the matched view through translateMetadataDocument('view', …) and sends Vary: Accept-Language. All of them behave as the card says. The card's measurement (that a key is reported missing) only holds once the source declares the slot.

Verify

Stages run separately on 0e48756: validate 0 · typecheck 0 · lint 0 · hygiene 0 · hygiene:tokens 0 · build 0 · test (--maxWorkers=2) 0: 221 files, 4362 passed, 1 skipped

Findings

  • Row 1 had already shipped in fix: store the nine record titles so an export imports back, on ObjectStack 18.1.0 (#2230) #2274. This PR only adds the en copy.
  • The card's measurement premise was off for rows 2 and 3. On main, neither tool reported these as missing, because the source authored no slot (no tab value, no form title). Platform behaviour matches the cards: the fix was to declare the slot.
  • The docs keep the tab name My Open Tasks in English on the zh-Hans/zh-Hant pages. That is consistent with AGENTS rule 6, which keeps English for pack-carried nouns other than list view names, so no docs change was made.

🤖 Generated with Claude Code

https://claude.ai/code/session_014xanhPEmGTMTfVH4UokwJT

…m titles (#2284)

The Sales Home page:tabs items now carry a value (the ?tab= token and
the key pages.sales_home_page.components.home_tabs.items.<value>.label
is read under), and web_to_lead / web_to_case author a title, which
GET /forms/:slug serves translated from objects.<o>._views.<view>.title.
All four packs carry the five new keys; en also carries the approval
flow and step labels the other three packs already translate.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014xanhPEmGTMTfVH4UokwJT
… add changeset (#2284)

os lint --strict reports a missing locale key for each row, but not the
source slot going: a tab item without a value, or a form without a
title, makes the key vanish. The pin holds both authoring facts and the
key in every locale. The _views orphan guard now counts a named form
view as shipped, since its title is keyed under _views.<key>.title.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014xanhPEmGTMTfVH4UokwJT
@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
hotcrm Ignored Ignored Oct 25, 2026 10:49am UTC

Request Review

@github-actions github-actions Bot added ci/cd CI plumbing and the verification pipeline metadata Declarative metadata — schema, security posture, UI surfaces labels Oct 25, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · repo:hotcrm seat 1 · os-elon-musk · session session_014xanhPEmGTMTfVH4UokwJT · 2026-10-25T11:05Z · head 0e4875693e91f35f95f8a93048b3a4749e35f8b6

Contract review of hotcrm#2284 against its Done when and the claim (6396462232).

check reading
Shape Draft → main, 17 files. Fixes #2284 sits next to its card. No governed path. Every file is in the claim's surface: the locale packs, the three metadata sites where a key had to be declared, the i18n test, the changeset.
Row 1, approval names Already translated in zh-CN, ja-JP and es-ES on main (landed with #2274). This PR adds only the en source flows block.
Row 2, Sales Home tabs The three tab items gain a value equal to the view key they embed. items.<value>.label is added in all four packs, and each uses the term its pack already uses for that view.
Row 3, public forms web_to_lead gets the title "Contact Us" and web_to_case gets "Contact Support". _views.<view>.title is added in all four packs.
Measured on 18.1.0 On main, both os i18n check and os lint were silent, because the slots were never declared. With the metadata added and no keys yet, lint exits 1 (9 i18n/missing-page + 6 i18n/missing-view). After the fix, 1696/1696 and exit 0. Ablation: one key removed per row turns lint red. Removing the declarations instead turns the new pin in test/i18n-references.test.ts red.
Gates on this head All 9 check-runs success on 0e48756. mergeable_state: clean.

Acceptance notes

  • The card said lint would report the keys missing. On main it did not, because the declarations were absent. The dev added the declarations, which is the fix the card's platform halves expect, so the card's premise holds.
  • A tab value also becomes the ?tab= URL token. No pinned link or doc used an index-based tab URL, so nothing to migrate.

Landing authority: the maintainer's standing word in the seat thread, 「后续你按照pm-dispatch 规则审核通过的issue都可以落地」 (2026-10-23T13:14Z). Landing: pr_ready then automerge_enable through the relay; the merge queue squashes.


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 25, 2026 11:06
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit 8f52859 Oct 25, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI plumbing and the verification pipeline metadata Declarative metadata — schema, security posture, UI surfaces

Projects

None yet

1 participant