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

json格式的字典怎么编辑 #153

Closed
wetery opened this issue Oct 28, 2021 · 7 comments
Closed

json格式的字典怎么编辑 #153

wetery opened this issue Oct 28, 2021 · 7 comments

Comments

@wetery
Copy link
Contributor

wetery commented Oct 28, 2021

image
本来是想转成csv表格来编辑,发现转了以后再转回json格式就变了一点
image
trans那里没有中括号了,还有音标是怎么生成的
https://blog.csdn.net/weixin_30371469/article/details/99648857
image
翻译函数成功了,音标函数失败了

@RealKai42
Copy link
Owner

json 一般是用代码生成出来
音标和单词数据取自 https://github.com/kajweb/dict

@wetery
Copy link
Contributor Author

wetery commented Oct 28, 2021

https://csvjson.com/csv2json
image
先用excel编辑成这种格式,把中括号用excel批量加上去,然后转成json,就像下面这样
image
然后用查找替换,"[ 替换 "[, "] 替换 "],搞定,
image

@Happy-IT
Copy link

请问,是怎么使用自己自定义的字典?
我有自定义的json文件,但我不知道在哪里添加它,也不知道将文件放到哪里。

@RealKai42
Copy link
Owner

建议参考 #40 #67 贡献词典

@Happy-IT
Copy link

建议参考 #40 #67 贡献词典

感谢回答!
原来是:在.\public\dicts 里添加字典,还要在 .\src\resources\dictionary.ts 添加dictionary
我不小心把字典json格式搞错了,主界面加载一直在Lording,并没有提示,我一时半会都不知道错哪了。

@RealKai42
Copy link
Owner

@Happy-IT 在 script 里面有一个 js 脚本,可以自动获取你添加字典的单词个数并更新到 dictionary.ts 里

@stale
Copy link

stale bot commented Jun 26, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

3 participants