diff --git a/CONTRIBUTING_zh-TW.md b/CONTRIBUTING_zh-TW.md new file mode 100644 index 00000000..d67ddae6 --- /dev/null +++ b/CONTRIBUTING_zh-TW.md @@ -0,0 +1,46 @@ +# Gopeed 協助指南 + +首先感謝您願意幫助我們改進並優化該項目,這份指南將會幫助您更好的參與 Gopeed 的開發。 + +## 分支說明 + +本項目只有一個分支,即 `main` 分支,如果您想要參與 Gopeed 的開發,請先 fork 該項目,再在您自己的 fork 中進行開發,開發完成後再開啟PR,以合併至 `main` 分支。 + +## 離線開發 + +建議使用 web 端進行開發與調試,首先啟動服務,使用指令 `go run cmd/api/main.go` 啟動 ,該服務默認連接埠為 `9999`,接著以 `debug` 模式啟動前端 flutter 項目即可。 + +## 翻譯 + +Gopeed 的翻譯文件位於 `ui/flutter/assets/locales` 目錄中,只需要修改或新建翻譯文件即可。 + +修改locales後請執行一下指令: + +``` +get generate locales +``` + +請以 `en_US.json` 作為參照。 + +## flutter開發 + +每次提交PR前請務必執行 `dart format ./ui/flutter` + +如果需要編輯 api/models,請打開build_runner watcher: + +``` +flutter pub run build_runner watch +``` + +適用於 get-cli 的指令: + +``` + create: + controller: Generate controller + page: Use to generate pages + view: Generate view + generate: + locales: Generate translation file from json files + model: generate Class model from json +``` + diff --git a/README.md b/README.md index c56704ba..458121ac 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R6IJGN6) -[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) +[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) | [正體中文](/README_zh-TW.md) ## Introduction diff --git a/README_ja-JP.md b/README_ja-JP.md index 18e3dea2..49c00e8e 100644 --- a/README_ja-JP.md +++ b/README_ja-JP.md @@ -9,7 +9,7 @@ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R6IJGN6) -[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) +[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) | [正體中文](/README_zh-TW.md) ## はじめに diff --git a/README_zh-CN.md b/README_zh-CN.md index 6dbf77d4..29129b6c 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -9,7 +9,7 @@ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R6IJGN6) -[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) +[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) | [正體中文](/README_zh-TW.md) ## 介绍 diff --git a/README_zh-TW.md b/README_zh-TW.md new file mode 100644 index 00000000..b70bfd6d --- /dev/null +++ b/README_zh-TW.md @@ -0,0 +1,179 @@ +[![Test Status](https://github.com/GopeedLab/gopeed/workflows/test/badge.svg)](https://github.com/GopeedLab/gopeed/actions?query=workflow%3Atest) +[![Codecov](https://codecov.io/gh/GopeedLab/gopeed/branch/main/graph/badge.svg)](https://codecov.io/gh/GopeedLab/gopeed) +[![Release](https://img.shields.io/github/release/GopeedLab/gopeed.svg)](https://github.com/GopeedLab/gopeed/releases) +[![Download](https://img.shields.io/github/downloads/GopeedLab/gopeed/total.svg)](https://github.com/GopeedLab/gopeed/releases) +[![Donate](https://img.shields.io/badge/%24-donate-ff69b4.svg)](https://docs.gopeed.com/donate.html) +[![Discord](https://img.shields.io/discord/1037992631881449472?label=Discord&logo=discord&style=social)](https://discord.gg/ZUJqJrwCGB) + +![](_docs/img/banner.png) + +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R6IJGN6) + +[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) | [正體中文](/README_zh-TW.md) + +## 簡介 + +Gopeed(全稱 Go Speed),是一款使用`Golang`+`Flutter`編寫的高速下載軟體,支援(HTTP、BitTorrent、Magnet)協定,同時支援所有的平台。 + +前往 ✈ [主頁](https://gopeed.com/zh-CN) | 📖 [文檔](https://docs.gopeed.com/zh/) + +## 安裝 + +**已支援的平台** + +- [x] Windows +- [x] MacOS +- [x] Linux +- [x] Android +- [x] iOS +- [x] Web +- [x] Docker + +[下載](https://github.com/GopeedLab/gopeed/releases/latest) + +> 註:MacOS 版運行時若提示損壞,請在終端中執行 `xattr -d com.apple.quarantine /Applications/Gopeed.app` + +### 使用CLI安裝 + +使用`go install`安裝: + +```bash +go install github.com/GopeedLab/gopeed/cmd/gopeed@latest +``` + +### Docker + +#### 直接執行 + +```bash +docker run -d -p 9999:9999 -v /path/to/download:/root/Downloads liwei2633/gopeed +``` + +#### 使用 Docker Compose + +```bash +docker-compose up -d +``` + +#### 訪問服務 + +當 docker 容器運作時,可以通過 `http://localhost:9999` 訪問 web 頁面。 + +## 贊助 + +如果你認為該項目對你有所幫助,請考慮[贊助](https://docs.gopeed.com/zh/donate)以支持該項目的持續發展,謝謝! + +## 軟體介面 + +![](_docs/img/ui-demo.png) + +## 開發 + +該項目分為前端與後端,前端使用`flutter`編寫,後端使用`Golang`編寫,兩邊通過`http`協定進行通訊,在 unix 系統下,則使用`unix socket`,在 windows 系統下,則使用`tcp`協定。 + +> 前端代碼位於`ui/flutter`目錄內。 + +### 開發環境 + +1. Golang 1.19+ +2. Flutter 3.10+ + +### 克隆項目 + +```bash +git clone git@github.com:GopeedLab/gopeed.git +``` + +### 協助開發 + +請參考[協助指南](CONTRIBUTING_zh-TW.md) + +### 編譯 + +#### 桌面端 + +首先需要按照[flutter desktop 官方文檔](https://docs.flutter.dev/development/platform-integration/desktop)配置開發環境,並準備好`cgo`環境,具體方法可以自行搜索。 + +組建指令: + +- windows + +```bash +go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/windows/libgopeed.dll github.com/GopeedLab/gopeed/bind/desktop +cd ui/flutter +flutter build windows +``` + +- macos + +```bash +go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/GopeedLab/gopeed/bind/desktop +cd ui/flutter +flutter build macos +``` + +- linux + +```bash +go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/GopeedLab/gopeed/bind/desktop +cd ui/flutter +flutter build linux +``` + +#### 移動設備 + +需要`cgo`環境,並安裝`gomobile`: + +```bash +go install golang.org/x/mobile/cmd/gomobile@latest +go get golang.org/x/mobile/bind +gomobile init +``` + +組建指令: + +- android + +```bash +gomobile bind -tags nosqlite -ldflags="-w -s" -o ui/flutter/android/app/libs/libgopeed.aar -target=android -androidapi 19 -javapkg=com.gopeed github.com/GopeedLab/gopeed/bind/mobile +cd ui/flutter +flutter build apk +``` + +- ios + +```bash +gomobile bind -tags nosqlite -ldflags="-w -s" -o ui/flutter/ios/Frameworks/Libgopeed.xcframework -target=ios github.com/GopeedLab/gopeed/bind/mobile +cd ui/flutter +flutter build ios --no-codesign +``` + +#### 網頁端 + +組建指令: + +```bash +cd ui/flutter +flutter build web +cd ../../ +rm -rf cmd/web/dist +cp -r ui/flutter/build/web cmd/web/dist +go build -tags nosqlite,web -ldflags="-s -w" -o bin/ github.com/GopeedLab/gopeed/cmd/web +go run cmd/web/main.go +``` + +## 感謝 + +### 貢獻者 + + + + + +### JetBrains + +[![goland](_docs/img/goland.svg)](https://www.jetbrains.com/?from=gopeed) + +## 軟體許可 + +該軟體遵循 [GPLv3](LICENSE) 。 diff --git a/ui/flutter/assets/locales/zh_TW.json b/ui/flutter/assets/locales/zh_TW.json index 1d2e1c7d..bb53c4f1 100644 --- a/ui/flutter/assets/locales/zh_TW.json +++ b/ui/flutter/assets/locales/zh_TW.json @@ -1,5 +1,5 @@ { - "label": "中文 (正體) ", + "label": "中文 (繁體) ", "error": "錯誤", "tip": "提示", "confirm": "確定", @@ -12,6 +12,7 @@ "donate": "斗內", "exit": "離開", "create": "新增任務", + "directDownload": "直接下載", "advancedOptions": "進階選項", "downloadLink": "下載鏈接", "downloadLinkValid": "請輸入下載鏈接", @@ -27,16 +28,16 @@ "general": "通用設定", "downloadDir": "下載目録", "downloadDirValid": "請選擇下載目録", - "connections": "同時連接數量", + "connections": "同時連接數", "maxRunning": "最大同時下載數", "items": "@count 項", - "subscribeTracker": "已訂閲的 Tracker", + "subscribeTracker": "已訂閲的追蹤者列表", "subscribeFail": "訂閲失敗", "update": "更新", - "updateDaily": "每日自動更新", + "updateDaily": "每天自動更新", "lastUpdate": "上次更新時間: @time", - "addTracker": "增加新的 Tracker", - "addTrackerHit": "請輸入 Tracker 服務器地址,每行一條", + "addTracker": "增加新的追蹤者", + "addTrackerHit": "請輸入追蹤者服務器地址,每行一條", "ui": "介面", "theme": "佈景主題", "themeSystem": "跟隨系統", @@ -46,12 +47,12 @@ "about": "關於", "homepage": "訪問主頁", "version": "版本資訊", - "protocol": "通訊協定", + "protocol": "端口設定", "port": "端口", - "apiToken": "接口 Token", - "notSet": "尚未設定", + "apiToken": "接口秘鑰", + "notSet": "未設定", "set": "已設定", - "effectAfterRestart": "該選項將在重新啓動軟體後生效", + "effectAfterRestart": "重啟後生效", "startAll": "全部開始", "pauseAll": "全部暫停", "deleteTask": "刪除任務", @@ -61,9 +62,16 @@ "newVersionUpdate": "立刻更新", "newVersionLater": "稍後更新", "extensions": "外掛程序", - "extensionInstallUrl": "安裝鏈接", - "extensionInstallSuccess": "安裝完成", + "extensionInstallUrl": "安裝URL", + "extensionInstallSuccess": "安裝成功", "extensionUpdateSuccess": "更新完成", "extensionDelete": "解除安裝", "extensionAlreadyLatest": "已是最新版本" -} + "extensionFind": "取得外掛", + "extensionDevelop": "開發外掛", + "history": "歷史記錄", + "clearHistory": "清空記錄", + "noHistoryFound": "還沒有記錄" + "serviceTitle": "下載服務", + "serviceText": "執行中" +} \ No newline at end of file