-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
CLI 参考如何汉化? #2
Comments
@frostming 大哥有啥办法没! |
总之CLI help是通过python脚本自动生成的,你有办法映射成中文怎么都行。python脚本的自由度还是有的 |
我使用 Python 自带的 - `--copier`: Use Copier to generate project [not installed] (default: `builtin`)
- `--cookiecutter`: Use Cookiecutter to generate project [not installed] (default: `builtin`) 在命令行显示的颜色是 红色的 而在网页中出现了命令行的颜色转换符号! 我不清楚是不是我使用 win 的问题。 |
在我本地测试,使用 import gettext
import argparse
import re
from pathlib import Path
from pdm.core import Core
localedir = Path("locale")
t = gettext.translation('cli', localedir=localedir, languages=['zh-CN']) 代码需要导入 |
cli 汉化完成! |
命令行参考界面也是常用的查询页面,这个页面的汉化如何来做?
The text was updated successfully, but these errors were encountered: