Procházet zdrojové kódy

Updated and added Traditional Chinese for README. Updated translations.

Hintay před 3 roky
rodič
revize
900b02badf

+ 101 - 42
README-zh_CN.md

@@ -4,22 +4,76 @@
 
 # Nginx UI
 
-Yet another Nginx Web UI, developed by [0xJacky](https://jackyu.cn/) and [Hintay](https://blog.kugeek.com/).
+Yet another Nginx Web UI
+
+Nginx 网络管理界面,由  [0xJacky](https://jackyu.cn/) 与 [Hintay](https://blog.kugeek.com/) 开发。
 
 [![Build and Publish](https://github.com/0xJacky/nginx-ui/actions/workflows/build.yml/badge.svg)](https://github.com/0xJacky/nginx-ui/actions/workflows/build.yml)
 
 [For English](README.md)
 
+[繁體中文](README-zh_TW.md)
+
+<details>
+  <summary>目录</summary>
+  <ol>
+    <li>
+      <a href="#关于项目">关于项目</a>
+      <ul>
+        <li><a href="#特色">特色</a></li>
+        <li><a href="#国际化">国际化</a></li>
+        <li><a href="#构建基于">构建基于</a></li>
+      </ul>
+    </li>
+    <li>
+      <a href="#入门指南">入门指南</a>
+      <ul>
+        <li><a href="#使用前注意">使用前注意</a></li>
+        <li><a href="#安装">安装</a></li>
+        <li>
+          <a href="#使用方法">使用方法</a>
+          <ul>
+            <li><a href="#通过执行文件运行">通过执行文件运行</a></li>
+            <li><a href="#使用-systemd">使用 Systemd</a></li>
+          </ul>
+        </li>
+      </ul>
+    </li>
+    <li>
+      <a href="#手动构建">手动构建</a>
+      <ul>
+        <li><a href="#依赖">依赖</a></li>
+        <li><a href="#构建前端">构建前端</a></li>
+        <li><a href="#构建后端">构建后端</a></li>
+      </ul>
+    </li>
+    <li>
+      <a href="#linux-安装脚本">Linux 安装脚本</a>
+      <ul>
+        <li><a href="#基本用法">基本用法</a></li>
+        <li><a href="#更多用法">更多用法</a></li>
+      </ul>
+    </li>
+    <li><a href="#nginx-反向代理配置示例">Nginx 反向代理配置示例</a></li>
+    <li><a href="#贡献">贡献</a></li>
+    <li><a href="#开源许可">开源许可</a></li>
+  </ol>
+</details>
+
 ## 关于项目
-![](resources/screenshots/dashboard.png)
+
+[![Dashboard](resources/screenshots/dashboard.png)]()
+
 ### 特色
-- 在线查看服务器 CPU、内存、load average、磁盘使用率等指标
+
+- 在线查看服务器 CPU、内存、系统负载、磁盘使用率等指标
 - 一键申请和自动续签 Let's encrypt 证书
 - 在线编辑 Nginx 配置文件,编辑器支持 Nginx 配置语法高亮
 - 使用 Go 和 Vue 开发,发行版本为单个可执行的二进制文件
 - 前端支持暗夜模式
 
 ### 国际化
+
 - 英语
 - 简体中文
 - 繁体中文
@@ -27,13 +81,14 @@ Yet another Nginx Web UI, developed by [0xJacky](https://jackyu.cn/) and [Hintay
 我们欢迎您将项目翻译成任何语言。
 
 ### 构建基于
+
 - [The Go Programming Language](https://go.dev/)
 - [Gin Web Framework](https://gin-gonic.com)
 - [GORM](http://gorm.io/index.html)
 - [Vue 2](https://vuejs.org)
 - [vue-gettext](https://github.com/Polyconseil/vue-gettext)
 
-## 快速开始
+## 入门指南
 
 ### 使用前注意
 
@@ -41,56 +96,65 @@ Nginx UI 遵循 Nginx 的标准,创建的网站配置文件位于 Nginx 配置
 启用后的网站的配置文件将会创建一份软连接到 `sites-enabled`
 目录中。因此,您可能需要提前调整配置文件的组织方式。
 
-## 安装
+### 安装
+
+Nginx UI 可在以下平台中使用:
 
-### 平台支持
-Nginx UI 可在以下平台中可用:
-- Mac OS X 10.10 Yosemite 及之后版本(amd64 / arm64);
-- Linux 2.6.23 及之后版本(x86 / amd64 / arm64);
-  - 包括但不限于 Debian 7 / 8、Ubuntu 12.04 / 14.04 及后续版本、CentOS 6 / 7、Arch Linux;
-- FreeBSD (x86 / amd64);
-- OpenBSD (x86 / amd64);
-- Dragonfly BSD (amd64);
+- Mac OS X 10.10 Yosemite 及之后版本(amd64 / arm64)
+- Linux 2.6.23 及之后版本(x86 / amd64 / arm64)
+  - 包括但不限于 Debian 7 / 8、Ubuntu 12.04 / 14.04 及后续版本、CentOS 6 / 7、Arch Linux
+- FreeBSD (x86 / amd64)
+- OpenBSD (x86 / amd64)
+- Dragonfly BSD (amd64)
 
-您可以在 [latest release](https://github.com/0xJacky/nginx-ui/releases/latest) 中下载最新发行版本
+您可以在 [最新发行 (latest release)](https://github.com/0xJacky/nginx-ui/releases/latest) 中下载最新版本,或使用 [Linux 安装脚本](#scripts-for-linux).
 
 ### 使用方法
 
-#### 通过手动安装
-- 在前台运行 Nginx UI
+第一次运行 Nginx UI 时,请在浏览器中访问 `http://<your_server_ip>:<listen_port>/install` 完成后续配置。
+
+#### 通过执行文件运行
+**在终端中运行 Nginx UI**
+
 ```shell
-nginx-ui --config app.ini
+nginx-ui -config app.ini
 ```
-- 关闭在前台运行的 Nginx UI
-    - 键盘快捷键 `Ctrl+C`
+在终端使用 `Control+C` 退出 Nginx UI。
+
+**在后台运行 Nginx UI**
 
-- 后台运行 Nginx UI
 ```shell
-nohup ./nginx-ui --config app.ini &
+nohup ./nginx-ui -config app.ini &
 ```
-- 关闭在后台运行的 Nginx UI
+使用以下命令停止 Nginx UI。
+
 ```shell
-jobs
-kill %job_id
+kill -9 $(ps -aux | grep nginx-ui | grep -v grep | awk '{print $2}')
 ```
-#### 通过脚本安装
-- 启动 Nginx UI
+#### 使用 Systemd
+如果你使用的是[Linux 安装脚本](#scripts-for-linux),Nginx UI 将作为 `nginx-ui` 服务安装在 systemd 中。请使用 `systemctl` 命令控制。
+
+**启动 Nginx UI**
+
 ```shell
 systemctl start nginx-ui
 ```
-- 停止 Nginx UI
+**停止 Nginx UI**
+
 ```shell
 systemctl stop nginx-ui
 ```
-- 重启 Nginx UI
+**重启 Nginx UI**
+
 ```shell
 systemctl restart nginx-ui
 ```
-
 ## 手动构建
-对于一键安装脚本不支持的平台,可以尝试手动构建。
+
+对于没有官方构建版本的平台,可以尝试手动构建。
 
 ### 依赖
+
 - Make
 
 - Golang 1.17+
@@ -100,6 +164,7 @@ systemctl restart nginx-ui
   ```shell
   npx browserslist@latest --update-db
   ```
+
 ### 构建前端
 
 请在 `frontend` 目录中执行以下命令。
@@ -118,19 +183,16 @@ yarn build
 go build -o nginx-ui -v main.go
 ```
 
-### Linux 一键安装脚本
+## Linux 安装脚本
+
+### 基本用法
 
 **安装或升级**
 
 ```shell
 bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) @ install
 ```
-
-一键安装脚本默认设置的监听端口为 `9000`,HTTP Challenge 端口默认为 `9180`,
-如果出现端口冲突请进入 `/usr/local/etc/nginx-ui/app.ini` 修改,
-并使用 `systemctl restart nginx-ui` 重启 Nginx UI 服务。
-
-服务启动成功后,在浏览器中访问 `http://<your_server_ip>:9000/install` 完成后续配置。
+一键安装脚本默认设置的监听端口为 `9000`,HTTP Challenge 端口默认为 `9180`,如果出现端口冲突请进入 `/usr/local/etc/nginx-ui/app.ini` 修改,并使用 `systemctl restart nginx-ui` 重启 Nginx UI 服务。
 
 **卸载 Nginx UI 但保留配置和数据库文件**
 
@@ -181,9 +243,7 @@ server {
 
 贡献使开源社区成为学习、启发和创造的绝佳场所。我们**非常感谢**您所做的任何贡献。
 
-如果您有让这个项目变得更强的建议,欢迎 fork 这个仓库并创建一个 Pull Request。
-
-您也可以创建一个带有 `enhancement` 的 Issue。最后,不要忘记给我们的项目<del>一键三连</del>点个 Star!再次感谢!
+如果您有让这个项目变得更强的建议,欢迎 fork 这个仓库并创建一个 Pull Request。您也可以创建一个带有 `enhancement` (优化)标签的 Issue。最后,不要忘记给我们的项目<del>一键三连</del>点个 Star!再次感谢!
 
 1. Fork 项目
 2. 创建您的分支 (`git checkout -b feature/AmazingFeature`)
@@ -193,5 +253,4 @@ server {
 
 ## 开源许可
 
-这个项目是在 GNU Affero Public License v3.0 (GPLv3) 许可下提供的,您可以在  [LICENSE](LICENSE) 找到。
-通过使用、分发或对本项目做出贡献,表明您已同意本许可证的条款和条件。
+此项目基于 GNU Affero Public License v3.0 (AGPLv3) 许可,请参阅 [LICENSE](LICENSE) 文件。通过使用、分发或对本项目做出贡献,表明您已同意本许可证的条款和条件。

+ 40 - 26
README.md

@@ -8,7 +8,9 @@ Yet another Nginx Web UI, developed by [0xJacky](https://jackyu.cn/) and [Hintay
 
 [![Build and Publish](https://github.com/0xJacky/nginx-ui/actions/workflows/build.yml/badge.svg)](https://github.com/0xJacky/nginx-ui/actions/workflows/build.yml)
 
-[简体中文说明](README-zh_CN.md)
+[简体中文](README-zh_CN.md)
+
+[繁體中文](README-zh_TW.md)
 
 <details>
   <summary>Table of Contents</summary>
@@ -17,7 +19,7 @@ Yet another Nginx Web UI, developed by [0xJacky](https://jackyu.cn/) and [Hintay
       <a href="#about-the-project">About The Project</a>
       <ul>
         <li><a href="#features">Features</a></li>
-        <li><a href="#built-with">Internationalization</a></li>
+        <li><a href="#internationalization">Internationalization</a></li>
         <li><a href="#built-with">Built With</a></li>
       </ul>
     </li>
@@ -26,7 +28,13 @@ Yet another Nginx Web UI, developed by [0xJacky](https://jackyu.cn/) and [Hintay
       <ul>
         <li><a href="#before-use">Before Use</a></li>
         <li><a href="#installation">Installation</a></li>
-        <li><a href="#usage">Usage</a></li>
+        <li>
+          <a href="#usage">Usage</a>
+          <ul>
+            <li><a href="#from-executable">From Executable</a></li>
+            <li><a href="#with-systemd">With Systemd</a></li>
+          </ul>
+        </li>
       </ul>
     </li>
     <li>
@@ -38,10 +46,10 @@ Yet another Nginx Web UI, developed by [0xJacky](https://jackyu.cn/) and [Hintay
       </ul>
     </li>
     <li>
-      <a href="#scripts-for-linux">Scripts for Linux</a>
+      <a href="#script-for-linux">Script for Linux</a>
       <ul>
-        <li><a href="#prerequisites">Basic Usage</a></li>
-        <li><a href="#build-frontend">More Usage</a></li>
+        <li><a href="#basic-usage">Basic Usage</a></li>
+        <li><a href="#more-usage">More Usage</a></li>
       </ul>
     </li>
     <li><a href="#example-of-nginx-reverse-proxy-configuration">Example of Nginx Reverse Proxy Configuration</a></li>
@@ -101,39 +109,48 @@ You can visit [latest release](https://github.com/0xJacky/nginx-ui/releases/late
 
 ### Usage
 
-#### Manually Install
-- Start Nginx UI in foreground
+In the first runtime of Nginx UI, please visit `http://<your_server_ip>:<listen_port>/install`
+in your browser to complete the follow-up configurations.
+
+#### From Executable
+**Run Nginx UI in Terminal**
+
 ```shell
-nginx-ui --config app.ini
+nginx-ui -config app.ini
 ```
-- Kill Nginx UI in foreground
-    - Keyboard shortcuts `Ctrl+C`
+Press `Control+C` in the terminal to exit Nginx UI.
+
+**Run Nginx UI in Background**
 
-- Start Nginx UI in background
 ```shell
-nohup ./nginx-ui --config app.ini &
+nohup ./nginx-ui -config app.ini &
 ```
-- Kill Nginx UI in background
+Stop Nginx UI with the follow commond.
+
 ```shell
-jobs
-kill %job_id
+kill -9 $(ps -aux | grep nginx-ui | grep -v grep | awk '{print $2}')
 ```
-#### Installed by script
-- Start Nginx UI
+#### With Systemd
+If you are using the [installation script for Linux](#scripts-for-linux), the Nginx UI will be installed as `nginx-ui` service in systemd. Please use the `systemctl` command to control it.
+
+**Start Nginx UI**
+
 ```shell
 systemctl start nginx-ui
 ```
-- Stop Nginx UI
+**Stop Nginx UI**
+
 ```shell
 systemctl stop nginx-ui
 ```
-- Restart Nginx UI
+**Restart Nginx UI**
+
 ```shell
 systemctl restart nginx-ui
 ```
 ## Manual Build
 
-On platforms where installation scripts are not supported, they can be built manually.
+On platforms that do not have an official build version, they can be built manually.
 
 ### Prerequisites
 
@@ -165,7 +182,7 @@ Please build the frontend first, and then execute the following command in the p
 go build -o nginx-ui -v main.go
 ```
 
-## Scripts for Linux
+## Script for Linux
 
 ### Basic Usage
 
@@ -176,9 +193,6 @@ bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/inst
 ```
 The default listening port is 9000, and the default HTTP Challenge port is 9180. If there is a port conflict, please modify `/usr/local/etc/nginx-ui/app.ini` manually, then use `systemctl restart nginx-ui` to reload the Nginx UI service.
 
-Once the nginx-ui is running, please visit `http://<your_server_ip>:<listen_port>/install`
-in your browser to complete the follow-up configurations.
-
 **Remove Nginx UI, except configuration and database files**
 
 ```shell
@@ -228,7 +242,7 @@ server {
 
 Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you  make are **greatly appreciated**.
 
-If you have a suggestion that would make this better,  please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
+If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
 
 1. Fork the Project
 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)

+ 19 - 23
frontend/src/locale/zh_TW/LC_MESSAGES/app.po

@@ -80,13 +80,12 @@ msgid "Configurations"
 msgstr "配置"
 
 #: src/views/dashboard/DashBoard.vue:204
-#, fuzzy
 msgid "CPU Status"
-msgstr "狀態"
+msgstr "中央處理器狀態"
 
 #: src/views/dashboard/DashBoard.vue:22
 msgid "CPU:"
-msgstr ""
+msgstr "中央處理器:"
 
 #: src/views/user/User.vue:23
 msgid "Created at"
@@ -123,7 +122,7 @@ msgstr "禁用成功"
 
 #: src/views/dashboard/DashBoard.vue:282
 msgid "Disk IO"
-msgstr ""
+msgstr "磁碟 IO"
 
 #: src/views/domain/DomainEdit.vue:133
 msgid "Do you want to change the template to support the TLS?"
@@ -248,13 +247,12 @@ msgid "Logout successful"
 msgstr "登出成功"
 
 #: src/views/domain/DomainEdit.vue:12 src/views/domain/DomainEdit.vue:6
-#, fuzzy
 msgid ""
 "Make sure you have configured a reverse proxy for .well-known directory to "
 "HTTPChallengePort (default: 9180) before getting the certificate."
 msgstr ""
-"在獲取證書前,請確保配置檔案中已將 <code>.well-known</code> 目錄反向代理到"
-"<code>HTTPChallengePort</code> (預設: 9180)"
+"在獲取證書前,請確保配置檔案中已將 .well-known 目錄反向代理到 "
+"HTTPChallengePort (預設: 9180)"
 
 #: src/router/index.js:60
 msgid "Manage Configs"
@@ -278,15 +276,15 @@ msgstr "名稱"
 
 #: src/views/dashboard/DashBoard.vue:231
 msgid "Network"
-msgstr ""
+msgstr "網路"
 
 #: src/views/dashboard/DashBoard.vue:165
 msgid "Network Total Receive"
-msgstr ""
+msgstr "下載流量"
 
 #: src/views/dashboard/DashBoard.vue:174
 msgid "Network Total Send"
-msgstr ""
+msgstr "上傳流量"
 
 #: src/router/index.js:105
 msgid "Not Found"
@@ -308,7 +306,7 @@ msgstr "確定"
 
 #: src/views/dashboard/DashBoard.vue:16
 msgid "OS:"
-msgstr ""
+msgstr "作業系統:"
 
 #: src/views/other/Login.vue:56 src/views/user/User.vue:13
 msgid "Password"
@@ -340,11 +338,11 @@ msgstr "專案團隊"
 
 #: src/views/dashboard/DashBoard.vue:61 src/views/dashboard/DashBoard.vue:305
 msgid "Reads"
-msgstr ""
+msgstr ""
 
 #: src/views/dashboard/DashBoard.vue:51 src/views/dashboard/DashBoard.vue:240
 msgid "Receive"
-msgstr ""
+msgstr "下載"
 
 #: src/views/domain/columns.js:16
 msgid "Root Directory (root)"
@@ -367,7 +365,7 @@ msgstr "儲存成功"
 
 #: src/views/dashboard/DashBoard.vue:54 src/views/dashboard/DashBoard.vue:254
 msgid "Send"
-msgstr ""
+msgstr "上傳"
 
 #: src/views/config/ConfigEdit.vue:35 src/views/domain/DomainEdit.vue:71
 #: src/views/other/Login.vue:35
@@ -375,9 +373,8 @@ msgid "Server error"
 msgstr "伺服器錯誤"
 
 #: src/views/dashboard/DashBoard.vue:37
-#, fuzzy
 msgid "Server Info"
-msgstr "伺服器錯誤"
+msgstr "伺服器資訊"
 
 #: src/views/domain/columns.js:10
 msgid "Server Names (server_name)"
@@ -401,7 +398,7 @@ msgstr "主體名稱: %{name}"
 
 #: src/views/dashboard/DashBoard.vue:116
 msgid "Swap"
-msgstr ""
+msgstr "交換空間"
 
 #: src/router/index.js:124
 msgid "System message"
@@ -427,12 +424,12 @@ msgid ""
 "fields in your configuration file. The configuration filename cannot be "
 "changed after it has been created."
 msgstr ""
-"只有在您的配置檔案中有相應欄位時,下列的配置才能生效。配置檔名稱建立後不可"
-"改。"
+"只有在您的配置檔案中有相應欄位時,下列的配置才能生效。配置檔名稱建立後不可"
+"改。"
 
 #: src/views/domain/DomainEdit.vue:11 src/views/domain/DomainEdit.vue:5
 msgid "This feature is not available in demo."
-msgstr ""
+msgstr "此功能在演示中不可用。"
 
 #: src/views/domain/DomainEdit.vue:134
 msgid "This operation will lose the custom configuration."
@@ -444,9 +441,8 @@ msgid "Updated at"
 msgstr "修改時間"
 
 #: src/views/dashboard/DashBoard.vue:6
-#, fuzzy
 msgid "Uptime:"
-msgstr "執行時間"
+msgstr "執行時間:"
 
 #: src/views/other/Login.vue:33 src/views/user/User.vue:5
 msgid "Username"
@@ -458,7 +454,7 @@ msgstr "使用者名稱 (*)"
 
 #: src/views/dashboard/DashBoard.vue:58 src/views/dashboard/DashBoard.vue:291
 msgid "Writes"
-msgstr ""
+msgstr ""
 
 #~ msgid "Server Status"
 #~ msgstr "伺服器狀態"

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
frontend/src/translations.json


+ 1 - 1
frontend/version.json

@@ -1 +1 @@
-{"version":"1.2.0","build_id":2,"total_build":42}
+{"version":"1.2.0","build_id":3,"total_build":43}

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů