# 引用文本在翻译时应清除格式

**URL:** https://meta.discourse.org/t/quoted-text-should-be-scrubbed-of-formatting-when-translated/122823
**Category:** Bug
**Tags:** pr-welcome, translator
**Created:** [2019年七月12日 18:28 UTC](https://meta.discourse.org/t/quoted-text-should-be-scrubbed-of-formatting-when-translated/122823 "2019-07-12T18:28:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dschaper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dschaper/32/209535_2.png) [@dschaper](https://meta.discourse.org/u/dschaper)
#### Post date: [2019年七月12日 18:28 UTC](https://meta.discourse.org/t/quoted-text-should-be-scrubbed-of-formatting-when-translated/122823/1 "2019-07-12T18:28:03Z")

</div>

discourse-translator 0.2.0  
discourse v2.4.0.beta1 +234  
Microsoft API

当待翻译的帖子包含引用时，似乎会将包括格式在内的原始文本发送到 API。这会导致插件功能失效。

> **[Alles blocken und mit whitlist arbeiten](https://discourse.pi-hole.net/t/alles-blocken-und-mit-whitlist-arbeiten/20788/7)**
>
> Das geht leider nicht, viele haben so einiges an Änderungen eingearbeitet, dass ein automatisches Aktualisieren in einem irgendwo mittendrin abgebrochenen Prozess endet und das ganze Pi-hole nicht mehr funktioniert. Wir hatten in der...

 ![Annotation%202019-07-12%20112619](https://global.discourse-cdn.com/meta/original/3X/0/a/0a09630cff398647109cfbf01b989fc360d95088.jpeg)

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [2019年十月8日 17:51 UTC](https://meta.discourse.org/t/quoted-text-should-be-scrubbed-of-formatting-when-translated/122823/2 "2019-10-08T17:51:58Z")

</div>

那么这个问题的状态如何？

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2019年十月14日 01:20 UTC](https://meta.discourse.org/t/quoted-text-should-be-scrubbed-of-formatting-when-translated/122823/3 "2019-10-14T01:20:25Z")

</div>

尚未修复，但我希望这个问题能得到改进。

正确的处理流程有点棘手。

我们需要将各种块（如引用块、代码块）“提升”出来，然后移除 HTML 标签，进行翻译，最后再重建 HTML。

我估计彻底修复这个问题需要几天时间。

@codinghorror 你是希望我们直接处理这个，还是仅仅标记为“欢迎提交 PR”？

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2019年十月14日 01:29 UTC](https://meta.discourse.org/t/quoted-text-should-be-scrubbed-of-formatting-when-translated/122823/4 "2019-10-14T01:29:42Z")

</div>

#pr-welcome 用于此目的即可

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2023年六月18日 16:21 UTC](https://meta.discourse.org/t/quoted-text-should-be-scrubbed-of-formatting-when-translated/122823/5 "2023-06-18T16:21:17Z")

</div>


