为 Weblate 文档作贡献¶
欢迎您改进您选择的文档页面。通过单击页面右上角的 在 GitHub 上编辑 按钮轻松完成此操作。
文档准则¶
请在写作时遵守以下准则:
如果部分文档有效请不要将其删除。
请使用清晰易懂的语言。你正在写技术文档,而不是一首诗。并非所有文档读者都是母语人士,请深思熟虑。
如果你不确定不要害怕询问。如果你在编辑时必须询问某些功能。在你得到答案之前不要改变它的文档。这意味着你要么改变。要么询问。不要同时做这两件事。
在遵循文档的同时通过执行描述的操作来验证您的更改。
发送带有小块更改的PR以便更轻松更快速地查看和合并。
如果你想重写和改变一篇大文章的结构,请分两步进行:
重写
重写的内容经审核、润色并被合并后,在另一个 PR 中修改段落的结构。
本地构建文档¶
也可以在本地编辑并构建文档,Python 要求位于 pyproject.toml 中的 docs 依赖群。如果已经在使用完整的开发环境,那么 uv sync --all-extras --dev 就够了。如果只为了文档工作,那么 uv sync --group docs 就够了。
推荐的本地工作流是:
make -C docs update-docs
./ci/run-docs
The ci/run-docs wrapper builds the documentation with warnings treated as errors.
提示
您还需要安装 graphviz 来构建文档。
翻译文档¶
你可以 翻译文档。
更新所生成的文档片段¶
几个文档部分使用从代码生成的模板。刷新它们的首选方式是:
make -C docs update-docs
This target regenerates the snippets currently used by the documentation, including:
add-on events, built-in add-ons, and common add-on parameters
机器翻译服务
file format parameters and file format feature tables
权限和内置角色
检查和检查标记
Keep manually maintained text in the parent documentation page rather than adding it to autogenerated snippets. For example, 附加组件 includes three generated files for events, built-in add-ons, and common add-on parameters, while obsolete add-ons are maintained directly in the page.
If you need to regenerate only one part, the individual management commands are
documented in 管理命令, and the exact commands used by
update-docs are listed in docs/Makefile.