# 本地化/翻译后的帖子内容会跳过附属链接重写（以及任何 post\_process\_cooked 钩子）

**URL:** https://meta.discourse.org/t/affiliate-link-rewriting-and-any-post-process-cooked-hook-is-skipped-for-localized-translated-post-content/407688
**Category:** Bug
**Tags:** affiliate, fixed, content-localization
**Created:** [2026年七月15日 12:44 UTC](https://meta.discourse.org/t/affiliate-link-rewriting-and-any-post-process-cooked-hook-is-skipped-for-localized-translated-post-content/407688 "2026-07-15T12:44:17Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2026年七月16日 12:45 UTC](https://meta.discourse.org/t/affiliate-link-rewriting-and-any-post-process-cooked-hook-is-skipped-for-localized-translated-post-content/407688/3 "2026-07-16T12:45:28Z")

</div>

感谢报告 @Overgrow 👍 将由以下链接修复

> <https://github.com/discourse/discourse/pull/41770>
>
> Previously, affiliate link rewriting only ran via the \`:post\_process\_cooked\` eve…nt, which fires exclusively when baking a post's original cooked HTML — so readers viewing a translated post were served untagged links.
> 
> This change subscribes the same rewrite to the \`:post\_process\_localized\_cooked\` event fired by \`LocalizedCookedPostProcessor\`, so translated posts get affiliate links too. Existing localizations pick up the tags on their next rebake, since the recook path re-runs the localized post processor.
> 
> Reported at https://meta.discourse.org/t/407688

---

_[View the full topic](https://meta.discourse.org/t/affiliate-link-rewriting-and-any-post-process-cooked-hook-is-skipped-for-localized-translated-post-content/407688)._
