"""安全宣贯 (security awareness) 通知模板。 两个 key,不是一个带 flag 的 key —— 因为它们被分到**不同的通知类别**, 而那个分类决定员工能不能把推送关掉: * ``security_awareness.campaign.mandatory`` → ``CAT_SECURITY`` (不可关、action 桶、驱动红点)。必修宣贯有 due date、进待办、算覆盖率。 * ``security_awareness.campaign.notice`` → ``CAT_AWARENESS`` (可关、**info 桶**、不驱动红点)。运营触达就是运营触达,一份漫画不该 制造紧迫感。 合成一个 key 会让每一条宣贯推送都变成关不掉的 —— 而那正是一个渠道被静音 的方式,之后连必修的那些也没人读了。 `{material_title}` 是**素材自己那一语言的标题**,由调用点按收件人语言解析 后放进 context(素材的三语内容在 `secaw_materials.localized` 里,语言由 `security_awareness.service.pick_block` 一处决定)。所以正文里的散文是三 语的,而嵌进去的标题是「这个人实际会读到的那一版」的标题 —— 两者一致, 不会出现英文正文里嵌一个中文标题然后落地页又是英文的情况。 `{due_label}` 只有必修那条用。`{minutes_label}` 是「约 N 分钟」或空串 (外链素材没有时长,而编一个数字会连带毁掉页面上其它数字的可信度)。 """ from __future__ import annotations TEMPLATES: dict[str, dict[str, str]] = { # ── 必修 ──────────────────────────────────────────────────────── # 语气:陈述这是公司要求 + 明确要做什么 + 明确截止。不威胁,也不假装 # 是可选的 —— 假装可选然后又催办,是最招人烦的组合。 "security_awareness.campaign.mandatory": { "subject": "安全宣贯(必读):{material_title}", "subject_en": "Required security reading: {material_title}", "subject_ja": "必読のセキュリティ資料:{material_title}", "body_text": ( "按公司安全合规要求,这份材料需要每位同事阅读并确认。\n\n" "[b]{material_title}[/b]{minutes_label}\n\n" "{summary_line}" "请在 [r]{due_label}[/r] 前读完并点「我已阅读并理解」—— " "确认会记进合规台账,没有其它要填的东西。\n\n" "{cta_line}\n\n" "— Helix IT 平台" ), "body_text_en": ( "Company security and compliance ask every colleague to read " "and confirm this material.\n\n" "[b]{material_title}[/b]{minutes_label}\n\n" "{summary_line}" "Please finish it and press \"I have read and understood\" " "before [r]{due_label}[/r] — the confirmation goes into the " "compliance record, and there is nothing else to fill in.\n\n" "{cta_line}\n\n" "— Helix IT Platform" ), "body_text_ja": ( "社内のセキュリティおよびコンプライアンス要件により、" "この資料は全員が読んで確認する必要があります。\n\n" "[b]{material_title}[/b]{minutes_label}\n\n" "{summary_line}" "[r]{due_label}[/r] までにお読みいただき、" "「読んで理解しました」を押してください。" "確認はコンプライアンス記録に残ります。" "他に記入いただくものはありません。\n\n" "{cta_line}\n\n" "— Helix IT プラットフォーム" ), "card_button_label": "去阅读并确认", "card_button_label_en": "Read and confirm", "card_button_label_ja": "読んで確認する", }, # ── 运营 ──────────────────────────────────────────────────────── # 语气:分享,不是派活。没有截止、没有「请确认」、没有红点。它唯一的 # 任务是让人愿意点开;做不到就该被关掉,而员工确实可以关掉它。 # ── 催办 ──────────────────────────────────────────────────────── # 语气:提醒,不指责。这个人可能只是忘了 —— 大多数确实是。文案里 # 明确说「几分钟就能读完」,因为催办的第一个作用是降低下一步的门槛, # 不是施压。逾期与未逾期用同一个 key,差别在调用点预渲染的 # `{overdue_line}`(一整句话按状态不同,占位符做不到条件缺席)。 "security_awareness.campaign.reminder": { "subject": "还差一步:{material_title}", "subject_en": "One step left: {material_title}", "subject_ja": "あと一歩:{material_title}", "body_text": ( "这份必读材料你还没确认。{overdue_line}\n\n" "[b]{material_title}[/b]\n\n" "读完点一下「我已阅读并理解」就完成了,几分钟的事。\n\n" "{cta_line}\n\n" "— Helix IT 平台" ), "body_text_en": ( "You have not confirmed this required reading yet. " "{overdue_line}\n\n" "[b]{material_title}[/b]\n\n" "Read it and press \"I have read and understood\" — that is " "the whole thing, and it takes a few minutes.\n\n" "{cta_line}\n\n" "— Helix IT Platform" ), "body_text_ja": ( "この必読資料がまだ未確認です。{overdue_line}\n\n" "[b]{material_title}[/b]\n\n" "お読みいただき「読んで理解しました」を押すだけで完了です。" "数分で終わります。\n\n" "{cta_line}\n\n" "— Helix IT プラットフォーム" ), "card_button_label": "去阅读并确认", "card_button_label_en": "Read and confirm", "card_button_label_ja": "読んで確認する", }, # 主管摘要。**一张卡列全部下属**,不是一人一张 —— 把九十个别人的待办 # 丢给五个管理员「produced a chase queue and moved no decisions」,这个 # 判断本仓已经下过一次。语气是告知情况,不是派活:主管能做的是提一句, # 不是替下属点按钮。 "security_awareness.campaign.manager_digest": { "subject": "你的下属还有 {pending_count} 人没确认安全宣贯", "subject_en": ( "{pending_count} of your reports have not confirmed security " "reading" ), "subject_ja": "部下 {pending_count} 名がセキュリティ資料を未確認です", "body_text": ( "「{campaign_name}」发出三周了,你的下属里还有 " "[b]{pending_count}[/b] 人没有确认阅读 [b]{material_title}[/b]。\n\n" "这条只是让你知道,不需要你替他们做任何事 —— 下次一对一时提一句" "通常就够了。\n\n" "{cta_line}\n\n" "— Helix IT 平台" ), "body_text_en": ( "\"{campaign_name}\" went out three weeks ago and " "[b]{pending_count}[/b] of your reports have still not confirmed " "reading [b]{material_title}[/b].\n\n" "This is for your awareness — there is nothing for you to do on " "their behalf. A word at your next one-to-one is usually " "enough.\n\n" "{cta_line}\n\n" "— Helix IT Platform" ), "body_text_ja": ( "「{campaign_name}」の配信から 3 週間が経ちましたが、部下のうち " "[b]{pending_count}[/b] 名が [b]{material_title}[/b] を未確認です。" "\n\n" "これはご参考までのお知らせで、代わりに対応いただく必要はありま" "せん。次回の 1on1 で一言お伝えいただければ十分です。\n\n" "{cta_line}\n\n" "— Helix IT プラットフォーム" ), "card_button_label": "看看材料", "card_button_label_en": "See the material", "card_button_label_ja": "資料を見る", }, "security_awareness.campaign.notice": { "subject": "安全小知识:{material_title}", "subject_en": "Security note: {material_title}", "subject_ja": "セキュリティのひとこと:{material_title}", "body_text": ( "[b]{material_title}[/b]{minutes_label}\n\n" "{summary_line}" "这条不需要你回复或确认,读到就好。\n\n" "{cta_line}\n\n" "— Helix IT 平台" ), "body_text_en": ( "[b]{material_title}[/b]{minutes_label}\n\n" "{summary_line}" "Nothing to reply to or confirm — reading it is the whole " "ask.\n\n" "{cta_line}\n\n" "— Helix IT Platform" ), "body_text_ja": ( "[b]{material_title}[/b]{minutes_label}\n\n" "{summary_line}" "返信や確認は不要です。目を通していただければ十分です。\n\n" "{cta_line}\n\n" "— Helix IT プラットフォーム" ), "card_button_label": "看一下", "card_button_label_en": "Take a look", "card_button_label_ja": "見てみる", }, }