diff --git a/locale/README.md b/locale/README.md index 4d8ddc2..1f7cbba 100644 --- a/locale/README.md +++ b/locale/README.md @@ -1,5 +1,13 @@ -# 贡献指南 +# 翻译贡献指南 * 如果想要贡献支持更多语言,请参考 `zh_CN` 与 `en_US` 的文件夹层级结构,复制 `locale/zh_CN/LC_MESSAGES/xhs.po` 文件并编辑翻译。 * 如果想要贡献改进翻译结果,请直接编辑 `xhs.po` 文件内容。 * 不需要提交 `xhs.mo` 文件,提交 `xhs.po` 文件后,作者会转换格式并合并。 + +# Translation Contribution Guide + +* If you want to contribute by supporting more languages, please refer to the folder structure of `zh_CN` and `en_US`, + copy the `locale/zh_CN/LC_MESSAGES/xhs.po` file, and edit the translation. +* If you want to contribute by improving the translation results, please edit the content of the `xhs.po` file directly. +* There is no need to submit the `xhs.mo` file; after submitting the `xhs.po` file, the author will convert the format + and merge it. diff --git a/locale/en_US/LC_MESSAGES/xhs.mo b/locale/en_US/LC_MESSAGES/xhs.mo index 3b7c05e..fb15d99 100644 Binary files a/locale/en_US/LC_MESSAGES/xhs.mo and b/locale/en_US/LC_MESSAGES/xhs.mo differ diff --git a/locale/en_US/LC_MESSAGES/xhs.po b/locale/en_US/LC_MESSAGES/xhs.po index 97fcc71..dcbee7b 100644 --- a/locale/en_US/LC_MESSAGES/xhs.po +++ b/locale/en_US/LC_MESSAGES/xhs.po @@ -1,7 +1,13 @@ msgid "" msgstr "" +"Project-Id-Version: XHS-Downloader 2.4\n" +"PO-Revision-Date: 2024-12-15 11:00+0800\n" +"Last-Translator: JoeanAmier \n" +"Language-Team: English (US) \n" +"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Language: en_GB\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en_US\n" msgid "免责声明\n" msgstr "Disclaimer about XHS-Downloader:\n" diff --git a/locale/po_to_mo.py b/locale/po_to_mo.py index 0efc9f2..729e1f8 100644 --- a/locale/po_to_mo.py +++ b/locale/po_to_mo.py @@ -19,7 +19,7 @@ def generate_map(files: list[Path]): def generate_mo(maps: list[tuple[Path, Path]]): for i, j in maps: - command = f"msgfmt \"{i}\" -o \"{j}\"" + command = f"msgfmt --check -o \"{j}\" \"{i}\"" print(run(command, shell=True, text=True)) diff --git a/locale/zh_CN/LC_MESSAGES/xhs.mo b/locale/zh_CN/LC_MESSAGES/xhs.mo index cabca77..cbf76c9 100644 Binary files a/locale/zh_CN/LC_MESSAGES/xhs.mo and b/locale/zh_CN/LC_MESSAGES/xhs.mo differ diff --git a/locale/zh_CN/LC_MESSAGES/xhs.po b/locale/zh_CN/LC_MESSAGES/xhs.po index b283b9c..4c677d5 100644 --- a/locale/zh_CN/LC_MESSAGES/xhs.po +++ b/locale/zh_CN/LC_MESSAGES/xhs.po @@ -1,6 +1,12 @@ msgid "" msgstr "" +"Project-Id-Version: XHS-Downloader 2.4\n" +"PO-Revision-Date: 2024-12-15 11:00+0800\n" +"Last-Translator: JoeanAmier \n" +"Language-Team: Chinese (Simplified) \n" +"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" "Language: zh_CN\n" msgid "免责声明\n"