Skip to content
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

【建议】项目源代码本身使用中文? #12

Open
KindRoach opened this issue Nov 25, 2020 · 2 comments
Open

【建议】项目源代码本身使用中文? #12

KindRoach opened this issue Nov 25, 2020 · 2 comments
Labels

Comments

@KindRoach
Copy link

考虑到维护本项目的程序员必然会使用中文,那么项目代码是否也可以中文?诸如类名、变量名、方法名等等
好作为一个使用中文编程的样例,下面是一个例子:
image

@KindRoach KindRoach added the bug Something isn't working label Nov 25, 2020
@tuchg tuchg removed the bug Something isn't working label Nov 25, 2020
@tuchg
Copy link
Owner

tuchg commented Nov 25, 2020

暂时没有过多这方面需求,所以没有考虑引入

如果你有兴趣转化,欢迎pr

@nobodxbodon
Copy link
Collaborator

@KindRoach 支持,同功能的 vsc 插件已用了中文命名。之前尝试过中文化 vue 源码,一些个人建议:

  • 中文化过程中确保自动测试通过(看到这里一个测试用例文件)
  • 可以按类、API、枚举、局部变量等”自大向小“的顺序逐步中文化,也方便理解整体逻辑
  • 可分为多个 commit,如发现问题方便定位
  • 一些带中文注释的标识符可以参考注释进行命名,如“笛卡尔积缓存”:

val CARTESIAN_CACHE: MutableMap<String, Array<String>> = ContainerUtil.createSoftValueMap()

@tuchg tuchg added the 建议 label Nov 28, 2020
nobodxbodon pushed a commit to program-in-chinese/ChinesePinyin-CodeCompletionHelper that referenced this issue Dec 22, 2020
tuchg added a commit that referenced this issue Dec 22, 2020
#12 对测试进行部分中文化,添加断言;添加开发说明
@tuchg tuchg added this to 低先级 in 任务看板 May 21, 2021
@tuchg tuchg moved this from 低先级 to 未来规划 in 任务看板 May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
任务看板
计划中
Development

No branches or pull requests

3 participants