Repository navigation
fix(marketing): refuse a campaign that is not open in one sentence per locale at every door (#2778) - #2779
Merged
Conversation
…r locale at every door (#2778) In zh-CN and ja-JP the enrollment gate hook (New on a campaign's member list, import, REST) and the Add to Campaign / Enroll Members flows each translated the "not open for enrollment" refusal in their own words, so a user read two different sentences for one rule. The flow rows now carry the hook row's sentence; Enroll Members keeps its own subject ("this campaign"). English and es-ES already matched and are unchanged, as is every flow, hook and object. The Chinese marketing manual's line about Enroll Members uses the same word, and the direct-create gates test now reads each shipped pack and asks every flow row to be the hook's row.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Collaborator
Author
|
Seat record · 独立评审 · head 独立评审(只读子代理,未参与改动)结论:通过(有 nit)。Metadata-impact 同意
Findings
其他:issue 点名的三个入口(新建/导入/REST、加入营销活动、批量加入成员)均覆盖,四语每入口一整句;站点文档不引用这句,无需改; |
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.
Description
Fixes #2778
A campaign that is not open for enrollment was refused in two different sentences in zh-CN and ja-JP, depending on which door refused: the
campaign_member_enrollment_gatehook (New on a campaign's member list, import, REST) said one thing, the Add to Campaign flows and the Enroll Members flow said another. English and es-ES already read as one sentence. This makes the flow rows carry the hook row's sentence in both locales and pins the three rows together with a test.Metadata-impact: reviewer
Translations, one line of the Chinese in-app manual, a test and a changeset. No flow, hook or object behaviour changes, and no English string changes.
Before and after
zh-CN
hooks.campaign_member_enrollment_gate.refusals.VALIDATION_FAILED.reasons.named{{campaign}}未开放报名,或已不存在:只有“规划中”或“进行中”的营销活动可以加入成员。没有人被加入。flows.campaign_lead_member_enroll/campaign_contact_member_enroll.refusals.refuse_campaign_not_open{{ campaignRecord.name | default: "所选营销活动" }} 不在可加入成员的状态,或已不存在:只有处于「规划中」或「进行中」的营销活动可以加入成员。没有任何人被加入。{{ campaignRecord.name | default: "所选营销活动" }}未开放报名,或已不存在:只有“规划中”或“进行中”的营销活动可以加入成员。没有人被加入。flows.campaign_enrollment.refusals.refuse_not_open该营销活动不在可加入成员的状态,或已不存在:只有处于「规划中」或「进行中」的营销活动可以加入成员。没有任何人被加入。这个营销活动未开放报名,或已不存在:只有“规划中”或“进行中”的营销活动可以加入成员。没有人被加入。ja-JP
named){{campaign}}は参加受付中ではないか、すでに存在しません。メンバーを追加できるのは「計画中」または「実施中」のキャンペーンだけです。誰も追加されていません。{{ campaignRecord.name | default: "選択したキャンペーン" }} はメンバー登録を受け付けていないか、すでに存在しません。メンバーを登録できるのは「計画中」または「実施中」のキャンペーンだけです。誰も登録されていません。{{ campaignRecord.name | default: "選択したキャンペーン" }}は参加受付中ではないか、すでに存在しません。メンバーを追加できるのは「計画中」または「実施中」のキャンペーンだけです。誰も追加されていません。このキャンペーンはメンバー登録を受け付けていないか、すでに存在しません。メンバーを登録できるのは「計画中」または「実施中」のキャンペーンだけです。誰も登録されていません。このキャンペーンは参加受付中ではないか、すでに存在しません。メンバーを追加できるのは「計画中」または「実施中」のキャンペーンだけです。誰も追加されていません。es-ES and English: already one sentence at all three doors; not touched.
Choices worth a reviewer's eye
“ ”, as the other hook refusals in this pack do (campaign_validationsays“进行中”).该营销活动to这个营销活动, the form the hook's sibling rows use for "this lead / this contact" (这个线索,这个联系人). Everything after the subject is the hook's row.src/marketing/docs/crm_marketing_automation.zh.mddescribed Enroll Members refusing with the old phrase (活动已不在可加入成员的状态时); it now says活动已不再开放报名时, which is also closer to its English twin ("If the campaign is no longer open"). The docs site (content/docs/**, zh-Hans and zh-Hant) states the rule in its own words and does not quote the refusal, so it needs no change; the What's New pages are historical and left alone. There are no Japanese docs.Testing
test/campaign-member-direct-create-gates.test.tsgains a block that reads each shipped pack (zh-CN, ja-JP, es-ES) and asks, per locale: each Add to Campaign row, with{{ campaignRecord.name | default: "…" }}put as{{campaign}}, is the hook'snamedrow; the same row with the filter's default substituted is the hook's bare message; and the Enroll Members row ends with everything the hook says after the name, with a worded subject and no interpolation.main's strings the block fails 4 tests (zh-CN and ja-JP, both assertions) and es-ES stays green; with this change all 25 tests in the file pass.pnpm verifyis green locally (332 test files, 6395 tests). Two of the review's nits were applied after that run (a comment, a function replacer in the test, one sentence of the changeset);pnpm typecheck,pnpm hygieneand the test file were run again after them and pass.src/andtest/were merged three-way into this tree (git merge-file, no conflicts in any of the eight), andtest/campaign-member-direct-create-gates.test.tsplustest/campaign-enrollment-gates.test.tspass on the result (52 tests), withtsc --noEmitclean.Relation to #2777
#2777 (opt-out refusal, #2774) is open and touches the same three packs, the same manual page and the same test file. This PR is based on
mainand written to merge with it either way round (tried, see Testing): the pack and manual edits are on different lines, the test file's import line is changed to the same text #2777 changes it to, and the new block sits at the end of the file with its own constants inside itsdescribe.Review record
Independent read-only review by a fresh agent that had not read the author's conclusion (it was given the issue and the working-tree diff, and told to judge the
Metadata-impactclass itself).Verdict: no must-fix and no should-fix findings.
Metadata-impact: revieweris correct: the diff is translations, one manual line, a test and a changeset; no hook, flow, object, permission, sharing rule, seed or validation is touched, and no governed path.Reviewer's conclusion (the issue author's name is left out here):
pnpm verify或 vitest,只在内存中对语言包源文本模拟了新断言;未在浏览器中看实际渲染;未与 fix(marketing): one wording for Email Opt Out and its enrollment refusal at both doors (#2774) #2777 实际合并,只按 hunk 行号推断无冲突;日文未经母语者审读;未核对中文文档的术语守卫测试是否接受新的一行。Of what the review did not verify, the author's runs cover three (see Testing):
pnpm verifyand vitest, the actual merge with #2777, and the docs guards, which are part ofpnpm verify. Still open: no browser check, and the Japanese has not been read by a native speaker.Nits and what was done with them
不再开放报名brings 报名 into a page that otherwise says 加入;不再开放would mirror the English. Kept: it is the word the refusal itself now uses at every door, which is what the line describes.end_refusedrow uses both).该营销活动→这个营销活动while another row in the pack still says该. Kept: predates this change, and fix(marketing): one wording for Email Opt Out and its enrollment refusal at both doors (#2774) #2777 moves the same way.row.replace(NAME, fallback!)would expand a$&in a default name. Fixed: the replacement is now a function.