Update zh tw languages and fix some broken links (#455)

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <2021+silverwind@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/455
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
This commit is contained in:
Lunny Xiao
2026-07-09 23:41:46 +00:00
parent c0f8a04185
commit 965c269495
652 changed files with 30864 additions and 30792 deletions

View File

@@ -4,17 +4,17 @@ slug: "rubygems"
sidebar_position: 110
---
# RubyGems 軟體包註冊表
# RubyGems 套件註冊表
為您的使用者或組織發佈 [RubyGems](https://guides.rubygems.org/) 軟體包
為您的使用者或組織發佈 [RubyGems](https://guides.rubygems.org/) 套件
## 要求
要使用RubyGems軟體包註冊表,您需要使用 [gem](https://guides.rubygems.org/command-reference/) 命令行工具来消费和發佈軟體包
要使用RubyGems套件註冊表,您需要使用 [gem](https://guides.rubygems.org/command-reference/) 命令行工具來消費和發佈套件
## 配置軟體包註冊表
## 設定套件註冊表
注册軟體包註冊表,請编辑 `~/.gem/credentials` 文件並添加:
註冊套件註冊表,請編輯 `~/.gem/credentials` 文件並添加:
```ini
---
@@ -23,8 +23,8 @@ https://gitea.example.com/api/packages/{owner}/rubygems: Bearer {token}
| 參數 | 描述 |
| ------- | ------------------------------------------------------------------------------------- |
| `owner` | 軟體包的所有者 |
| `token` | 您的[个人访问令牌](development/api-usage.md#過-api-認證) |
| `owner` | 套件的所有者 |
| `token` | 您的[個人存取權杖](development/api-usage.md#過-api-認證) |
例如:
@@ -33,9 +33,9 @@ https://gitea.example.com/api/packages/{owner}/rubygems: Bearer {token}
https://gitea.example.com/api/packages/testuser/rubygems: Bearer 3bd626f84b01cd26b873931eace1e430a5773cc4
```
## 發佈軟體包
## 發佈套件
通過行以下命令發佈軟體包
通過行以下命令發佈套件
```shell
gem push --host {host} {package_file}
@@ -43,8 +43,8 @@ gem push --host {host} {package_file}
| 參數 | 描述 |
| -------------- | ------------------------ |
| `host` | 軟體包註冊表的URL |
| `package_file` | 軟體包 `.gem` 文件的路 |
| `host` | 套件註冊表的URL |
| `package_file` | 套件 `.gem` 文件的路 |
例如:
@@ -52,15 +52,15 @@ gem push --host {host} {package_file}
gem push --host https://gitea.example.com/api/packages/testuser/rubygems test_package-1.0.0.gem
```
如果已存在相同名稱和版本的軟體包,您無法發佈軟體包。您必須先除現有的軟體包
如果已存在相同名稱和版本的套件,您無法發佈套件。您必須先除現有的套件
## 安裝軟體包
## 安裝套件
从軟體包註冊表安裝軟體包,您可以使用 [Bundler](https://bundler.io) 或 `gem`
從套件註冊表安裝套件,您可以使用 [Bundler](https://bundler.io) 或 `gem`
### Bundler
在您的 `Gemfile` 中添加一新的 `source`
在您的 `Gemfile` 中添加一新的 `source`
```
source "https://gitea.example.com/api/packages/{owner}/rubygems" do
@@ -70,8 +70,8 @@ end
| 參數 | 描述 |
| -------------- | -------------- |
| `owner` | 軟體包的所有者 |
| `package_name` | 軟體包名稱 |
| `owner` | 套件的所有者 |
| `package_name` | 套件名稱 |
例如:
@@ -81,7 +81,7 @@ source "https://gitea.example.com/api/packages/testuser/rubygems" do
end
```
后运行以下命令:
後運行以下命令:
```shell
bundle install
@@ -97,8 +97,8 @@ gem install --host https://gitea.example.com/api/packages/{owner}/rubygems {pack
| 參數 | 描述 |
| -------------- | -------------- |
| `owner` | 軟體包的所有者 |
| `package_name` | 軟體包名稱 |
| `owner` | 套件的所有者 |
| `package_name` | 套件名稱 |
例如:
@@ -106,7 +106,7 @@ gem install --host https://gitea.example.com/api/packages/{owner}/rubygems {pack
gem install --host https://gitea.example.com/api/packages/testuser/rubygems test_package
```
## 支的命令
## 支的命令
```
gem install