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

Add Chinese translation of readme #695

Closed
promacanthus opened this issue May 8, 2020 · 3 comments
Closed

Add Chinese translation of readme #695

promacanthus opened this issue May 8, 2020 · 3 comments

Comments

@promacanthus
Copy link
Contributor

Add Chinese translation of readme, As follows.


快速开始

  1. 将注释添加到API源代码中,请参阅声明性注释格式。
  2. 使用如下命令下载swag:
go get -u github.com/swaggo/swag/cmd/swag

从源码开始构建的话,需要有Go环境(1.9及以上版本)。

或者从github的release页面下载预编译好的二进制文件。

  1. 在包含main.go文件的项目根目录运行swag init。这将会解析注释并生成需要的文件(docs文件夹和docs/docs.go)。
swag init

确保导入了生成的docs/docs.go文件,这样特定的配置文件才会被初始化。如果通用API指数没有写在main.go中,可以使用-g标识符来告知swag。

swag init -g http/api.go
@sdghchj
Copy link
Member

sdghchj commented May 8, 2020

那怎么切换呢

@promacanthus
Copy link
Contributor Author

那怎么切换呢

新增一个中文翻译的readme文档,在原readme文档中增加一个链接,同样在中文版中增加英文原版的链接。

向下面这个样子。


swag

中文翻译

Travis Status
Coverage Status
Go Report Card
codebeat badge
Go Doc
Backers on Open Collective
Sponsors on Open Collective FOSSA Status
Release

Swag converts Go annotations to Swagger Documentation 2.0. We've created a variety of plugins for popular Go web frameworks. This allows you to quickly integrate with an existing Go project (using Swagger UI).

@sdghchj
Copy link
Member

sdghchj commented May 9, 2020

PR is welcome

promacanthus added a commit to promacanthus/swag that referenced this issue May 9, 2020
promacanthus added a commit to promacanthus/swag that referenced this issue May 9, 2020
sdghchj added a commit that referenced this issue May 9, 2020
Add Chinese translation of readme #695
@sdghchj sdghchj closed this as completed May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants