🐛 Fix: Add "no more translations" judgment logic (#100)

This commit is contained in:
Cell
2022-04-09 23:00:42 +08:00
parent 22e67a0680
commit 28fe4dd019
5 changed files with 19 additions and 5 deletions
+4 -3
View File
@@ -5,10 +5,11 @@ All notable changes to this project will be documented in this file.
## v0.2.14
- :recycle: Refactor: header layout
- :tada: Add sub menu (nested menu) support ([#31](https://github.com/Lruihao/FixIt/issues/31))
- :tada: Feat: add sub menu (nested menu) support ([#31](https://github.com/Lruihao/FixIt/issues/31))
- :sparkles: Feat: add user-defined content to menu items via the params field ([#99](https://github.com/Lruihao/FixIt/issues/99))
- :sparkles: Modified language selector to submenu (@pandaoh[`eced169`](https://github.com/Lruihao/FixIt/commit/eced169713ce4a0208ce70ab556824e47eb671d5), @Lruihao[#31](https://github.com/Lruihao/FixIt/issues/31))
- :bug: Fix some header css bug ([#31](https://github.com/Lruihao/FixIt/issues/31))
- :sparkles: Feat: modified language selector to submenu (@pandaoh[`eced169`](https://github.com/Lruihao/FixIt/commit/eced169713ce4a0208ce70ab556824e47eb671d5), @Lruihao[#31](https://github.com/Lruihao/FixIt/issues/31))
- :bug: Fix: add "no more translations" judgment logic ([#100](https://github.com/Lruihao/FixIt/issues/100))
- :bug: Fix: fix some header css bug ([#31](https://github.com/Lruihao/FixIt/issues/31))
- :zap: Perf: remove third-party library clipboard.js ([#84](https://github.com/Lruihao/FixIt/issues/84))
- :pencil2: Docs: fix highlight url typo in `theme-documentation-built-in-shortcodes` (@d-baer[#85](https://github.com/Lruihao/FixIt/pull/85))
- **Full Changelog:** @Lruihao [`v0.2.13...v0.2.14`](https://github.com/Lruihao/FixIt/compare/v0.2.13...v0.2.14)
+3
View File
@@ -45,6 +45,9 @@ other = "More"
[selectLanguage]
other = "Select Language"
[noMoretTranslations]
other = "No more translations"
[switchTheme]
other = "Switch Theme"
# === partials/header.html ===
+3
View File
@@ -46,6 +46,9 @@ other = "更多"
[selectLanguage]
other = "选择语言"
[noMoretTranslations]
other = "没有更多翻译"
[switchTheme]
other = "切换主题"
# === partials/header.html ===
+3
View File
@@ -46,6 +46,9 @@ other = "更多"
[selectLanguage]
other = "選擇語言"
[noMoretTranslations]
other = "沒有更多翻譯"
[switchTheme]
other = "切換主題"
# === partials/header.html ===
+6 -2
View File
@@ -101,7 +101,7 @@
</li>
{{- end -}}
{{- end -}}
{{- else -}}
{{- else if gt (len .AllTranslations) 1 -}}
{{- range .AllTranslations -}}
{{- if ne .Lang $.Lang -}}
<li class="menu-item">
@@ -111,6 +111,8 @@
</li>
{{- end -}}
{{- end -}}
{{- else -}}
<li class="menu-item">{{- T "noMoretTranslations" -}}</li>
{{- end -}}
</ul>
</li>
@@ -271,12 +273,14 @@
{{- .Language.LanguageName -}}
</option>
{{- end -}}
{{- else -}}
{{- else if gt (len .AllTranslations) 1 -}}
{{- range .AllTranslations -}}
<option value="{{ .RelPermalink }}"{{ if eq .Lang $.Lang }} selected disabled{{ end }}>
{{- .Language.LanguageName -}}
</option>
{{- end -}}
{{- else -}}
<option disabled>{{- T "noMoretTranslations" -}}</option>
{{- end -}}
</select>
</li>