mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-21 13:39:30 -07:00
refactor: remove i18n labels and centralize in config
Delete multilingual i18n files for UI labels. Add English labels to params.toml under [labels]. Update 404.html, single.html, and nav.html to use site.Params.labels instead of i18n. Signed-off-by: Sped0n <hi@sped0n.com>
This commit is contained in:
@@ -18,7 +18,7 @@ hiResOpt = "2500x webp Lanczos q75"
|
|||||||
# unified alt text for all images in the page
|
# unified alt text for all images in the page
|
||||||
unifiedAlt = ''
|
unifiedAlt = ''
|
||||||
|
|
||||||
# Site verification code for Google/Bing/Yandex/Pinterest/Baidu
|
# site verification code for Google/Bing/Yandex/Pinterest/Baidu
|
||||||
[verification]
|
[verification]
|
||||||
google = ""
|
google = ""
|
||||||
bing = ""
|
bing = ""
|
||||||
@@ -28,7 +28,7 @@ baidu = ""
|
|||||||
so = ""
|
so = ""
|
||||||
sogou = ""
|
sogou = ""
|
||||||
|
|
||||||
# Analytics config
|
# analytics config
|
||||||
[analytics]
|
[analytics]
|
||||||
enable = true
|
enable = true
|
||||||
# Google Analytics
|
# Google Analytics
|
||||||
@@ -66,3 +66,12 @@ No_cookie = true
|
|||||||
Do_not_track = true
|
Do_not_track = true
|
||||||
# token(optional), more info on https://splitbee.io/docs/embed-the-script
|
# token(optional), more info on https://splitbee.io/docs/embed-the-script
|
||||||
data_token = ""
|
data_token = ""
|
||||||
|
|
||||||
|
# labels
|
||||||
|
[labels]
|
||||||
|
next = "next"
|
||||||
|
prev = "prev"
|
||||||
|
close = "close"
|
||||||
|
threshold = "Threshold"
|
||||||
|
error = "page not found"
|
||||||
|
other = "loading..."
|
||||||
|
|||||||
12
i18n/de.toml
12
i18n/de.toml
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "nächste"
|
|
||||||
[prev]
|
|
||||||
other = "vorher"
|
|
||||||
[close]
|
|
||||||
other = "schließen"
|
|
||||||
[threshold]
|
|
||||||
other = "schwelle"
|
|
||||||
[404]
|
|
||||||
other = "seite nicht gefunden"
|
|
||||||
[loading]
|
|
||||||
other = "lade..."
|
|
||||||
12
i18n/en.toml
12
i18n/en.toml
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "next"
|
|
||||||
[prev]
|
|
||||||
other = "prev"
|
|
||||||
[close]
|
|
||||||
other = "close"
|
|
||||||
[threshold]
|
|
||||||
other = "threshold"
|
|
||||||
[404]
|
|
||||||
other = "page not found"
|
|
||||||
[loading]
|
|
||||||
other = "loading..."
|
|
||||||
12
i18n/es.toml
12
i18n/es.toml
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "siguiente"
|
|
||||||
[prev]
|
|
||||||
other = "previo"
|
|
||||||
[close]
|
|
||||||
other = "cerrar"
|
|
||||||
[threshold]
|
|
||||||
other = "umbral"
|
|
||||||
[404]
|
|
||||||
other = "página no encontrada"
|
|
||||||
[loading]
|
|
||||||
other = "cargando..."
|
|
||||||
12
i18n/fr.toml
12
i18n/fr.toml
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "suivant"
|
|
||||||
[prev]
|
|
||||||
other = "précédent"
|
|
||||||
[close]
|
|
||||||
other = "fermer"
|
|
||||||
[threshold]
|
|
||||||
other = "seuil"
|
|
||||||
[404]
|
|
||||||
other = "page non trouvée"
|
|
||||||
[loading]
|
|
||||||
other = "chargement..."
|
|
||||||
12
i18n/it.toml
12
i18n/it.toml
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "prossimo"
|
|
||||||
[prev]
|
|
||||||
other = "precedente"
|
|
||||||
[close]
|
|
||||||
other = "chiudi"
|
|
||||||
[threshold]
|
|
||||||
other = "soglia"
|
|
||||||
[404]
|
|
||||||
other = "pagina non trovata"
|
|
||||||
[loading]
|
|
||||||
other = "caricamento..."
|
|
||||||
12
i18n/ja.toml
12
i18n/ja.toml
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "進む"
|
|
||||||
[prev]
|
|
||||||
other = "後退"
|
|
||||||
[close]
|
|
||||||
other = "閉じる"
|
|
||||||
[threshold]
|
|
||||||
other = "しきい値"
|
|
||||||
[404]
|
|
||||||
other = "ページが見つかりません"
|
|
||||||
[loading]
|
|
||||||
other = "読み込み中..."
|
|
||||||
12
i18n/ko.toml
12
i18n/ko.toml
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "전진"
|
|
||||||
[prev]
|
|
||||||
other = "물러나세요"
|
|
||||||
[close]
|
|
||||||
other = "닫기"
|
|
||||||
[threshold]
|
|
||||||
other = "임계값"
|
|
||||||
[404]
|
|
||||||
other = "페이지를 찾을 수 없습니다"
|
|
||||||
[loading]
|
|
||||||
other = "로딩중..."
|
|
||||||
12
i18n/ta.toml
12
i18n/ta.toml
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "அடுத்தது"
|
|
||||||
[prev]
|
|
||||||
other = "முந்தையது"
|
|
||||||
[close]
|
|
||||||
other = "வெளியே செல்ல"
|
|
||||||
[threshold]
|
|
||||||
other = "எல்லை"
|
|
||||||
[404]
|
|
||||||
other = "பக்கம் காணப்படவில்லை"
|
|
||||||
[loading]
|
|
||||||
other = "பதிவேற்றம் நடக்கிறது..."
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "前进"
|
|
||||||
[prev]
|
|
||||||
other = "后退"
|
|
||||||
[close]
|
|
||||||
other = "关闭"
|
|
||||||
[threshold]
|
|
||||||
other = "阈值"
|
|
||||||
[404]
|
|
||||||
other = "页面不存在"
|
|
||||||
[loading]
|
|
||||||
other = "加载中..."
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "前進"
|
|
||||||
[prev]
|
|
||||||
other = "後退"
|
|
||||||
[close]
|
|
||||||
other = "關閉"
|
|
||||||
[threshold]
|
|
||||||
other = "閾值"
|
|
||||||
[404]
|
|
||||||
other = "找不到頁面"
|
|
||||||
[loading]
|
|
||||||
other = "載入中..."
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "前進"
|
|
||||||
[prev]
|
|
||||||
other = "後退"
|
|
||||||
[close]
|
|
||||||
other = "關閉"
|
|
||||||
[threshold]
|
|
||||||
other = "閾值"
|
|
||||||
[404]
|
|
||||||
other = "找不到頁面"
|
|
||||||
[loading]
|
|
||||||
other = "載入中..."
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "前进"
|
|
||||||
[prev]
|
|
||||||
other = "后退"
|
|
||||||
[close]
|
|
||||||
other = "关闭"
|
|
||||||
[threshold]
|
|
||||||
other = "阈值"
|
|
||||||
[404]
|
|
||||||
other = "页面不存在"
|
|
||||||
[loading]
|
|
||||||
other = "加载中..."
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[next]
|
|
||||||
other = "前進"
|
|
||||||
[prev]
|
|
||||||
other = "後退"
|
|
||||||
[close]
|
|
||||||
other = "關閉"
|
|
||||||
[threshold]
|
|
||||||
other = "閾值"
|
|
||||||
[404]
|
|
||||||
other = "找不到頁面"
|
|
||||||
[loading]
|
|
||||||
other = "載入中..."
|
|
||||||
@@ -2,9 +2,15 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
{{- partial "nav.html" . -}}
|
{{- partial "nav.html" . -}}
|
||||||
<article>
|
<article>
|
||||||
<p class="error">⛝ <u>404</u> {{- i18n 404 -}} ⛝</p>
|
<p class="error">
|
||||||
<p class="error">⛝ <u>404</u> {{- i18n 404 -}} ⛝</p>
|
⛝ <u>404</u> {{- site.Params.labels.error -}} ⛝
|
||||||
<p class="error">⛝ <u>404</u> {{- i18n 404 -}} ⛝</p>
|
</p>
|
||||||
|
<p class="error">
|
||||||
|
⛝ <u>404</u> {{- site.Params.labels.error -}} ⛝
|
||||||
|
</p>
|
||||||
|
<p class="error">
|
||||||
|
⛝ <u>404</u> {{- site.Params.labels.error -}} ⛝
|
||||||
|
</p>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{{- define "main" -}}
|
{{- define "main" -}}
|
||||||
<div
|
<div
|
||||||
class="container"
|
class="container"
|
||||||
data-next="{{- i18n "next" -}}"
|
data-next="{{- site.Params.labels.next -}}"
|
||||||
data-prev="{{- i18n "prev" -}}"
|
data-prev="{{- site.Params.labels.prev -}}"
|
||||||
data-close="{{- i18n "close" -}}"
|
data-close="{{- site.Params.labels.close -}}"
|
||||||
data-loading="{{- i18n "loading" -}}"
|
data-loading="{{- site.Params.labels.loading -}}"
|
||||||
>
|
>
|
||||||
{{- with .Content -}}
|
{{- with .Content -}}
|
||||||
<article>
|
<article>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
{{- with partial "function/getImageSlice.html" . -}}
|
{{- with partial "function/getImageSlice.html" . -}}
|
||||||
{{- $length = len . -}}
|
{{- $length = len . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<span>{{- i18n "threshold" | strings.FirstUpper -}}:</span>
|
<span>{{- site.Params.labels.threshold -}}:</span>
|
||||||
<span>
|
<span>
|
||||||
<button class="dec">-</button>
|
<button class="dec">-</button>
|
||||||
<span class="num"></span><span class="num"></span><span class="num"></span
|
<span class="num"></span><span class="num"></span><span class="num"></span
|
||||||
|
|||||||
Reference in New Issue
Block a user