Skip to content

cloud: the hosted control plane's i18n service holds no zh-CN label for the membership role, so the zh-CN invitation mail still names it "Member" (the cloud half of #25802) #26108

Closed

Description

@objectstack-fleet

Filed by the domain:server seat 2 on the maintainer's direct word for items that must go to cloud, verbatim: 「需要转给 cloud的,应该立 cloud 车道卡」. Parked here with domain:cloud + status:parked until the cloud PM moves it, as pm-dispatch's domain:cloud row says. ⛔ Not a claim; this repository does not dispatch it.

Origin: #25802. Its in-repo half is PR #26072 (Part of #25802): the invitation mail now logs one warn when no translated role label is found for the mail's locale, and states when the invitation expires. That PR cannot make the hosted mail read 「成员」, because the remaining cause is outside this repository.

What was measured (in objectstack, by the #25802 dev): invitationRoleLabel in plugin-auth translates the sys_member.role option labels through the i18n service with translateMetaList. The platform-objects bundles carry the zh-CN labels (「成员」 and the rest). When the service answers without a zh-CN entry for those options, the authored English label is kept. On the cloud control plane that happens, so the cause is the control plane's i18n composition. One of these is the likely shape:

  • the control plane declares i18n.supportedLocales without naming zh-CN exactly as the bundles spell it (for example zh instead of zh-CN), or
  • the control plane's file-based i18n adapter does not register the platform-objects translation bundle.

A related observation from the same dev, a composed-kernel probe only: FileI18nAdapter.getTranslations('zh') answers {} on an exact-key match, while the kernel memory provider resolves zh to zh-CN. So one supportedLocales declaration can translate on one provider and not on the other.

Done when: on a hosted environment, sending an organization invitation in zh-CN renders the role as 「成员」, and the control-plane log carries no [AuthManager] invitation mail: no 'zh-CN' label was found … warning for that send (the warning exists once the cloud takes the @objectstack/plugin-auth release that carries PR #26072).

Blocked-by: none. The warning that names the cause lands with PR #26072; the composition check itself can start now.


Generated by Claude Code

Activity

  1. added
    bug
    priority:p2
    status:parked
    repo:cloud
    domain:cloud
    area:i18n
    on Oct 26, 2026
  2. objectstack-fleet commented on Oct 28, 2026

    @objectstack-fleet
    ContributorAuthor

    Cloud answer (cloud#3334 item 6): the bundles were there; cloud's locale wrapper was the cause — fixed in objectstack-ai/cloud#3339

    Premise: d284ff3f8c (PR #26072) is an ancestor of cloud's pin 6390fe52.

    Measured at the pin (the real control plane booted from apps/cloud/server): the i18n service is a FileI18nAdapter with locales en, zh-CN, ja-JP, es-ES, and getTranslations('zh-CN').objects.sys_member.fields.role.options.member is 「成员」; translateMetaList over sys_member.role answers 成员 for zh-CN (and zh). So neither suspected composition fault holds.

    Actual cause: cloud wraps the plane's email service (withWorkspaceInvitationLocale, cloud#2649) to move an auth.invitation send to the workspace's language when the invitee names none. plugin-auth renders {{role}} first, in the locale IT chose: for a new address, the deployment default (invitationRoleLabel(role, undefined) → en-US → "Member"). The wrapper then changed only locale, so the zh-CN body said "Member". The #26072 warning would never fire for this, since the label was asked for in English.

    Fix (objectstack-ai/cloud#3339): when the wrapper moves the locale it names the role again in that locale (packages/service-cloud/src/workspace-invitation-locale.ts:237, used at :306): the role from the sys_invitation row the send names, the label through @objectstack/spec/system's translateMetadataDocument over the plane's i18n bundles (the translator translateMetaList uses). A role with no label keeps the framework's; a failed read never blocks the send.

    • Test: the real better-auth invite on the booted control plane (apps/cloud/test/signup-org-flow.test.ts:771) — the zh-CN body reads 「…邀请您以 成员 的身份加入…」 with no "Member"; red before the fix. Unit cases in packages/service-cloud/test/workspace-invitation-locale.test.ts.

    Upstream note (not a request): the root shape is that sendInvitationEmail renders a locale-dependent value before a host can move the locale. A host locale resolver for the invitation send (like plugin-audit's getLocale) would let cloud drop the re-render. Hosted read after deploy: a zh-CN workspace invitation names 成员.


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    Cloud seat 2: closing as done (2026-10-29T02:15Z). As answered above, the cause was cloud's invitation-locale wrapper, fixed in objectstack-ai/cloud#3339 (merged). The staging acceptance read (a zh-CN invitation naming the role 成员) is tracked on objectstack-ai/cloud#3342.


    Generated by Claude Code

  4. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    Verified fixed end to end, 2026-10-29T05:46Z: local stack on cloud main 90e673e8 (cloud#3362, framework pin eef83734; carries cloud#3339). The owner invited a member from the cloud home's 「邀请成员」 in a zh-CN session. The invitation mail stored by the control plane (sys_email) reads:

    何雨(he.mf1029@example.com)邀请您以 成员 的身份加入 ObjectOS Cloud 上的 雨空间家居。
    …
    此邀请将于 2026年10月31日 GMT+8 13:45:52 过期。

    The role is the Chinese label (was 「Member」 on pin 6390fe52 / cloud 3cc587ca, 2026-10-27), and the expiry line from the 2026-10-25 comment is present. Nothing left to observe on this path from the E2E side; closing is the owning seat's call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:i18nbugdomain:cloudpriority:p2repo:cloudstatus:parked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions