Skip to content

The only downloader you need. 下载器的集大成者。

fix(i18n): Android 译文里的换行写成 \n

XiaoYouChR2f6f88ba3f1c
diff --git a/scripts/translate_i18n.py b/scripts/translate_i18n.py
index abf78d91..c5531eca 100644
--- a/scripts/translate_i18n.py
+++ b/scripts/translate_i18n.py
@@ -413,7 +413,7 @@ def escapeAndroidXml(text: str) -> str:
text = text.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
text = re.sub(r"(?<!\\)'", "\\'", text)
text = re.sub(r'(?<!\\)"', '\\"', text)
- return text
+ return text.replace("\n", "\\n")
def translateAndroidLocale(locale: str, localeName: str) -> None: