-
Notifications
You must be signed in to change notification settings - Fork 95
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
支持 docstrings ? #105
base: master
Are you sure you want to change the base?
支持 docstrings ? #105
Conversation
@@ -11,6 +11,9 @@ using Documenter, DocumenterLaTeX | |||
include("../contrib/HTMLWriter.jl") | |||
include("../contrib/LaTeXWriter.jl") | |||
|
|||
using JuliaZH | |||
zh_CN() | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我们可以先merge了试试?反正不影响其它部分的功能。
@@ -0,0 +1,85 @@ | |||
using JSON, JSON3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是使用两个JSON库是为什么呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最开始想用JSON3的struct mapping,后来发现直接用Dict就行。只用JSON就可以,下面的dump_docstrings的实现调整一下,这是个demo,就懒得改了。
还有一些事情需要确认:
|
|
||
[[JuliaZH]] | ||
deps = ["JSON", "JSON3", "REPL"] | ||
path = ".." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是为了在PR中触发docstrings的替换,并在Gitlab Pages中预览,实际上,commit Manifest.toml是非必要的。
在 #88 中已经描述的挺清楚了,可以把这个 PR 作为一个 demo,这里为了简化,采用了更直白的 JSON 文件作为文档翻译的载体。
本地化流程与 markdown 文档基本一致,唯一不同之处是,markdown 是利用 Transifex 的自动同步源功能,自动与 Julia repo 进行同步,而 docstrings 是本地提取的,需要手动用
tx push -s
同步。