Skip to content

Commit a01ccc7

Browse files
committed
docs: add zh-Hant
1 parent 37c1e3c commit a01ccc7

16 files changed

+1216
-0
lines changed

docs/.vitepress/config.mts

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,83 @@ export default defineConfig({
108108
label: 'English',
109109
lang: 'en-US'
110110
},
111+
'zh-hant': {
112+
label: '繁體中文',
113+
lang: 'zh-Hant',
114+
description: '外掛管理器是一個便捷的 Laravel 擴充包,用於模組化管理您的龐大 Laravel 應用程式。每個外掛就像一個獨立的 Laravel 應用或者微服務,可以定義自己的視圖、控制器和模型。',
115+
themeConfig: {
116+
nav: [
117+
{ text: '首頁', link: '/zh-hant/' },
118+
{ text: '指南', link: '/zh-hant/guide/', activeMatch: '/zh-hant/guide/' },
119+
{ text: '外掛指令', link: '/zh-hant/artisan/', activeMatch: '/zh-hant/artisan/' },
120+
{ text: '指令字', link: '/zh-hant/command-word/', activeMatch: '/zh-hant/command-word/' },
121+
{ text: 'DTO', link: '/zh-hant/dto/', activeMatch: '/zh-hant/dto/' },
122+
],
123+
124+
footer: {
125+
message: '遵循 Apache-2.0 開源協定',
126+
copyright: 'Copyright © 2021-2024 <a href="https://github.com/jevantang" target="_blank">Jevan Tang</a>',
127+
},
128+
129+
outlineTitle: '本頁導覽',
130+
returnToTopLabel: '回到頂部',
131+
sidebarMenuLabel: '選單',
132+
darkModeSwitchLabel: '深色模式',
133+
134+
editLink: {
135+
pattern: 'https://github.com/fresns/plugin-manager/tree/2.x/docs/:path',
136+
text: '為此頁提供修改建議'
137+
},
138+
139+
lastUpdatedText: '最後一次更新',
140+
141+
docFooter: {
142+
prev: '上一項',
143+
next: '下一項',
144+
},
145+
146+
sidebar: [
147+
{
148+
text: '使用指南',
149+
collapsed: false,
150+
items: [
151+
{ text: '介紹', link: '/zh-hant/guide/' },
152+
{ text: '安裝和配置', link: '/zh-hant/guide/installation.md' },
153+
{ text: '外掛結構', link: '/zh-hant/guide/structure.md' },
154+
{ text: '使用案例', link: '/zh-hant/guide/use-cases.md' },
155+
]
156+
},
157+
{
158+
text: '外掛指令',
159+
collapsed: false,
160+
items: [
161+
{ text: '總覽', link: '/zh-hant/artisan/' },
162+
{ text: '使用流程', link: '/zh-hant/artisan/started.md' },
163+
{ text: '創建新外掛', link: '/zh-hant/artisan/create.md' },
164+
{ text: '開發指令', link: '/zh-hant/artisan/development.md' },
165+
{ text: '控制指令', link: '/zh-hant/artisan/control.md' },
166+
{ text: '管理指令', link: '/zh-hant/artisan/management.md' },
167+
]
168+
},
169+
{
170+
text: '指令字管理器',
171+
collapsed: false,
172+
items: [
173+
{ text: '介紹', link: '/zh-hant/command-word/index.md' },
174+
{ text: '指令字開發', link: '/zh-hant/command-word/development.md' },
175+
{ text: '指令字使用', link: '/zh-hant/command-word/usage.md' },
176+
]
177+
},
178+
{
179+
text: 'DTO',
180+
collapsed: false,
181+
items: [
182+
{ text: '介紹', link: '/zh-hant/dto/index.md' },
183+
]
184+
}
185+
],
186+
}
187+
},
111188
'zh-hans': {
112189
label: '简体中文',
113190
lang: 'zh-Hans',

docs/zh-hant/artisan/control.md

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# 控制指令
2+
3+
## 解壓縮外掛包到外掛目錄
4+
5+
Unzip the plugin files into the `/plugins/` directory, the final directory will be `/plugins/{fskey}/`.
6+
7+
```sh
8+
fresns plugin:unzip /www/wwwroot/fresns/storage/plugins/downloads/123e4567-e89b-12d3-a456-426614174000.zip
9+
```
10+
11+
或者
12+
13+
```sh
14+
php artisan plugin:unzip /www/wwwroot/fresns/storage/plugins/downloads/123e4567-e89b-12d3-a456-426614174000.zip
15+
```
16+
17+
## 發布外掛(分發靜態資源)
18+
19+
Publish static resources for the plugin `DemoPlugin`.
20+
21+
```sh
22+
fresns plugin:publish
23+
```
24+
25+
或者
26+
27+
```sh
28+
php artisan plugin:publish DemoPlugin
29+
```
30+
31+
- `/plugins/DemoPlugin/Resources/assets/` Distribute to web directories `/public/assets/DemoPlugin/`
32+
33+
## 撤銷發布(刪除靜態資源)
34+
35+
Unpublish static resources for the plugin `DemoPlugin`.
36+
37+
```sh
38+
fresns plugin:unpublish
39+
```
40+
41+
或者
42+
43+
```sh
44+
php artisan plugin:unpublish DemoPlugin
45+
```
46+
47+
- `/plugins/DemoPlugin/Resources/assets/` Distribute to web directories `/public/assets/DemoPlugin/`
48+
49+
## 更新外掛 Composer 依賴套件
50+
51+
Composer all plugins.
52+
53+
```sh
54+
fresns plugin:composer-update
55+
```
56+
57+
或者
58+
59+
```sh
60+
php artisan plugin:composer-update
61+
```
62+
63+
## 執行外掛 Migrate
64+
65+
Migrate the given plugin, or without a plugin an argument, migrate all plugins.
66+
67+
```sh
68+
fresns plugin:migrate
69+
```
70+
71+
或者
72+
73+
```sh
74+
php artisan plugin:migrate DemoPlugin
75+
```
76+
77+
## 復原外掛 Migrate
78+
79+
Rollback the given plugin, or without an argument, rollback all plugins.
80+
81+
```sh
82+
fresns plugin:migrate-rollback
83+
```
84+
85+
或者
86+
87+
```sh
88+
php artisan plugin:migrate-rollback DemoPlugin
89+
```
90+
91+
## 刷新外掛 Migrate
92+
93+
Refresh the migration for the given plugin, or without a specified plugin refresh all plugins migrations.
94+
95+
```sh
96+
fresns plugin:migrate-refresh
97+
```
98+
99+
或者
100+
101+
```sh
102+
php artisan plugin:migrate-refresh DemoPlugin
103+
```
104+
105+
## 重置外掛 Migrate
106+
107+
Reset the migration for the given plugin, or without a specified plugin reset all plugins migrations.
108+
109+
```sh
110+
fresns plugin:migrate-reset
111+
```
112+
113+
或者
114+
115+
```sh
116+
php artisan plugin:migrate-reset DemoPlugin
117+
```
118+
119+
## 執行外掛 Seed
120+
121+
Seed the given plugin, or without an argument, seed all plugins.
122+
123+
```sh
124+
fresns plugin:seed
125+
```
126+
127+
或者
128+
129+
```sh
130+
php artisan plugin:seed DemoPlugin
131+
```
132+
133+
## 安裝外掛
134+
135+
Execute the `plugin:unzip``plugin:composer-update``plugin:migrate``plugin:publish` commands in that order.
136+
137+
```sh
138+
fresns plugin:install /www/wwwroot/fresns/storage/plugins/123e4567-e89b-12d3-a456-426614174000.zip
139+
```
140+
141+
或者
142+
143+
```sh
144+
php artisan plugin:install /www/wwwroot/fresns/storage/plugins/123e4567-e89b-12d3-a456-426614174000.zip
145+
```
146+
147+
`plugin:publish` 文件分發和入庫在最後執行,如果為升級外掛,可在入庫前,取得資料庫舊資訊判斷外掛是否存在以及舊版本號。如果外掛程式有跨版本特殊安裝處理,可憑此判斷新版和舊版之間的差距。
148+
149+
## 解除安裝外掛
150+
151+
Uninstall the plugin and select whether you want to clean the data of the plugin.
152+
153+
```sh
154+
fresns plugin:uninstall --cleandata=true
155+
fresns plugin:uninstall --cleandata=false
156+
```
157+
158+
或者
159+
160+
```sh
161+
php artisan plugin:uninstall DemoPlugin --cleandata=true
162+
php artisan plugin:uninstall DemoPlugin --cleandata=false
163+
```
164+
165+
- `/plugins/DemoPlugin/` Physically deletion the folder.
166+
- `/public/assets/DemoPlugin/` Physically deletion the folder.
167+
- Remove the plugin composer dependency package (skip if the main application or another plugin is in use)
168+
- Logically deletion the value of the record where the `fskey` column of the `plugins` table is `DemoPlugin`.

docs/zh-hant/artisan/create.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 創建新外掛
2+
3+
建立一個 fskey 名為 `DemoPlugin` 的外掛
4+
5+
```sh
6+
fresns plugin:make DemoPlugin
7+
```
8+
或者
9+
10+
```sh
11+
fresns new DemoPlugin
12+
```

0 commit comments

Comments
 (0)