mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-01 04:07:14 +08:00
This change ensures that oneboxes, lightboxes are correctly generated for localized posts. The `PostLocalizer` was using `PrettyText.cook` directly, which does not perform all the necessary post-processing steps, such as onebox generation. This commit introduces a new `LocalizedCookedPostProcessor` class that is responsible for post-processing the cooked HTML of translated posts. This new class reuses the `CookedProcessorMixin` to gain access to the `post_process_oneboxes` method. The `PostLocalizer` is updated to use this new processor, ensuring that oneboxes are correctly generated in the translated content. --------- Co-authored-by: Nat <natalie.tay@discourse.org> |
||
|---|---|---|
| .. | ||
| fixtures | ||
| migrate | ||
| post_migrate | ||
| api_test_seeds.rb | ||