mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 14:35:43 -06:00
🎏 i18n improvements and translation
This commit is contained in:
parent
346b74baf9
commit
2e50aae48b
29 changed files with 114 additions and 52 deletions
2
assets/icons/language.svg
Normal file
2
assets/icons/language.svg
Normal file
|
@ -0,0 +1,2 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">
|
||||
<path fill="currentColor" d="M0 128C0 92.7 28.7 64 64 64H256h48 16H576c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H320 304 256 64c-35.3 0-64-28.7-64-64V128zm320 0V384H576V128H320zM178.3 175.9c-3.2-7.2-10.4-11.9-18.3-11.9s-15.1 4.7-18.3 11.9l-64 144c-4.5 10.1 .1 21.9 10.2 26.4s21.9-.1 26.4-10.2l8.9-20.1h73.6l8.9 20.1c4.5 10.1 16.3 14.6 26.4 10.2s14.6-16.3 10.2-26.4l-64-144zM160 233.2L179 276H141l19-42.8zM448 164c11 0 20 9 20 20v4h44 16c11 0 20 9 20 20s-9 20-20 20h-2l-1.6 4.5c-8.9 24.4-22.4 46.6-39.6 65.4c.9 .6 1.8 1.1 2.7 1.6l18.9 11.3c9.5 5.7 12.5 18 6.9 27.4s-18 12.5-27.4 6.9l-18.9-11.3c-4.5-2.7-8.8-5.5-13.1-8.5c-10.6 7.5-21.9 14-34 19.4l-3.6 1.6c-10.1 4.5-21.9-.1-26.4-10.2s.1-21.9 10.2-26.4l3.6-1.6c6.4-2.9 12.6-6.1 18.5-9.8l-12.2-12.2c-7.8-7.8-7.8-20.5 0-28.3s20.5-7.8 28.3 0l14.6 14.6 .5 .5c12.4-13.1 22.5-28.3 29.8-45H448 376c-11 0-20-9-20-20s9-20 20-20h52v-4c0-11 9-20 20-20z"/></svg>
|
After Width: | Height: | Size: 968 B |
27
exampleSite/config/_default/languages.de.toml
Normal file
27
exampleSite/config/_default/languages.de.toml
Normal file
|
@ -0,0 +1,27 @@
|
|||
languageCode = "en"
|
||||
languageName = "English"
|
||||
weight = 1
|
||||
title = "Blowfish"
|
||||
|
||||
[params]
|
||||
displayName = "EN"
|
||||
isoCode = "en"
|
||||
rtl = false
|
||||
dateFormat = "2 January 2006"
|
||||
logo = "img/blowfish_logo_transparent.png"
|
||||
# secondaryLogo = "PATH"
|
||||
description = "A powerful, lightweight theme for Hugo."
|
||||
# copyright = "Copy, _right?_ :thinking_face:"
|
||||
|
||||
[author]
|
||||
name = "Blowfish"
|
||||
image = "img/blowfish_logo.png"
|
||||
headline = "A powerful, lightweight theme for Hugo."
|
||||
bio = "A powerful, lightweight theme for Hugo."
|
||||
links = [
|
||||
{ x-twitter = "https://twitter.com/burufugu" },
|
||||
#{ mastodon = "https://masto.ai/@blowfish" },
|
||||
{ github = "https://github.com/nunocoracao/blowfish" },
|
||||
]
|
||||
|
||||
|
29
exampleSite/content/_index.de.md
Executable file
29
exampleSite/content/_index.de.md
Executable file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: "Welcome to Blowfish! :tada:"
|
||||
description: "This page was built using the Blowfish theme for Hugo."
|
||||
---
|
||||
|
||||
|
||||
<div class="flex px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||
<span class="flex items-center ltr:pr-3 rtl:pl-3 text-primary-400">
|
||||
{{< icon "triangle-exclamation" >}}
|
||||
</span>
|
||||
<span class="flex items-center justify-between grow dark:text-neutral-300">
|
||||
<span class="prose dark:prose-invert">This is a demo of the <code id="layout">background</code> layout.</span>
|
||||
<button
|
||||
id="switch-layout-button"
|
||||
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
||||
>
|
||||
Switch layout ↻
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
```node
|
||||
npx blowfish-tools
|
||||
```
|
||||
|
||||
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" >}}
|
||||
|
||||
|
|
@ -64,32 +64,32 @@ The theme currently supports the following languages by default:
|
|||
|
||||
| Language | Code |
|
||||
| ------------------------------ | ------- |
|
||||
| 🇦🇪 Arabic | `ar` |
|
||||
| 🇧🇬 Bulgarian | `bg` |
|
||||
| 🇧🇩 Bengali | `bn` |
|
||||
| 🇪🇸 Catalan | `ca` |
|
||||
| 🇨🇿 Czech | `cs` |
|
||||
| 🇩🇪 German | `de` |
|
||||
| 🇬🇧 English | `en` |
|
||||
| 🇪🇸 Spanish (Spain) | `es` |
|
||||
| 🇫🇮 Finnish | `fi` |
|
||||
| 🇫🇷 French | `fr` |
|
||||
| 🇮🇱 Hebrew | `he` |
|
||||
| 🇭🇷 Croatian | `hr` |
|
||||
| 🇭🇺 Hungarian | `hu` |
|
||||
| 🇮🇩 Indonesian | `id` |
|
||||
| 🇮🇹 Italian | `it` |
|
||||
| 🇯🇵 Japanese | `ja` |
|
||||
| 🇰🇷 Korean | `ko` |
|
||||
| 🇵🇱 Polish | `pl` |
|
||||
| 🇧🇷 Portuguese (Brazil) | `pt-br` |
|
||||
| 🇵🇹 Portuguese (Portugal) | `pt-pt` |
|
||||
| 🇷🇴 Romanian | `ro` |
|
||||
| 🇷🇺 Russian | `ru` |
|
||||
| 🇹🇷 Turkish | `tr` |
|
||||
| 🇻🇳 Vietnamese | `vi` |
|
||||
| 🇨🇳 Simplified Chinese (China) | `zh-cn` |
|
||||
| 🇹🇼 Traditional Chinese (Taiwan) | `zh-tw` |
|
||||
| Arabic | `ar` |
|
||||
| Bulgarian | `bg` |
|
||||
| Bengali | `bn` |
|
||||
| Catalan | `ca` |
|
||||
| Czech | `cs` |
|
||||
| German | `de` |
|
||||
| English | `en` |
|
||||
| Spanish (Spain) | `es` |
|
||||
| Finnish | `fi` |
|
||||
| French | `fr` |
|
||||
| Hebrew | `he` |
|
||||
| Croatian | `hr` |
|
||||
| Hungarian | `hu` |
|
||||
| Indonesian | `id` |
|
||||
| Italian | `it` |
|
||||
| Japanese | `ja` |
|
||||
| Korean | `ko` |
|
||||
| Polish | `pl` |
|
||||
| Portuguese (Brazil) | `pt-br` |
|
||||
| Portuguese (Portugal) | `pt-pt` |
|
||||
| Romanian | `ro` |
|
||||
| Russian | `ru` |
|
||||
| Turkish | `tr` |
|
||||
| Vietnamese | `vi` |
|
||||
| Simplified Chinese (China) | `zh-cn` |
|
||||
| Traditional Chinese (Taiwan) | `zh-tw` |
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ The full list of built-in icons and their corresponding names can referenced bel
|
|||
| keybase | {{< icon keybase >}} |
|
||||
| kickstarter | {{< icon kickstarter >}} |
|
||||
| ko-fi | {{< icon ko-fi >}} |
|
||||
| language | {{< icon language >}} |
|
||||
| lastfm | {{< icon lastfm >}} |
|
||||
| lightbulb | {{< icon lightbulb >}} |
|
||||
| link | {{< icon link >}} |
|
||||
|
@ -101,7 +102,7 @@ The full list of built-in icons and their corresponding names can referenced bel
|
|||
| sun | {{< icon sun >}} |
|
||||
| tag | {{< icon tag >}} |
|
||||
| telegram | {{< icon telegram >}} |
|
||||
| threads | {{< icon threads >}} |
|
||||
| threads | {{< icon threads >}} |
|
||||
| tiktok | {{< icon tiktok >}} |
|
||||
| triangle-exclamation | {{< icon triangle-exclamation >}} |
|
||||
| tumblr | {{< icon tumblr >}} |
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇧🇬"
|
||||
language: "BG"
|
||||
|
||||
article:
|
||||
anchor_label: "Котва"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇧🇩"
|
||||
language: "BN"
|
||||
|
||||
article:
|
||||
anchor_label: "Anchor"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇨🇿"
|
||||
language: "CS"
|
||||
|
||||
article:
|
||||
anchor_label: "Kotva"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇩🇪"
|
||||
language: "DE"
|
||||
|
||||
article:
|
||||
anchor_label: "Anker"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇬🇧"
|
||||
language: "EN"
|
||||
|
||||
article:
|
||||
anchor_label: "Anchor"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇪🇸"
|
||||
language: "ES"
|
||||
|
||||
article:
|
||||
anchor_label: "Ancla"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇫🇮"
|
||||
language: "FI"
|
||||
|
||||
article:
|
||||
anchor_label: "Ankkuri"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇫🇷"
|
||||
language: "FR"
|
||||
|
||||
article:
|
||||
anchor_label: "Ancre"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇮🇱"
|
||||
language: "HE"
|
||||
|
||||
article:
|
||||
anchor_label: "עוגן"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇭🇷"
|
||||
language: "HR"
|
||||
|
||||
article:
|
||||
anchor_label: "Sidro"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇭🇺"
|
||||
language: "HU"
|
||||
|
||||
article:
|
||||
anchor_label: "Horgony"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇮🇩"
|
||||
language: "ID"
|
||||
|
||||
article:
|
||||
anchor_label: "Anchor"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇮🇹"
|
||||
language: "IT"
|
||||
|
||||
article:
|
||||
anchor_label: "Ancora"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇯🇵"
|
||||
language: "JA"
|
||||
|
||||
article:
|
||||
anchor_label: "アンカー"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇵🇱"
|
||||
language: "PL"
|
||||
|
||||
article:
|
||||
anchor_label: "Kotwica"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇧🇷"
|
||||
language: "PT-BR"
|
||||
|
||||
article:
|
||||
anchor_label: "Âncora"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇵🇹"
|
||||
language: "PT-PT"
|
||||
|
||||
article:
|
||||
anchor_label: "Etiqueta"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇷🇴"
|
||||
language: "RO"
|
||||
|
||||
article:
|
||||
anchor_label: "Link"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇷🇺"
|
||||
language: "RU"
|
||||
|
||||
article:
|
||||
anchor_label: "Якорь"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇹🇷"
|
||||
language: "TR"
|
||||
|
||||
article:
|
||||
# anchor_label: "Anchor"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇻🇳"
|
||||
language: "VI"
|
||||
|
||||
article:
|
||||
anchor_label: "Neo"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇨🇳"
|
||||
language: "ZN-CN"
|
||||
|
||||
article:
|
||||
anchor_label: "锚点"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
global:
|
||||
language: "🇹🇼"
|
||||
language: "ZH-TW"
|
||||
|
||||
article:
|
||||
anchor_label: "定位點"
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{{ if .IsTranslated }}
|
||||
<div>
|
||||
<div class="cursor-pointer flex items-center nested-menu">
|
||||
<a href="#" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
|
||||
<span class="mr-1">
|
||||
{{ partial "icon.html" "language" }}
|
||||
</span>
|
||||
<div href="#" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
|
||||
{{- i18n "global.language" | markdownify | emojify -}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="absolute menuhide">
|
||||
<div class="pt-2 p-5 mt-2 rounded-xl shadow-2xl">
|
||||
|
|
Loading…
Reference in a new issue