Skip to content

能否更新中文文档&zh_CN-kawaii.po编译错误 #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
negativegluon opened this issue May 31, 2025 · 2 comments
Closed

能否更新中文文档&zh_CN-kawaii.po编译错误 #44

negativegluon opened this issue May 31, 2025 · 2 comments

Comments

@negativegluon
Copy link

negativegluon commented May 31, 2025

1.中文readme中提及

将本仓库的 prebuilt 目录下的 gcc-zh.mo 放到

\usr\share\locale\zh_CN\LC_MESSAGES 目录下, 并将其重命名为 gcc.mo (建议先将原来的?>gcc.mo备份)

然而当前的main分支已经不存在prebuilt目录,能否更新这里的教程?

2.在使用如下python程序编译

import polib

po = polib.pofile('gcc.po')
po.save_as_mofile('gcc.mo')

时,出现报错,zh_CN-kawaii.po中含有大量形如

#: c/c-decl.cc:4644 c/c-decl.cc:4647
 c/c-decl.cc:4662 c/c-parser.cc:4973

的代码,使用上面的python程序时会发生报错,能否修复这一问题?
(似乎只需在下一行代码的开头加上#:便能修复)

@dabao1955
Copy link
Contributor

1.中文 readme已提及:

- 移动 `.mo` 文件

    - 您可以直接从 [Release](https://github.com/Bill-Haku/kawaii-gcc/releases) 下载;也可以自行重新编译,默认生成在 `build` 文件夹。

2..mo文件目前仅适用于 gettext(存疑)

@negativegluon
Copy link
Author

1.中文 readme已提及:

  • 移动 .mo 文件

    • 您可以直接从 Release 下载;也可以自行重新编译,默认生成在 build 文件夹。
      2..mo文件目前仅适用于 gettext(存疑)

感谢!
另外,加上#:后 .po文件确实能使用polib库编译!
比安装gettext方便多了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants