Ver Fonte

【新增,国际化】扩展多语言支持并优化部署文档

添加繁体中文(zh-HK/zh-TW)及 20+ 语言支持,
移除 README 中重复的部署命令,
提升国际化覆盖范围。
PJ568 há 1 ano atrás
pai
commit
df07cf451a
5 ficheiros alterados com 50 adições e 6 exclusões
  1. 0 2
      README.en.md
  2. 0 2
      README.md
  3. 1 1
      templates/base/footer.tmpl
  4. 1 1
      templates/base/head.tmpl
  5. 48 0
      templates/home.tmpl

+ 0 - 2
README.en.md

@@ -22,8 +22,6 @@
    ```shellscript
    cp -uvr swb-gogs-theme/public path/to/your/gogs/custom/public
    cp -uvr swb-gogs-theme/templates path/to/your/gogs/custom/templates
-   cp -uvr swb-gogs-theme/public path/to/your/gogs/public
-   cp -uvr swb-gogs-theme/templates path/to/your/gogs/templates
    # docker compose restart gogs
    ```
 

+ 0 - 2
README.md

@@ -22,8 +22,6 @@
    ```shellscript
    cp -uvr swb-gogs-theme/public path/to/your/gogs/custom/public
    cp -uvr swb-gogs-theme/templates path/to/your/gogs/custom/templates
-   cp -uvr swb-gogs-theme/public path/to/your/gogs/public
-   cp -uvr swb-gogs-theme/templates path/to/your/gogs/templates
    # docker compose restart gogs
    ```
 

+ 1 - 1
templates/base/footer.tmpl

@@ -7,7 +7,7 @@
 	<footer>
 		<div class="ui container">
 			<div class="ui left">
-				© {{Year}} {{if eq .Lang "zh-CN"}}随变{{else}}{{AppName}}{{end}}
+				© {{Year}} {{if eq .Lang "zh-CN"}}随变{{else if or (eq .Lang "zh-HK") (eq .Lang "zh-TW")}}隨變{{else}}{{AppName}}{{end}}
 			</div>
 			<div class="ui right links">
 				<a class="dark-btn" title="{{if eq .Lang "zh-CN"}}切换深色模式{{else}}Toggle darkmode{{end}}"><i class="octicon octicon-light-bulb rear"></i></a>

+ 1 - 1
templates/base/head.tmpl

@@ -77,7 +77,7 @@
 	<script src="{{AppSubURL}}/js/swaybien.js"></script>
 	<script src="{{AppSubURL}}/js/gogs.js?v={{BuildCommit}}"></script>
 
-	<title>{{if .Title}}{{.Title}} - {{end}}{{if eq .Lang "zh-CN"}}随变{{else}}{{AppName}}{{end}}</title>
+	<title>{{if .Title}}{{.Title}} - {{end}}{{if eq .Lang "zh-CN"}}随变{{else if or (eq .Lang "zh-HK") (eq .Lang "zh-TW")}}隨變{{else}}{{AppName}}{{end}}</title>
 
 	<meta name="theme-color" content="{{ThemeColorMetaTag}}">
 

+ 48 - 0
templates/home.tmpl

@@ -10,18 +10,66 @@
 				<h2>Code-Repository des SwayBien-Teams</h2>
 			{{else if eq .Lang "zh-CN"}}
 				<h2>随变团队的代码仓库</h2>
+			{{else if eq .Lang "zh-HK"}}
+				<h2>隨變團隊的代碼倉庫</h2>
+			{{else if eq .Lang "zh-TW"}}
+				<h2>隨變團隊的程式碼倉庫</h2>
 			{{else if eq .Lang "fr-FR"}}
 				<h2>Dépôt de code de l'équipe SwayBien</h2>
 			{{else if eq .Lang "es-ES"}}
 				<h2>Repositorio de código del equipo SwayBien</h2>
 			{{else if eq .Lang "pt-BR"}}
 				<h2>Repositório de código da equipe SwayBien</h2>
+			{{else if eq .Lang "pt-PT"}}
+				<h2>Repositório de código da equipa SwayBien</h2>
 			{{else if eq .Lang "ru-RU"}}
 				<h2>Репозиторий кода команды SwayBien</h2>
 			{{else if eq .Lang "uk-UA"}}
 				<h2>Репозиторій коду команди SwayBien</h2>
 			{{else if eq .Lang "it-IT"}}
 				<h2>Repository di codice del team SwayBien</h2>
+			{{else if eq .Lang "nl-NL"}}
+				<h2>Code repository van het SwayBien-team</h2>
+			{{else if eq .Lang "lv-LV"}}
+				<h2>SwayBien komandas koda repozitorijs</h2>
+			{{else if eq .Lang "ja-JP"}}
+				<h2>SwayBien チームのコードリポジトリ</h2>
+			{{else if eq .Lang "pl-PL"}}
+				<h2>Repozytorium kodu zespołu SwayBien</h2>
+			{{else if eq .Lang "bg-BG"}}
+				<h2>Хранилище за код на екипа SwayBien</h2>
+			{{else if eq .Lang "fi-FI"}}
+				<h2>SwayBien-tiimin koodirepositorio</h2>
+			{{else if eq .Lang "tr-TR"}}
+				<h2>SwayBien ekibinin kod deposu</h2>
+			{{else if eq .Lang "cs-CZ"}}
+				<h2>Kódový repozitář týmu SwayBien</h2>
+			{{else if eq .Lang "sr-SP"}}
+				<h2>Кодни репозиторијум тима SwayBien</h2>
+			{{else if eq .Lang "sv-SE"}}
+				<h2>SwayBien-teamets kodförråd</h2>
+			{{else if eq .Lang "ko-KR"}}
+				<h2>SwayBien 팀 코드 저장소</h2>
+			{{else if eq .Lang "gl-ES"}}
+				<h2>Repositorio de código do equipo SwayBien</h2>
+			{{else if eq .Lang "en-GB"}}
+				<h2>SwayBien Team Code Repository</h2>
+			{{else if eq .Lang "en-US"}}
+				<h2>SwayBien Team Code Repository</h2>
+			{{else if eq .Lang "hu-HU"}}
+				<h2>A SwayBien csapat kód tárolója</h2>
+			{{else if eq .Lang "sk-SK"}}
+				<h2>Kódový repozitár tímu SwayBien</h2>
+			{{else if eq .Lang "id-ID"}}
+				<h2>Repositori kode tim SwayBien</h2>
+			{{else if eq .Lang "fa-IR"}}
+				<h2>مخزن کد تیم SwayBien</h2>
+			{{else if eq .Lang "vi-VN"}}
+				<h2>Kho mã của nhóm SwayBien</h2>
+			{{else if eq .Lang "mn-MN"}}
+				<h2>SwayBien багийн кодын сан</h2>
+			{{else if eq .Lang "ro-RO"}}
+				<h2>Depozitul de cod al echipei SwayBien</h2>
 			{{else}}
 				<h2>SwayBien Team Code Repository</h2>
 			{{end}}