🌐 feat(i18n): overhaul translation system & add languages (#145)
Revamp the existing translation system, simplifying management and adding several new languages. The new system reads from TOML files in the `/i18n` directory and improves template structures. It also enhances customisation options and robustness by providing fallbacks and modularity. - Implement a new, streamlined translation macro. - Load translations from `/i18n` TOML files. - Remove redundant configuration requirements. - Refactor templates to align with new i18n system. - Add support for Hindi, Japanese, Russian, Portuguese, Chinese, Italian, German, Ukranian, Korean, and French languages. - Credit Thomas Weitzel (@thomasweitzel) for inspiration.main
parent
327545f2d5
commit
32a2d5094b
@ -0,0 +1,129 @@
|
||||
+++
|
||||
title = "Lost in Translation? Explora les capacitats multilingües de tabi"
|
||||
date = 2023-09-12
|
||||
description = "Descobreix com tabi t'ajuda a connectar amb una audiència global gràcies a les seves funcions multilingües. Aprèn a canviar la llengua per defecte, afegir més llengües i aportar les teves pròpies traduccions."
|
||||
|
||||
[taxonomies]
|
||||
tags = ["funcionalitat", "tutorial", "Preguntes Freqüents"]
|
||||
|
||||
[extra]
|
||||
quick_navigation_buttons = true
|
||||
toc_ignore_pattern = "^(Preguntes Freqüents)"
|
||||
+++
|
||||
|
||||
tabi simplifica el procés de creació de llocs web multilingües perquè puguis connectar amb una audiència global. En aquesta guia, t'explicarem tot el que necessites saber, des de com configurar la llengua principal en el teu lloc fins a com contribuir amb les teves pròpies traduccions. Comencem!
|
||||
|
||||
### Preguntes Freqüents
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
## Quines llengües admet tabi?
|
||||
|
||||
tabi admet les següents llengües:
|
||||
|
||||
- Alemany
|
||||
- Anglès
|
||||
- Català
|
||||
- Coreà
|
||||
- Espanyol
|
||||
- Francès
|
||||
- Hindi
|
||||
- Italià
|
||||
- Japonès
|
||||
- Portuguès (Europeu)
|
||||
- Rus
|
||||
- Ucraïnès
|
||||
- Xinès (Simplificat)
|
||||
|
||||
Per a una llista sempre actualitzada de llengües suportades, consulta la [carpeta `i18n`](https://github.com/welpo/tabi/tree/main/i18n) en el repositori de tabi.
|
||||
|
||||
## Com estableixo la llengua predeterminada del meu lloc?
|
||||
|
||||
Pots definir la llengua principal del teu lloc configurant la variable `default_language` a `config.toml`.
|
||||
|
||||
Per exemple, si vols que la llengua principal sigui el Xinès, simplement afegeix aquesta línia a l'arxiu `config.toml`:
|
||||
|
||||
```toml, hl_lines=03
|
||||
base_url = "https://welpo.github.io/tabi"
|
||||
title = "~/tabi"
|
||||
default_language = "zh"
|
||||
```
|
||||
|
||||
tabi es traduirà a aquesta llengua, si està suportada.
|
||||
|
||||
## Com gestiona tabi el suport multilingüe?
|
||||
|
||||
Zola genera automàticament URLs per a cada llengua que no sigui la predeterminada de la següent manera: `{base_url}/{codi_idioma}/{post}`.
|
||||
|
||||
tabi facilita la navegació entre llengües afegint un commutador de llengua en la barra de navegació (que només es mostra quan hi ha més d'una llengua habilitada).
|
||||
|
||||
Si [pujes](#) a la barra de navegació, veuràs el commutador de llengua. En passar el cursor sobre ell, es mostrarà un desplegable amb les llengües disponibles. Si fas clic en el nom d'una llengua, et portarà a la mateixa pàgina en aquesta llengua.
|
||||
|
||||
Si una pàgina específica no està disponible en una llengua, tabi mostrarà una pàgina 404 amb el text:
|
||||
|
||||
> La pàgina que has sol·licitat sembla que no existeix o encara no s'ha traduït al teu idioma. Comprova l'URL per detectar errors o torna a la pàgina d'inici.
|
||||
|
||||
Aquest text es mostrarà una vegada per cada llengua activada en el teu lloc. Pots veure aquesta pàgina en acció [aquí](https://welpo.github.io/tabi/404.html).
|
||||
|
||||
## Com activo el suport multilingüe?
|
||||
|
||||
Per habilitar el suport per a diverses llengües, necessites configurar la variable `languages` a `config.toml`. Per exemple, si vols un lloc amb anglès com a llengua principal que també admeti hindi i espanyol, pots configurar el teu `config.toml` de la següent manera:
|
||||
|
||||
```toml
|
||||
base_url = "https://example.com"
|
||||
title = "My Site"
|
||||
default_language = "en"
|
||||
|
||||
[languages.hi]
|
||||
title = "मेरी वेबसाइट"
|
||||
|
||||
[languages.es]
|
||||
title = "El meu web"
|
||||
```
|
||||
|
||||
En cada secció de llengua pots establir altres variables com `taxonomies`, `description`… Consulta la [documentació de suport multilingüe de Zola](https://www.getzola.org/documentation/content/multilingual/) per a més informació.
|
||||
|
||||
## Què són aquests codis de dues lletres?
|
||||
|
||||
Els codis de dues lletres són [codis d'idioma ISO 639-1](https://localizely.com/iso-639-1-list/), que serveixen per identificar idiomes d'una manera estandarditzada.
|
||||
|
||||
tabi utilitza aquests codis per permetre la navegació entre idiomes i traduir el tema.
|
||||
|
||||
## Com personalitzo o reemplaço una cadena de text específica al meu lloc web?
|
||||
|
||||
tabi cerca els fitxers de cadenes en el següent ordre. `$base_directory` és on resideix el teu lloc Zola (allà on està `config.toml`):
|
||||
|
||||
1. `$base_directory + "i18n"`
|
||||
2. `$base_directory + "themes/tabi/i18n"`
|
||||
|
||||
Per tant, si crees `i18n/ca.toml` al teu directori base, tabi llegirà les cadenes de text d'aquest fitxer en lloc de les cadenes predeterminades en català. Pots fer això per a qualsevol idioma, suportat o no.
|
||||
|
||||
Assegura't de copiar tot el fitxer per a aquest idioma primer, o el tema utilitzarà l'anglès per les claus que faltin.
|
||||
|
||||
## Què passa si falta una traducció o està incompleta?
|
||||
|
||||
Si una cadena no es troba en el fitxer d'idioma, tabi recorrerà a la cadena predeterminada en català.
|
||||
|
||||
## El meu idioma no està suportat. Puc contribuir amb una traducció?
|
||||
|
||||
És clar! Sempre estem buscant afegir suport per a més idiomes. Pots contribuir amb una traducció creant una Pull Request al [repositori de tabi](https://github.com/welpo/tabi).
|
||||
|
||||
Pots utilitzar el [fitxer en català](https://github.com/welpo/tabi/blob/main/i18n/ca.toml) com a base per traduir les cadenes al teu idioma. Assegura't de mantenir la mateixa estructura.
|
||||
|
||||
El fitxer ha de portar el nom del codi de dues lletres del teu idioma i ha de ser un fitxer TOML. Per exemple, si vols afegir suport per al suahili, pots crear un fitxer anomenat `sw.toml` al directori `i18n`.
|
||||
|
||||
Nota: quan provis la teva traducció, és possible que necessitis reiniciar `zola serve` per veure els canvis, ja que Zola no sempre detecta canvis en els fitxers TOML.
|
||||
|
||||
## He trobat un error en una traducció. Com el corregeixo?
|
||||
|
||||
Si trobes un error en una traducció, pots crear un problema o una sol·licitud d'extracció al [repositori de tabi](https://github.com/welpo/tabi).
|
||||
|
||||
## Com actualitzo les traduccions després d'una actualització del tema?
|
||||
|
||||
Si no vas personalitzar les traduccions, simplement actualitza el tema.
|
||||
|
||||
Si ho vas fer, hauràs d'actualitzar manualment les traduccions. Pots fer-ho copiant les noves cadenes dels fitxers corresponents i enganxant-les al teu fitxer personalitzat.
|
||||
|
||||
## tabi tradueix el meu contingut?
|
||||
|
||||
No. tabi només tradueix les cadenes de text del tema. Hauràs de traduir el teu contingut tu mateix.
|
@ -0,0 +1,129 @@
|
||||
+++
|
||||
title = "¿Lost in Translation? Explora las capacidades multilingües de tabi"
|
||||
date = 2023-09-12
|
||||
description = "Descubre cómo tabi te ayuda a conectar con una audiencia global gracias a sus funciones multilingües. Aprende a cambiar el idioma por defecto, añadir más idiomas y aportar tus propias traducciones."
|
||||
|
||||
[taxonomies]
|
||||
tags = ["funcionalidad", "tutorial", "Preguntas Frecuentes"]
|
||||
|
||||
[extra]
|
||||
quick_navigation_buttons = true
|
||||
toc_ignore_pattern = "^(Preguntas Frecuentes)"
|
||||
+++
|
||||
|
||||
tabi simplifica el proceso de crear sitios web multilingües para que puedas conectar con una audiencia global. En esta guía, te explicaremos todo lo que necesitas saber, desde cómo configurar el idioma principal en tu sitio hasta cómo contribuir con tus propias traducciones. ¡Empecemos!
|
||||
|
||||
### Preguntas Frecuentes
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
## ¿Qué idiomas admite tabi?
|
||||
|
||||
tabi admite los siguientes idiomas:
|
||||
|
||||
- Alemán
|
||||
- Catalán
|
||||
- Chino (Simplificado)
|
||||
- Coreano
|
||||
- Español
|
||||
- Francés
|
||||
- Hindi
|
||||
- Inglés
|
||||
- Italiano
|
||||
- Japonés
|
||||
- Portugués (Europeo)
|
||||
- Ruso
|
||||
- Ucraniano
|
||||
|
||||
Para una lista siempre actualizada de idiomas soportados, consulta la [carpeta `i18n`](https://github.com/welpo/tabi/tree/main/i18n) en el repositorio de tabi.
|
||||
|
||||
## ¿Cómo establezco el idioma predeterminado de mi sitio?
|
||||
|
||||
Puedes definir el idioma principal de tu sitio configurando la variable `default_language` en tu archivo `config.toml`.
|
||||
|
||||
Por ejemplo, si deseas que el idioma principal sea el Chino, simplemente añade esta línea al archivo `config.toml`:
|
||||
|
||||
```toml, hl_lines=03
|
||||
base_url = "https://welpo.github.io/tabi"
|
||||
title = "~/tabi"
|
||||
default_language = "zh"
|
||||
```
|
||||
|
||||
tabi se traducirá a ese idioma, si está soportado.
|
||||
|
||||
## ¿Cómo gestiona tabi el soporte multilingüe?
|
||||
|
||||
Zola genera automáticamente URLs para cada idioma que no sea el predeterminado de la siguiente manera: `{base_url}/{código_idioma}/{post}`.
|
||||
|
||||
tabi facilita la navegación entre idiomas añadiendo un conmutador de idioma en la barra de navegación (que sólo se muestra cuando hay más de un idioma habilitado).
|
||||
|
||||
Si [subes](#) a la barra de navegación, verás el conmutador de idioma. Al pasar el cursor sobre él, se mostrará un desplegable con los idiomas disponibles. Si haces clic en el nombre de un idioma, te llevará a la misma página en ese idioma.
|
||||
|
||||
Si una página específica no está disponible en un idioma, tabi mostrará una página 404 con el texto:
|
||||
|
||||
> La página que has solicitado parece no existir o aún no se ha traducido a tu idioma. Revisa la URL en busca de errores o regresa a la página de inicio.
|
||||
|
||||
Este texto se mostrará una vez por cada idioma activado en tu sitio. Puedes ver esta página en acción [aquí](https://welpo.github.io/tabi/404.html).
|
||||
|
||||
## ¿Cómo activo el soporte multilingüe?
|
||||
|
||||
Para habilitar el soporte para varios idiomas, necesitas configurar la variable `languages` en `config.toml`. Por ejemplo, si quieres un sitio con inglés como idioma principal que también admita hindi y español, puedes configurar tu `config.toml` de la siguiente manera:
|
||||
|
||||
```toml
|
||||
base_url = "https://example.com"
|
||||
title = "My Site"
|
||||
default_language = "en"
|
||||
|
||||
[languages.hi]
|
||||
title = "मेरी वेबसाइट"
|
||||
|
||||
[languages.es]
|
||||
title = "Mi web"
|
||||
```
|
||||
|
||||
En cada sección de idioma puedes establecer otras variables como `taxonomies`, `description`… Consulta la [documentación de soporte multilingüe de Zola](https://www.getzola.org/documentation/content/multilingual/) para más información.
|
||||
|
||||
## ¿Qué son estos códigos de dos letras?
|
||||
|
||||
Los códigos de dos letras son [códigos de idioma ISO 639-1](https://localizely.com/iso-639-1-list/), que sirven para identificar idiomas de una manera estandarizada.
|
||||
|
||||
tabi utiliza estos códigos para permitir la navegación entre idiomas y traducir el tema.
|
||||
|
||||
## ¿Cómo personalizo o reemplazo una cadena de texto específica en mi sitio web?
|
||||
|
||||
tabi busca los archivos de cadenas en el siguiente orden. `$base_directory` es donde reside tu sitio Zola (donde se guarda `config.toml`):
|
||||
|
||||
1. `$base_directory + "i18n"`
|
||||
2. `$base_directory + "themes/tabi/i18n"`
|
||||
|
||||
Por lo tanto, si creas `i18n/en.toml` en tu directorio base, tabi leerá las cadenas de texto de ese archivo en lugar de las cadenas predeterminadas en inglés. Puedes hacer esto para cualquier idioma, soportado o no.
|
||||
|
||||
Asegúrate de copiar todo el archivo para ese idioma primero, o el tema usará el inglés para las claves faltantes.
|
||||
|
||||
## ¿Qué pasa si falta una traducción o está incompleta?
|
||||
|
||||
Si una cadena no se encuentra en el archivo de idioma, tabi recurrirá a la cadena predeterminada en inglés.
|
||||
|
||||
## Mi idioma no está soportado. ¿Puedo contribuir con una traducción?
|
||||
|
||||
¡Por supuesto! Siempre estamos buscando añadir soporte para más idiomas. Puedes contribuir con una traducción creando una Pull Request en el [repositorio de tabi](https://github.com/welpo/tabi).
|
||||
|
||||
Puedes usar el [archivo en inglés](https://github.com/welpo/tabi/blob/main/i18n/en.toml) como base para traducir las cadenas a tu idioma. Asegúrate de mantener la misma estructura.
|
||||
|
||||
El archivo debe llevar el nombre del código de dos letras de tu idioma y debe ser un archivo TOML. Por ejemplo, si quieres añadir soporte para el suajili, puedes crear un archivo llamado `sw.toml` en el directorio `i18n`.
|
||||
|
||||
Nota: cuando pruebes tu traducción, es posible que necesites reiniciar `zola serve` para ver los cambios, ya que Zola no siempre detecta cambios en los archivos TOML.
|
||||
|
||||
## He encontrado un error en una traducción. ¿Cómo lo corrijo?
|
||||
|
||||
Si encuentras un error en una traducción, puedes crear un problema o una solicitud de extracción en el [repositorio de tabi](https://github.com/welpo/tabi).
|
||||
|
||||
## ¿Cómo actualizo las traducciones después de una actualización del tema?
|
||||
|
||||
Si no personalizaste las traducciones, basta con actualizar el tema.
|
||||
|
||||
Si lo hiciste, tendrás que actualizar manualmente las traducciones. Puedes hacerlo copiando las nuevas cadenas de los archivos correspondientes y pegándolas en tu archivo personalizado.
|
||||
|
||||
## ¿tabi traduce el contenido de mi sitio?
|
||||
|
||||
No. tabi sólo traduce el tema. Los posts deberás traducirlos tú mismo.
|
@ -0,0 +1,129 @@
|
||||
+++
|
||||
title = "Lost in Translation? Not with tabi's Multilingual Capabilities"
|
||||
date = 2023-09-12
|
||||
description = "Master the art of serving a global audience through tabi's built-in multilingual features. Learn how to change the default language, add multilingual support, and contribute your own translations."
|
||||
|
||||
[taxonomies]
|
||||
tags = ["showcase", "tutorial", "FAQ"]
|
||||
|
||||
[extra]
|
||||
quick_navigation_buttons = true
|
||||
toc_ignore_pattern = "^(Frequently Asked Questions)"
|
||||
+++
|
||||
|
||||
To broaden your reach to a global audience, tabi streamlines the process of building multilingual websites. In this guide, we'll walk you through everything you need to know—from setting a default language for your site to contributing your own translations. Let's get started!
|
||||
|
||||
### Frequently Asked Questions
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
## What languages does tabi support?
|
||||
|
||||
tabi supports the following languages:
|
||||
|
||||
- Catalan
|
||||
- Chinese (Simplified)
|
||||
- English
|
||||
- French
|
||||
- German
|
||||
- Hindi
|
||||
- Italian
|
||||
- Japanese
|
||||
- Korean
|
||||
- Portuguese (European)
|
||||
- Russian
|
||||
- Spanish
|
||||
- Ukranian
|
||||
|
||||
For an always up to date list of supported languages, refer to the [`i18n` directory](https://github.com/welpo/tabi/tree/main/i18n) in the tabi repository.
|
||||
|
||||
## How do I set a default language for my site?
|
||||
|
||||
You can set the default language for your site by defining the `default_language` variable in your `config.toml` file.
|
||||
|
||||
For instance, if you want (Simplified) Chinese to be the primary language, simply add this line to `config.toml`:
|
||||
|
||||
```toml, hl_lines=03
|
||||
base_url = "https://welpo.github.io/tabi"
|
||||
title = "~/tabi"
|
||||
default_language = "zh"
|
||||
```
|
||||
|
||||
All of tabi's text strings will be translated to that language, if supported.
|
||||
|
||||
## How does tabi handle multilingual support?
|
||||
|
||||
Zola automatically generates URLs for each non-default language like this: `{base_url}/{language_code}/{post}`.
|
||||
|
||||
tabi facilitates the navigation between languages by adding a language switcher to the navigation bar (only shown when there's more than one language enabled).
|
||||
|
||||
If you [scroll up](#) to the navigation bar, you'll see the language switcher (the globe icon). Hovering over it will display a dropdown with the available languages. Clicking on a language's name will take you to the same page in that language.
|
||||
|
||||
If a specific page is not available in a language, tabi will display a 404 page with the text:
|
||||
|
||||
> The page you've requested seems to be missing or hasn't been translated into your language yet. Check the URL for errors or go back to the homepage.
|
||||
|
||||
This text will be shown once for each language enabled on your site. You can see this page in action [here](https://welpo.github.io/tabi/404.html).
|
||||
|
||||
## How do I enable multilingual support?
|
||||
|
||||
To enable multilingual support, you need to set the `languages` variable in your `config.toml` file. For example, if want an English-default site with support for Hindi and Spanish, you can set up your `config.toml` like so:
|
||||
|
||||
```toml
|
||||
base_url = "https://example.com"
|
||||
title = "My Site"
|
||||
default_language = "en"
|
||||
|
||||
[languages.hi]
|
||||
title = "मेरी वेबसाइट"
|
||||
|
||||
[languages.es]
|
||||
title = "Mi web"
|
||||
```
|
||||
|
||||
On each language's section, you can set other variables like `taxonomies`, `description`, whether to generate a feed… Refer to Zola's [multilingual support documentation](https://www.getzola.org/documentation/content/multilingual/) for more information.
|
||||
|
||||
## What are these two letter codes?
|
||||
|
||||
The two letter codes are [ISO 639-1 language codes](https://localizely.com/iso-639-1-list/). They are used to identify languages in a standardised way.
|
||||
|
||||
tabi uses these codes to allow navigation between languages and translate the theme.
|
||||
|
||||
## How do I customise or override a specific text string on my website?
|
||||
|
||||
tabi looks for the strings files in the following order. `$base_directory` is where your Zola site resides (where `config.toml` is stored):
|
||||
|
||||
1. `$base_directory + "i18n"`
|
||||
2. `$base_directory + "themes/tabi/i18n"`
|
||||
|
||||
So if you create `i18n/en.toml` in your base directory, tabi will read the strings from that file instead of the default English strings. You can do this for any language, supported or not.
|
||||
|
||||
Make sure to copy the entire file for that language first, or the theme will fall back to the default English strings.
|
||||
|
||||
## What happens if a translation is missing or incomplete?
|
||||
|
||||
If a string is not found in the language file, tabi will fall back to the default English string.
|
||||
|
||||
## My language is not supported. Can I contribute a translation?
|
||||
|
||||
Please do! We are always looking to add support for more languages. You can contribute a translation by creating a pull request in the [tabi repository](https://github.com/welpo/tabi).
|
||||
|
||||
You can use the [English file](https://github.com/welpo/tabi/blob/main/i18n/en.toml) as a base to translate the strings to your language. Please make sure to follow the same structure.
|
||||
|
||||
The file should be named after the two letter code of your language, and should be a TOML file. For example, if you want to add support for Swahili, you can create a file named `sw.toml` in the `i18n` directory.
|
||||
|
||||
Note: when testing your translation, you might need to restart `zola serve` to see the changes, as Zola doesn't always detect changes in the TOML files.
|
||||
|
||||
## I've found an error in a translation. How do I fix it?
|
||||
|
||||
If you find an error in a translation, you can create an issue or a pull request in the [tabi repository](https://github.com/welpo/tabi).
|
||||
|
||||
## How do I update the translations after a theme update?
|
||||
|
||||
If you didn't customise the translations, simply updating the theme will update the translations.
|
||||
|
||||
If you did, you will need to manually update the translations. You can do this by copying the new strings from the corresponding files, and pasting them in your custom file.
|
||||
|
||||
## Does tabi translate my content?
|
||||
|
||||
No. tabi only translates the theme's text strings. You will need to translate your content yourself.
|
@ -0,0 +1,57 @@
|
||||
language_name = "Català" # Shown in language picker for multi-language sites.
|
||||
date_locale = "ca_ES"
|
||||
full_stop ="." # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu
|
||||
blog = "blog"
|
||||
archive = "arxiu"
|
||||
tags = "etiquetes"
|
||||
projects = "projectes"
|
||||
|
||||
# Navigation.
|
||||
read_more = "Llegir més"
|
||||
post = "entrada"
|
||||
posts = "entrades" # Plural of "post".
|
||||
prev = "Anterior" # As in "Previous" page.
|
||||
next = "Següent" # As in "Next" page.
|
||||
of = "de" # E.g. Page 1 "of" 3
|
||||
all_posts = "Totes les entrades"
|
||||
all_tags = "Totes les etiquetes"
|
||||
|
||||
# Post metadata.
|
||||
draft = "ESBORRANY"
|
||||
min_read = "min de lectura"
|
||||
words = "paraules"
|
||||
last_updated_on = "Última actualizació el"
|
||||
see_changes = "Veure canvis"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "Taula de contingut"
|
||||
load_comments = "Carregar comentaris"
|
||||
|
||||
# Footer: Powered by Zola and tabi.
|
||||
powered_by = "Propulsat per"
|
||||
and = "i"
|
||||
site_source = "Codi del lloc"
|
||||
|
||||
# 404 error.
|
||||
# https://welpo.github.io/tabi/404.html
|
||||
page_missing = "La pàgina que has sol·licitat sembla que no existeix"
|
||||
translation_missing = "o encara no s'ha traduït al teu idioma"
|
||||
check_url = "Comprova l'URL per detectar errors o"
|
||||
go_home = "torna a la pàgina d'inici"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "Mostra la cita original"
|
||||
show_translation = "Mostra la traducció"
|
||||
open_quotation_mark = "«"
|
||||
close_quotation_mark = "»"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "Aquest és un canal web, també conegut com a canal Atom. Subscriu-te copiant l'URL de la barra d'adreces al teu lector de notícies. Visita About Feeds per aprendre més i començar. És gratuït."
|
||||
visit_the_site = "Visita la web"
|
||||
recent_posts = "Publicacions recents"
|
@ -0,0 +1,61 @@
|
||||
# This has been machine translated.
|
||||
# If you would like to help correct errors or improve the translation,
|
||||
# please open an issue or submit a pull request.
|
||||
# https://github.com/welpo/tabi
|
||||
language_name = "Deutsch" # Shown in language picker for multi-language sites.
|
||||
date_locale = "de_DE"
|
||||
full_stop = "." # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu
|
||||
blog = "blog"
|
||||
archive = "archiv"
|
||||
tags = "tags"
|
||||
projects = "projekte"
|
||||
|
||||
# Navigation.
|
||||
read_more = "Weiterlesen"
|
||||
post = "beitrag"
|
||||
posts = "beiträge" # Plural of "post".
|
||||
prev = "Vorherig" # As in "Previous" page.
|
||||
next = "Nächst" # As in "Next" page.
|
||||
of = "von" # E.g. Page 1 "of" 3
|
||||
all_posts = "Alle Beiträge"
|
||||
all_tags = "Alle Tags"
|
||||
|
||||
# Post metadata.
|
||||
draft = "ENTWURF"
|
||||
min_read = "min. lesedauer"
|
||||
words = "wörter"
|
||||
last_updated_on = "Zuletzt aktualisiert am"
|
||||
see_changes = "Änderungen anzeigen"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "Inhaltsverzeichnis"
|
||||
load_comments = "Kommentare laden"
|
||||
|
||||
# Footer.
|
||||
powered_by = "Angetrieben von"
|
||||
and = "und"
|
||||
site_source = "Quellcode der Seite"
|
||||
|
||||
# 404 error.
|
||||
# https://welpo.github.io/tabi/404.html
|
||||
page_missing = "Die Seite, die du angefordert hast, scheint nicht zu existieren"
|
||||
translation_missing = "oder wurde noch nicht in deine Sprache übersetzt"
|
||||
check_url = "Überprüfe die URL auf Fehler oder"
|
||||
go_home = "zurück zur Startseite gehen"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "Originalzitat anzeigen"
|
||||
show_translation = "Übersetzung anzeigen"
|
||||
open_quotation_mark = "„"
|
||||
close_quotation_mark = "“"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "Dies ist ein Web-Feed, auch bekannt als Atom-Feed. Abonnieren Sie, indem Sie die URL aus der Adressleiste in Ihren Nachrichtenleser kopieren. Besuchen Sie About Feeds, um mehr zu erfahren und loszulegen. Es ist kostenlos."
|
||||
visit_the_site = "Besuchen Sie die Webseite"
|
||||
recent_posts = "Aktuelle Beiträge"
|
@ -0,0 +1,57 @@
|
||||
language_name = "English" # Shown in language picker for multi-language sites.
|
||||
date_locale = "en_GB"
|
||||
full_stop = "." # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu
|
||||
blog = "blog"
|
||||
archive = "archive"
|
||||
tags = "tags"
|
||||
projects = "projects"
|
||||
|
||||
# Navigation.
|
||||
read_more = "Read more"
|
||||
post = "post"
|
||||
posts = "posts" # Plural of "post".
|
||||
prev = "Prev" # As in "Previous" page.
|
||||
next = "Next" # As in "Next" page.
|
||||
of = "of" # E.g. Page 1 "of" 3
|
||||
all_posts = "All posts"
|
||||
all_tags = "All tags"
|
||||
|
||||
# Post metadata.
|
||||
draft = "DRAFT"
|
||||
min_read = "min read"
|
||||
words = "words"
|
||||
last_updated_on = "Last updated on"
|
||||
see_changes = "See changes"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "Table of Contents"
|
||||
load_comments = "Load comments"
|
||||
|
||||
# Footer: Powered by Zola and tabi.
|
||||
powered_by = "Powered by"
|
||||
and = "&"
|
||||
site_source = "Site source"
|
||||
|
||||
# 404 error.
|
||||
# https://welpo.github.io/tabi/404.html
|
||||
page_missing = "The page you've requested seems to be missing"
|
||||
translation_missing = "or hasn't been translated into your language yet"
|
||||
check_url = "Check the URL for errors or"
|
||||
go_home = "go back to the homepage"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "Show original quote"
|
||||
show_translation = "Show translation"
|
||||
open_quotation_mark = "“"
|
||||
close_quotation_mark = "”"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader. Visit About Feeds to learn more and get started. It's free."
|
||||
visit_the_site = "Visit website"
|
||||
recent_posts = "Recent posts"
|
@ -0,0 +1,57 @@
|
||||
language_name = "Español" # Shown in language picker for multi-language sites.
|
||||
date_locale = "es_ES"
|
||||
full_stop = "." # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu
|
||||
blog = "blog"
|
||||
archive = "archivo"
|
||||
tags = "etiquetas"
|
||||
projects = "proyectos"
|
||||
|
||||
# Navigation.
|
||||
read_more = "Leer más"
|
||||
post = "entrada"
|
||||
posts = "entradas" # Plural of "post".
|
||||
prev = "Anterior" # As in "Previous" page.
|
||||
next = "Siguiente" # As in "Next" page.
|
||||
of = "sur" # E.g. Page 1 "of" 3
|
||||
all_posts = "Todas las entradas"
|
||||
all_tags = "Todas las etiquetas"
|
||||
|
||||
# Post metadata.
|
||||
draft = "BORRADOR"
|
||||
min_read = "min de lectura"
|
||||
words = "palabras"
|
||||
last_updated_on = "Última actualización el"
|
||||
see_changes = "Ver cambios"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "Tabla de contenido"
|
||||
load_comments = "Cargar comentarios"
|
||||
|
||||
# Footer: Powered by Zola and tabi.
|
||||
powered_by = "Impulsado por"
|
||||
and = "y"
|
||||
site_source = "Código del sitio"
|
||||
|
||||
# 404 error.
|
||||
# https://welpo.github.io/tabi/404.html
|
||||
page_missing = "La página que has solicitado parece no existir"
|
||||
translation_missing = "o aún no se ha traducido a tu idioma"
|
||||
check_url = "Revisa la URL en busca de errores o"
|
||||
go_home = "regresa a la página de inicio"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "Mostrar cita original"
|
||||
show_translation = "Mostrar traducción"
|
||||
open_quotation_mark = "«"
|
||||
close_quotation_mark = "»"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "Esta es una fuente web, también conocida como fuente Atom. Suscríbete copiando la URL de la barra de direcciones en tu lector de noticias. Visita About Feeds para aprender más y empezar. Es gratis. "
|
||||
visit_the_site = "Visita la web"
|
||||
recent_posts = "Publicaciones recientes"
|
@ -0,0 +1,61 @@
|
||||
# This has been machine translated.
|
||||
# If you would like to help correct errors or improve the translation,
|
||||
# please open an issue or submit a pull request.
|
||||
# https://github.com/welpo/tabi
|
||||
language_name = "Français" # Shown in language picker for multi-language sites.
|
||||
date_locale = "fr_FR"
|
||||
full_stop = "." # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu
|
||||
blog = "blog"
|
||||
archive = "archives"
|
||||
tags = "étiquettes"
|
||||
projects = "projets"
|
||||
|
||||
# Navigation.
|
||||
read_more = "Lire plus"
|
||||
post = "article"
|
||||
posts = "articles" # Plural of "post".
|
||||
prev = "Précédent" # As in "Previous" page.
|
||||
next = "Suivant" # As in "Next" page.
|
||||
of = "de" # E.g. Page 1 "of" 3
|
||||
all_posts = "Tous les articles"
|
||||
all_tags = "Toutes les étiquettes"
|
||||
|
||||
# Post metadata.
|
||||
draft = "BROUILLON"
|
||||
min_read = "min de lecture"
|
||||
words = "mots"
|
||||
last_updated_on = "Dernière mise à jour le"
|
||||
see_changes = "Voir les modifications"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "Table des matières"
|
||||
load_comments = "Afficher les commentaires"
|
||||
|
||||
# Footer: Powered by Zola and tabi.
|
||||
powered_by = "Propulsé par"
|
||||
and = "et"
|
||||
site_source = "Code du site"
|
||||
|
||||
# 404 error.
|
||||
# https://welpo.github.io/tabi/404.html
|
||||
page_missing = "La page que vous avez demandée semble ne pas exister"
|
||||
translation_missing = "ou n'a pas encore été traduite dans votre langue"
|
||||
check_url = "Vérifiez l'URL pour des erreurs ou"
|
||||
go_home = "retournez à la page d'accueil"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "Afficher la citation originale"
|
||||
show_translation = "Afficher la traduction"
|
||||
open_quotation_mark = "«"
|
||||
close_quotation_mark = "»"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "Ceci est un flux web, également connu sous le nom de flux Atom. Abonnez-vous en copiant l'URL de la barre d'adresse dans votre lecteur de nouvelles. Visitez About Feeds pour en savoir plus et commencer. C'est gratuit."
|
||||
visit_the_site = "Visitez le site web"
|
||||
recent_posts = "Articles récents"
|
@ -0,0 +1,59 @@
|
||||
# This has been machine translated.
|
||||
# If you would like to help correct errors or improve the translation, please open an issue or submit a pull request.
|
||||
language_name = "हिंदी" # Shown in language picker for multi-language sites.
|
||||
date_locale = "hi_IN"
|
||||
full_stop ="।" # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu
|
||||
blog = "ब्लॉग"
|
||||
archive = "संग्रह"
|
||||
tags = "टैग"
|
||||
projects = "परियोजनाएं"
|
||||
|
||||
# Navigation.
|
||||
read_more = "और पढ़ें"
|
||||
post = "पोस्ट"
|
||||
posts = "पोस्ट्स" # Plural of "post".
|
||||
prev = "पिछला" # As in "Previous" page.
|
||||
next = "अगला" # As in "Next" page.
|
||||
of = "का" # E.g. Page 1 "of" 3
|
||||
all_posts = "सभी पोस्ट्स"
|
||||
all_tags = "सभी टैग्स"
|
||||
|
||||
# Post metadata.
|
||||
draft = "मसौदा"
|
||||
min_read = "मिनट पठन समय"
|
||||
words = "शब्द"
|
||||
last_updated_on = "आखिरी अपडेट"
|
||||
see_changes = "बदलाव देखें"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "विषय सूची"
|
||||
load_comments = "कमेंट्स लोड करें"
|
||||
|
||||
# Footer: Powered by Zola and tabi.
|
||||
powered_by = "चालित द्वारा"
|
||||
and = "और"
|
||||
site_source = "साइट का स्रोत"
|
||||
|
||||
# 404 error.
|
||||
# https://welpo.github.io/tabi/404.html
|
||||
page_missing = "आपके द्वारा अनुरोधित पृष्ठ मौजूद नहीं है"
|
||||
translation_missing = "या फिर आपकी भाषा में अनुवाद नहीं किया गया है"
|
||||
check_url = "URL में त्रुटियों की जांच करें या"
|
||||
go_home = "मुख्य पृष्ठ पर वापस जाएं"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "मौलिक उद्धरण दिखाएं"
|
||||
show_translation = "अनुवाद दिखाएं"
|
||||
open_quotation_mark = "“"
|
||||
close_quotation_mark = "”"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "यह एक वेब फ़ीड है, जिसे एटम फ़ीड भी कहा जाता है। अपने न्यूज़रीडर में एड्रेस बार से URL कॉपी करके सब्सक्राइब करें। About Feeds पर जाकर और अधिक जानकारी प्राप्त करें और शुरू करें। यह सेवा मुफ़्त है।"
|
||||
visit_the_site = "वेबसाइट पर जाएं"
|
||||
recent_posts = "हाल की पोस्ट्स"
|
@ -0,0 +1,56 @@
|
||||
language_name = "Italiano" # Shown in language picker for multi-language sites.
|
||||
date_locale = "it_IT"
|
||||
full_stop = "." # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu.
|
||||
blog = "blog"
|
||||
archive = "archivio"
|
||||
tags = "tag"
|
||||
projects = "progetti"
|
||||
|
||||
# Navigation.
|
||||
read_more = "Leggi di più"
|
||||
post = "post"
|
||||
posts = "post" # Plural of "post".
|
||||
prev = "Precedente" # As in "Previous" page.
|
||||
next = "Successivo" # As in "Next" page.
|
||||
of = "di" # E.g. Page 1 "of" 3
|
||||
all_posts = "Tutti i post"
|
||||
all_tags = "Tutti i tag"
|
||||
|
||||
# Post metadata.
|
||||
draft = "BOZZA"
|
||||
min_read = "min di lettura"
|
||||
words = "parole"
|
||||
last_updated_on = "Ultimo aggiornamento il"
|
||||
see_changes = "Vedi modifiche"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "Indice"
|
||||
load_comments = "Carica commenti"
|
||||
|
||||
# Footer: Powered by Zola and tabi.
|
||||
powered_by = "Alimentato da"
|
||||
and = "e"
|
||||
site_source = "Codice del sito"
|
||||
|
||||
# 404 error.
|
||||
page_missing = "La pagina che hai richiesto sembra non esistere"
|
||||
translation_missing = "o non è ancora stata tradotta nella tua lingua"
|
||||
check_url = "Controlla l'URL per errori o"
|
||||
go_home = "torna alla homepage"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "Mostra citazione originale"
|
||||
show_translation = "Mostra traduzione"
|
||||
open_quotation_mark = "«"
|
||||
close_quotation_mark = "»"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "Questo è un feed web, noto anche come feed Atom. Iscriviti copiando l'URL dalla barra degli indirizzi nel tuo lettore di notizie. Visita About Feeds per saperne di più e iniziare. È gratuito."
|
||||
visit_the_site = "Visita il sito web"
|
||||
recent_posts = "Post recenti"
|
@ -0,0 +1,61 @@
|
||||
# This has been machine translated.
|
||||
# If you would like to help correct errors or improve the translation,
|
||||
# please open an issue or submit a pull request.
|
||||
# https://github.com/welpo/tabi
|
||||
language_name = "日本語" # Shown in language picker for multi-language sites.
|
||||
date_locale = "ja_JP"
|
||||
full_stop = "。" # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu
|
||||
blog = "ブログ"
|
||||
archive = "アーカイブ"
|
||||
tags = "タグ"
|
||||
projects = "プロジェクト"
|
||||
|
||||
# Navigation.
|
||||
read_more = "続きを読む"
|
||||
post = "投稿"
|
||||
posts = "投稿一覧" # Plural of "post".
|
||||
prev = "前" # As in "Previous" page.
|
||||
next = "次" # As in "Next" page.
|
||||
of = "中" # E.g. Page 1 "of" 3
|
||||
all_posts = "すべての投稿"
|
||||
all_tags = "すべてのタグ"
|
||||
|
||||
# Post metadata.
|
||||
draft = "ドラフト"
|
||||
min_read = "読了時間(分)"
|
||||
words = "単語数"
|
||||
last_updated_on = "最終更新日"
|
||||
see_changes = "変更を見る"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "目次"
|
||||
load_comments = "コメントを読む"
|
||||
|
||||
# Footer: Powered by Zola and tabi.
|
||||
powered_by = "Powered by"
|
||||
and = "と"
|
||||
site_source = "サイトのソースコード"
|
||||
|
||||
# 404 error.
|
||||
# https://welpo.github.io/tabi/404.html
|
||||
page_missing = "お探しのページは存在しません"
|
||||
translation_missing = "または、まだあなたの言語に翻訳されていません"
|
||||
check_url = "URLが正しいか確認してください、または"
|
||||
go_home = "ホームページに戻る"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "オリジナルの引用を見る"
|
||||
show_translation = "翻訳を見る"
|
||||
open_quotation_mark = "「"
|
||||
close_quotation_mark = "」"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "これはウェブフィードです、また、Atomフィードとしても知られています。URLをアドレスバーからニュースリーダーにコピーして登録してください。About Feedsを訪れて、詳細を知り、始めてください。無料です。"
|
||||
visit_the_site = "ウェブサイトを訪れる"
|
||||
recent_posts = "最近の投稿"
|
@ -0,0 +1,61 @@
|
||||
# This has been machine translated.
|
||||
# If you would like to help correct errors or improve the translation,
|
||||
# please open an issue or submit a pull request.
|
||||
# https://github.com/welpo/tabi
|
||||
language_name = "한국어" # Shown in language picker for multi-language sites.
|
||||
date_locale = "ko_KR"
|
||||
full_stop = "." # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu
|
||||
blog = "블로그"
|
||||
archive = "아카이브"
|
||||
tags = "태그"
|
||||
projects = "프로젝트"
|
||||
|
||||
# Navigation.
|
||||
read_more = "더 읽기"
|
||||
post = "게시물"
|
||||
posts = "게시물" # Plural of "post".
|
||||
prev = "이전" # As in "Previous" page.
|
||||
next = "다음" # As in "Next" page.
|
||||
of = "중" # E.g. Page 1 "of" 3
|
||||
all_posts = "모든 게시물"
|
||||
all_tags = "모든 태그"
|
||||
|
||||
# Post metadata.
|
||||
draft = "임시 저장"
|
||||
min_read = "분 읽기"
|
||||
words = "단어"
|
||||
last_updated_on = "최근 업데이트"
|
||||
see_changes = "변경사항 보기"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "목차"
|
||||
load_comments = "댓글 불러오기"
|
||||
|
||||
# Footer: Powered by Zola and tabi.
|
||||
powered_by = "제공됨"
|
||||
and = "&"
|
||||
site_source = "사이트 소스"
|
||||
|
||||
# 404 error.
|
||||
# https://welpo.github.io/tabi/404.html
|
||||
page_missing = "요청하신 페이지가 없습니다"
|
||||
translation_missing = "또는 아직 해당 언어로 번역되지 않았습니다"
|
||||
check_url = "URL을 확인하거나"
|
||||
go_home = "홈페이지로 돌아가기"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "원문 인용 보기"
|
||||
show_translation = "번역 보기"
|
||||
open_quotation_mark = "“"
|
||||
close_quotation_mark = "”"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "이것은 웹 피드이며, Atom 피드로도 알려져 있습니다. 주소 표시 줄의 URL을 뉴스 리더로 복사하여 구독하세요. About Feeds를 방문하여 자세히 알아보고 시작하세요. 무료입니다."
|
||||
visit_the_site = "웹사이트 방문하기"
|
||||
recent_posts = "최근 게시물"
|
@ -0,0 +1,57 @@
|
||||
language_name = "Português" # Shown in language picker for multi-language sites.
|
||||
date_locale = "pt_PT"
|
||||
full_stop = "." # Used at the end of a sentence.
|
||||
|
||||
# Menu items.
|
||||
# Should match the names in config.extra.menu
|
||||
blog = "blog"
|
||||
archive = "arquivo"
|
||||
tags = "etiquetas"
|
||||
projects = "projetos"
|
||||
|
||||
# Navigation.
|
||||
read_more = "Ler mais"
|
||||
post = "publicação"
|
||||
posts = "publicações" # Plural of "post".
|
||||
prev = "Anterior" # As in "Previous" page.
|
||||
next = "Seguinte" # As in "Next" page.
|
||||
of = "de" # E.g. Page 1 "of" 3
|
||||
all_posts = "Todas as publicações"
|
||||
all_tags = "Todas as etiquetas"
|
||||
|
||||
# Post metadata.
|
||||
draft = "RASCUNHO"
|
||||
min_read = "min de leitura"
|
||||
words = "palavras"
|
||||
last_updated_on = "Última atualização em"
|
||||
see_changes = "Ver alterações"
|
||||
|
||||
# Post body.
|
||||
table_of_contents = "Índice de conteúdo"
|
||||
load_comments = "Carregar comentários"
|
||||
|
||||
# Footer: Powered by Zola and tabi.
|
||||
powered_by = "Impulsionado por"
|
||||
and = "e"
|
||||
site_source = "Código do site"
|
||||
|
||||
# 404 error.
|
||||
# https://welpo.github.io/tabi/404.html
|
||||
page_missing = "A página que solicitou não existe"
|
||||
translation_missing = "ou ainda não foi traduzida para o seu idioma"
|
||||
check_url = "Verifique se o URL está correto ou"
|
||||
go_home = "volte à página inicial"
|
||||
|
||||
# For multilingual quote shortcode.
|
||||
# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes
|
||||
show_original_quote = "Mostrar citação original"
|
||||
show_translation = "Mostrar tradução"
|
||||
open_quotation_mark = "«"
|
||||
close_quotation_mark = "»"
|
||||
|
||||
# Translations for stylised Atom feed.
|
||||
# https://welpo.github.io/tabi/atom.xml
|
||||
# Must contain "About Feeds"; it will become a link.
|
||||
about_feeds = "Isto é um feed web, também conhecido como feed Atom. Subscreva copiando o URL da barra de endereços para o seu leitor de notícias. Visite About Feeds para aprender mais e começar. É grátis."
|
||||
visit_the_site = "Visite o website"
|
||||
recent_posts = "Publicações recentes"
|
File diff suppressed because one or more lines are too long
@ -1,19 +1,34 @@
|
||||
{% extends "page.html" %}
|
||||
|
||||
{% macro display_404_message(language_name) %}
|
||||
{%- set language_strings = load_data(path="i18n/" ~ language_name ~ '.toml', required=false) -%}
|
||||
{%- if not language_strings -%}
|
||||
{%- set language_strings = load_data(path="themes/tabi/i18n/" ~ language_name ~ '.toml', required=false) -%}
|
||||
{%- endif -%}
|
||||
<p>{{ macros_translate::translate(key="page_missing", default="The page you've requested seems to be missing", force_lang=language_name, language_strings=language_strings) }}
|
||||
{%- if config.languages | length > 0 -%}
|
||||
{{ macros_translate::translate(key="translation_missing", default="or hasn't been translated into your language yet", force_lang=language_name, language_strings=language_strings) }}{{ macros_translate::translate(key="full_stop", default=".", force_lang=language_name, language_strings=language_strings) }}
|
||||
{%- else %}.
|
||||
{%- endif %}
|
||||
{{ macros_translate::translate(key="check_url", default="Check the URL for errors or", force_lang=language_name, language_strings=language_strings) }}
|
||||
<a href="{{ config.base_url }}{% if language_name != config.default_language %}/{{ language_name }}{% endif %}/">
|
||||
{{ macros_translate::translate(key="go_home", default="go back to the homepage", force_lang=language_name, language_strings=language_strings) }}</a>{{ macros_translate::translate(key="full_stop", default=".", force_lang=language_name, language_strings=language_strings) }}</p>
|
||||
{% endmacro %}
|
||||
|
||||
{% block main_content %}
|
||||
<main class="centered-text">
|
||||
{{ macros_page_header::page_header(title="404")}}
|
||||
<div class="subheader">not found</div>
|
||||
<div class="subheader">{{ macros_translate::translate(key="not_found") }}</div>
|
||||
|
||||
{# Default English message #}
|
||||
<p>The page you requested doesn't seem to exist{%- if config.languages | length > 0 %} or has not been translated to your language yet{%- endif -%}. Check the URL for errors, or <a href="{{ config.base_url }}">return to the homepage</a>.</p>
|
||||
{# 404 message for base language #}
|
||||
{{ self::display_404_message(language_name=config.default_language, is_multilingual=is_multilingual) }}
|
||||
|
||||
{# Iterate through each language and display the localised 404 message along with a "Go Home" link #}
|
||||
{#- Iterate through each extra language, to display the localised 404 message -#}
|
||||
{%- for language_name, language in config.languages -%}
|
||||
{%- if language_name != config.default_language -%}
|
||||
<p>{{ macros_translate::translate(key="404_error", force_lang=language_name) }} <a href="{{ config.base_url }}/{{ language_name }}/">{{ macros_translate::translate(key="go_home", force_lang=language_name) }}</a>.</p>
|
||||
{%- if language_name == config.default_language -%}
|
||||
{%- continue -%} {#- We've already displayed the 404 message for the base language -#}
|
||||
{%- endif -%}
|
||||
{{ self::display_404_message(language_name=language_name, is_multilingual=is_multilingual) }}
|
||||
{%- endfor -%}
|
||||
</main>
|
||||
|
||||
{% endblock main_content %}
|
||||
|
@ -1,197 +0,0 @@
|
||||
{% macro content(page) %}
|
||||
|
||||
{%- set separator = config.extra.separator | default(value="•") -%}
|
||||
|
||||
{%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%}
|
||||
|
||||
{%- if config.markdown.external_links_target_blank -%}
|
||||
{%- set blank_target = "target=_blank" -%}
|
||||
{%- else -%}
|
||||
{%- set blank_target = "" -%}
|
||||
{%- endif -%}
|
||||
|
||||
{# Debugging #}
|
||||
{# {% set last_ancestor = page.ancestors | slice(start=-1) %}
|
||||
{% set current_section = get_section(path=last_ancestor.0) %}
|
||||
|
||||
{% set settings_to_test = [
|
||||
"footnote_backlinks",
|
||||
"katex",
|
||||
"quick_navigation_buttons",
|
||||
"show_reading_time",
|
||||
"show_remote_changes",
|
||||
"toc",
|
||||
] %}
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>setting</th>
|
||||
<th>page</th>
|
||||
<th>section</th>
|
||||
<th>config</th>
|
||||
<th>macro output</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for setting in settings_to_test %}
|
||||
<tr>
|
||||
<td><code>{{ setting }}</code></td>
|
||||
<td>{{ page.extra[setting] | default(value="⬛") }}</td>
|
||||
<td>{{ current_section.extra[setting] | default(value="⬛") }}</td>
|
||||
<td>{{ config.extra[setting] | default(value="⬛") }}</td>
|
||||
<td>{{ macros_settings::evaluate_setting_priority(setting=setting, page=page) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table> #}
|
||||
{# End debugging #}
|
||||
|
||||
<main>
|
||||
<article>
|
||||
<h1 class="article-title">
|
||||
{{ page.title }}
|
||||
</h1>
|
||||
|
||||
<ul class="meta">
|
||||
{% if page.draft %}
|
||||
<li class="draft-label">{{ macros_translate::translate(key="draft", default="DRAFT") }}</li>
|
||||
{% endif %}
|
||||
|
||||
{% if page.date %}
|
||||
<li>{{ macros_format_date::format_date(date=page.date, short=true) }}</li>
|
||||
{% endif %}
|
||||
|
||||
{# page settings override config settings #}
|
||||
{% if macros_settings::evaluate_setting_priority(setting="show_reading_time", page=page, default_global_value=true) == "true" %}
|
||||
{{ separator }} <li title="{{ page.word_count }} {{ macros_translate::translate(key="words", default="words") }}">{{ page.reading_time }} {{ macros_translate::translate(key="min_read", default="min read") }}</li>
|
||||
{% endif %}
|
||||
|
||||
{%- if page.taxonomies and page.taxonomies.tags -%}
|
||||
{{ separator }} <li>{{- macros_translate::translate(key="tags", default="tags") | capitalize -}}: </li>
|
||||
{%- for tag in page.taxonomies.tags -%}
|
||||
<li><a href={{ get_taxonomy_url(kind='tags', name=tag, lang=lang) | safe }}>{{ tag }}</a>
|
||||
{%- if not loop.last -%}
|
||||
,
|
||||
{%- endif -%}
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
|
||||
{% if page.updated %}
|
||||
</ul><ul class="meta last-updated"><li>{{ macros_translate::translate(key="last_updated_on", default="Last updated on") }} {{ macros_format_date::format_date(date=page.updated, short=true) }}</li>
|
||||
{# Show link to remote changes if enabled #}
|
||||
{% if config.extra.remote_repository_url and macros_settings::evaluate_setting_priority(setting="show_remote_changes", page=page, default_global_value=true) == "true" %}
|
||||
{{ separator }}
|
||||
<li><a href="{{ macros_create_history_url::create_history_url(relative_path=page.relative_path) }}" {{ blank_target }} rel="{{ rel_attributes }}">{{ macros_translate::translate(key="see_changes", default="See changes") }}<small> ↗</small></a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if page.extra.tldr %}
|
||||
<div class="tldr">
|
||||
<h3>TL;DR:</h3>
|
||||
<p>{{ page.extra.tldr }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Optional table of contents below the header #}
|
||||
{% if page.toc and macros_settings::evaluate_setting_priority(setting="toc", page=page, default_global_value=false) == "true" %}
|
||||
{{ macros_toc::toc(page=page, header=true) }}
|
||||
{% endif %}
|
||||
|
||||
<section class="body">
|
||||
{# The replace pattern is used to enable arbitrary locations for the Table of Contents #}
|
||||
{# This is Philipp Oppermann's workaround: https://github.com/getzola/zola/issues/584#issuecomment-474329637 #}
|
||||
{{ page.content | replace(from="<!-- toc -->", to=macros_toc::toc(page=page, header=false)) | safe }}
|
||||
</section>
|
||||
|
||||
{# Check if comments are enabled #}
|
||||
{% set giscus_enabled = config.extra.giscus.enabled_for_all_posts or page.extra.giscus %}
|
||||
{% set utterances_enabled = config.extra.utterances.enabled_for_all_posts or page.extra.utterances %}
|
||||
{% set hyvortalk_enabled = config.extra.hyvortalk.enabled_for_all_posts or page.extra.hyvortalk %}
|
||||
{% set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso %}
|
||||
|
||||
{# Ensure only one comment system is enabled #}
|
||||
{# Counter for enabled comment systems #}
|
||||
{% set enabled_systems = 0 %}
|
||||
|
||||
{# Check and count the enabled comment systems #}
|
||||
{% if giscus_enabled %}
|
||||
{% set comment_system = "giscus" %}
|
||||
{% set enabled_systems = enabled_systems + 1 %}
|
||||
{% endif %}
|
||||
{% if utterances_enabled %}
|
||||
{% set comment_system = "utterances" %}
|
||||
{% set enabled_systems = enabled_systems + 1 %}
|
||||
{% endif %}
|
||||
{% if hyvortalk_enabled %}
|
||||
{% set comment_system = "hyvortalk" %}
|
||||
{% set enabled_systems = enabled_systems + 1 %}
|
||||
{% endif %}
|
||||
{% if isso_enabled %}
|
||||
{% set comment_system = "isso" %}
|
||||
{% set enabled_systems = enabled_systems + 1 %}
|
||||
{% endif %}
|
||||
|
||||
{# Ensure only one comment system is enabled #}
|
||||
{% if enabled_systems > 1 %}
|
||||
{{ throw(message="ERROR: Multiple comment systems have been enabled for the same page. Check your config.toml and individual page settings to ensure only one comment system is activated at a time.") }}
|
||||
{% endif %}
|
||||
|
||||
{% if comment_system %}
|
||||
{% set automatic_loading = config.extra[comment_system].automatic_loading %}
|
||||
{{ macros_add_comments::add_comments(comment_system=comment_system, automatic_loading=automatic_loading) }}
|
||||
{% endif %}
|
||||
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{# Quick navigation buttons #}
|
||||
{% if macros_settings::evaluate_setting_priority(setting="quick_navigation_buttons", page=page, default_global_value=false) == "true" %}
|
||||
<div id="button-container">
|
||||
{# Button to go show a floating Table of Contents #}
|
||||
{% if page.toc %}
|
||||
<div id="toc-floating-container">
|
||||
<input type="checkbox" id="toc-toggle" class="toggle"/>
|
||||
<label for="toc-toggle" class="overlay"></label>
|
||||
<label for="toc-toggle" id="toc-button" class="button" title="Toggle Table of Contents" aria-label="toggle Table of Contents">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M414.82-193.094q-18.044 0-30.497-12.32-12.453-12.319-12.453-30.036t12.453-30.086q12.453-12.37 30.497-12.37h392.767q17.237 0 29.927 12.487 12.69 12.486 12.69 30.203 0 17.716-12.69 29.919t-29.927 12.203H414.82Zm0-244.833q-18.044 0-30.497-12.487Q371.87-462.9 371.87-480.45t12.453-29.92q12.453-12.369 30.497-12.369h392.767q17.237 0 29.927 12.511 12.69 12.512 12.69 29.845 0 17.716-12.69 30.086-12.69 12.37-29.927 12.37H414.82Zm0-245.167q-18.044 0-30.497-12.32t-12.453-30.037q0-17.716 12.453-30.086 12.453-12.369 30.497-12.369h392.767q17.237 0 29.927 12.486 12.69 12.487 12.69 30.203 0 17.717-12.69 29.92-12.69 12.203-29.927 12.203H414.82ZM189.379-156.681q-32.652 0-55.878-22.829t-23.226-55.731q0-32.549 23.15-55.647 23.151-23.097 55.95-23.097 32.799 0 55.313 23.484 22.515 23.484 22.515 56.246 0 32.212-22.861 54.893-22.861 22.681-54.963 22.681Zm0-245.167q-32.652 0-55.878-23.134-23.226-23.135-23.226-55.623 0-32.487 23.467-55.517t56.12-23.03q32.102 0 54.721 23.288 22.62 23.288 22.62 55.775 0 32.488-22.861 55.364-22.861 22.877-54.963 22.877Zm-.82-244.833q-32.224 0-55.254-23.288-23.03-23.289-23.03-55.623 0-32.333 23.271-55.364 23.272-23.03 55.495-23.03 32.224 0 55.193 23.288 22.969 23.289 22.969 55.622 0 32.334-23.21 55.364-23.21 23.031-55.434 23.031Z"/></svg>
|
||||
</label>
|
||||
<div class="toc-content">
|
||||
{{ macros_toc::toc(page=page, header=false) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Button to go to the comment section #}
|
||||
{% if comment_system %}
|
||||
<a href="#comments" id="comments-button" title="Go to comment section">
|
||||
<svg viewBox="0 0 20 20" fill="currentColor"><path d="M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z" clip-rule="evenodd" fill-rule="evenodd"/></svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{# Button to go to the top of the page #}
|
||||
<a href="#" id="top-button" title="Go to top of page">
|
||||
<svg viewBox="0 0 20 20" fill="currentColor"><path d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Add KaTeX functionality #}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="katex", page=page, default_global_value=false) == "true" -%}
|
||||
<link rel="stylesheet" href="{{ get_url(path='katex.min.css', trailing_slash=false) | safe }}">
|
||||
<script defer src="{{ get_url(path='js/katex.min.js', trailing_slash=false) | safe }}"></script>
|
||||
{%- endif -%}
|
||||
|
||||
{# Add copy button to code blocks #}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="copy_button", page=page, default_global_value=true) == "true" -%}
|
||||
<script defer src="{{ get_url(path='js/copyCodeToClipboard.min.js', trailing_slash=false) | safe }}"/></script>
|
||||
{%- endif -%}
|
||||
|
||||
{# Add backlinks to footnotes #}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="footnote_backlinks", page=page, default_global_value=false) == "true" -%}
|
||||
<script defer src="{{ get_url(path='js/footnoteBacklinks.min.js', trailing_slash=false | safe )}}"/></script>
|
||||
{%- endif -%}
|
||||
|
||||
{% endmacro content %}
|
@ -1,14 +1,24 @@
|
||||
{% macro translate(key, default="", force_lang="") %}
|
||||
|
||||
{%- if config.default_language != "en" -%}
|
||||
{#- The entire site should be translated -#}
|
||||
{{- trans(key=key | safe, lang=lang) -}}
|
||||
{%- elif lang != config.default_language -%}
|
||||
{{- trans(key=key | safe, lang=lang) -}}
|
||||
{%- elif force_lang -%}
|
||||
{{- trans(key=key | safe, lang=force_lang) -}}
|
||||
{%- else -%}
|
||||
{{- default -}}
|
||||
{%- endif -%}
|
||||
{#
|
||||
Macro: translate
|
||||
Purpose: Translate text strings based on the current language setting.
|
||||
Parameters:
|
||||
- key: The key used to look up the translation in the loaded language data.
|
||||
- language_strings: The loaded language data (from a .toml file).
|
||||
- default: The default text to use if a translation is not found.
|
||||
|
||||
Usage:
|
||||
Use this macro to translate text in templates. The macro looks for the
|
||||
translation based on the given 'key' in 'language_strings'. If not found,
|
||||
it falls back to using the 'default' text.
|
||||
|
||||
Note:
|
||||
The 'language_strings' are loaded in base.html based on the current language
|
||||
from files in the 'i18n' folder.
|
||||
|
||||
Example:
|
||||
{{ macros_translate::translate(key="site_source", language_strings=language_strings, default="Site source", language_strings=language_strings) }}
|
||||
#}
|
||||
|
||||
{% macro translate(key, language_strings="", default="") %}
|
||||
{{- language_strings[key] | default(value=default) | safe -}}
|
||||
{% endmacro %}
|
||||
|
@ -1,7 +1,198 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block main_content %}
|
||||
{%- set separator = config.extra.separator | default(value="•") -%}
|
||||
|
||||
{{ macros_content::content(page=page)}}
|
||||
{%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%}
|
||||
|
||||
{%- if config.markdown.external_links_target_blank -%}
|
||||
{%- set blank_target = "target=_blank" -%}
|
||||
{%- else -%}
|
||||
{%- set blank_target = "" -%}
|
||||
{%- endif -%}
|
||||
|
||||
{# Debugging #}
|
||||
{# {% set last_ancestor = page.ancestors | slice(start=-1) %}
|
||||
{% set current_section = get_section(path=last_ancestor.0) %}
|
||||
|
||||
{% set settings_to_test = [
|
||||
"footnote_backlinks",
|
||||
"katex",
|
||||
"quick_navigation_buttons",
|
||||
"show_reading_time",
|
||||
"show_remote_changes",
|
||||
"toc",
|
||||
] %}
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>setting</th>
|
||||
<th>page</th>
|
||||
<th>section</th>
|
||||
<th>config</th>
|
||||
<th>macro output</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for setting in settings_to_test %}
|
||||
<tr>
|
||||
<td><code>{{ setting }}</code></td>
|
||||
<td>{{ page.extra[setting] | default(value="⬛") }}</td>
|
||||
<td>{{ current_section.extra[setting] | default(value="⬛") }}</td>
|
||||
<td>{{ config.extra[setting] | default(value="⬛") }}</td>
|
||||
<td>{{ macros_settings::evaluate_setting_priority(setting=setting, page=page) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table> #}
|
||||
{# End debugging #}
|
||||
|
||||
<main>
|
||||
<article>
|
||||
<h1 class="article-title">
|
||||
{{ page.title }}
|
||||
</h1>
|
||||
|
||||
<ul class="meta">
|
||||
{% if page.draft %}
|
||||
<li class="draft-label">{{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}</li>
|
||||
{% endif %}
|
||||
|
||||
{% if page.date %}
|
||||
<li>{{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }}</li>
|
||||
{% endif %}
|
||||
|
||||
{# page settings override config settings #}
|
||||
{% if macros_settings::evaluate_setting_priority(setting="show_reading_time", page=page, default_global_value=true) == "true" %}
|
||||
{{ separator }} <li title="{{ page.word_count }} {{ macros_translate::translate(key="words", default="words", language_strings=language_strings) }}">{{ page.reading_time }} {{ macros_translate::translate(key="min_read", default="min read", language_strings=language_strings) }}</li>
|
||||
{% endif %}
|
||||
|
||||
{%- if page.taxonomies and page.taxonomies.tags -%}
|
||||
{{ separator }} <li>{{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}: </li>
|
||||
{%- for tag in page.taxonomies.tags -%}
|
||||
<li><a href={{ get_taxonomy_url(kind='tags', name=tag, lang=lang) | safe }}>{{ tag }}</a>
|
||||
{%- if not loop.last -%}
|
||||
,
|
||||
{%- endif -%}
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
|
||||
{% if page.updated %}
|
||||
</ul><ul class="meta last-updated"><li>{{ macros_translate::translate(key="last_updated_on", default="Last updated on", language_strings=language_strings) }} {{ macros_format_date::format_date(date=page.updated, short=true, language_strings=language_strings) }}</li>
|
||||
{# Show link to remote changes if enabled #}
|
||||
{% if config.extra.remote_repository_url and macros_settings::evaluate_setting_priority(setting="show_remote_changes", page=page, default_global_value=true) == "true" %}
|
||||
{{ separator }}
|
||||
<li><a href="{{ macros_create_history_url::create_history_url(relative_path=page.relative_path) }}" {{ blank_target }} rel="{{ rel_attributes }}">{{ macros_translate::translate(key="see_changes", default="See changes", language_strings=language_strings) }}<small> ↗</small></a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if page.extra.tldr %}
|
||||
<div class="tldr">
|
||||
<h3>TL;DR:</h3>
|
||||
<p>{{ page.extra.tldr }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Optional table of contents below the header #}
|
||||
{% if page.toc and macros_settings::evaluate_setting_priority(setting="toc", page=page, default_global_value=false) == "true" %}
|
||||
{{ macros_toc::toc(page=page, header=true, language_strings=language_strings) }}
|
||||
{% endif %}
|
||||
|
||||
<section class="body">
|
||||
{# The replace pattern is used to enable arbitrary locations for the Table of Contents #}
|
||||
{# This is Philipp Oppermann's workaround: https://github.com/getzola/zola/issues/584#issuecomment-474329637 #}
|
||||
{{ page.content | replace(from="<!-- toc -->", to=macros_toc::toc(page=page, header=false, language_strings=language_strings)) | safe }}
|
||||
</section>
|
||||
|
||||
{# Check if comments are enabled #}
|
||||
{% set giscus_enabled = config.extra.giscus.enabled_for_all_posts or page.extra.giscus %}
|
||||
{% set utterances_enabled = config.extra.utterances.enabled_for_all_posts or page.extra.utterances %}
|
||||
{% set hyvortalk_enabled = config.extra.hyvortalk.enabled_for_all_posts or page.extra.hyvortalk %}
|
||||
{% set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso %}
|
||||
|
||||
{# Ensure only one comment system is enabled #}
|
||||
{# Counter for enabled comment systems #}
|
||||
{% set enabled_systems = 0 %}
|
||||
|
||||
{# Check and count the enabled comment systems #}
|
||||
{% if giscus_enabled %}
|
||||
{% set comment_system = "giscus" %}
|
||||
{% set enabled_systems = enabled_systems + 1 %}
|
||||
{% endif %}
|
||||
{% if utterances_enabled %}
|
||||
{% set comment_system = "utterances" %}
|
||||
{% set enabled_systems = enabled_systems + 1 %}
|
||||
{% endif %}
|
||||
{% if hyvortalk_enabled %}
|
||||
{% set comment_system = "hyvortalk" %}
|
||||
{% set enabled_systems = enabled_systems + 1 %}
|
||||
{% endif %}
|
||||
{% if isso_enabled %}
|
||||
{% set comment_system = "isso" %}
|
||||
{% set enabled_systems = enabled_systems + 1 %}
|
||||
{% endif %}
|
||||
|
||||
{# Ensure only one comment system is enabled #}
|
||||
{% if enabled_systems > 1 %}
|
||||
{{ throw(message="ERROR: Multiple comment systems have been enabled for the same page. Check your config.toml and individual page settings to ensure only one comment system is activated at a time.") }}
|
||||
{% endif %}
|
||||
|
||||
{% if comment_system %}
|
||||
{% set automatic_loading = config.extra[comment_system].automatic_loading %}
|
||||
{{ macros_add_comments::add_comments(comment_system=comment_system, automatic_loading=automatic_loading) }}
|
||||
{% endif %}
|
||||
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{# Quick navigation buttons #}
|
||||
{% if macros_settings::evaluate_setting_priority(setting="quick_navigation_buttons", page=page, default_global_value=false) == "true" %}
|
||||
<div id="button-container">
|
||||
{# Button to go show a floating Table of Contents #}
|
||||
{% if page.toc %}
|
||||
<div id="toc-floating-container">
|
||||
<input type="checkbox" id="toc-toggle" class="toggle"/>
|
||||
<label for="toc-toggle" class="overlay"></label>
|
||||
<label for="toc-toggle" id="toc-button" class="button" title="Toggle Table of Contents" aria-label="toggle Table of Contents">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M414.82-193.094q-18.044 0-30.497-12.32-12.453-12.319-12.453-30.036t12.453-30.086q12.453-12.37 30.497-12.37h392.767q17.237 0 29.927 12.487 12.69 12.486 12.69 30.203 0 17.716-12.69 29.919t-29.927 12.203H414.82Zm0-244.833q-18.044 0-30.497-12.487Q371.87-462.9 371.87-480.45t12.453-29.92q12.453-12.369 30.497-12.369h392.767q17.237 0 29.927 12.511 12.69 12.512 12.69 29.845 0 17.716-12.69 30.086-12.69 12.37-29.927 12.37H414.82Zm0-245.167q-18.044 0-30.497-12.32t-12.453-30.037q0-17.716 12.453-30.086 12.453-12.369 30.497-12.369h392.767q17.237 0 29.927 12.486 12.69 12.487 12.69 30.203 0 17.717-12.69 29.92-12.69 12.203-29.927 12.203H414.82ZM189.379-156.681q-32.652 0-55.878-22.829t-23.226-55.731q0-32.549 23.15-55.647 23.151-23.097 55.95-23.097 32.799 0 55.313 23.484 22.515 23.484 22.515 56.246 0 32.212-22.861 54.893-22.861 22.681-54.963 22.681Zm0-245.167q-32.652 0-55.878-23.134-23.226-23.135-23.226-55.623 0-32.487 23.467-55.517t56.12-23.03q32.102 0 54.721 23.288 22.62 23.288 22.62 55.775 0 32.488-22.861 55.364-22.861 22.877-54.963 22.877Zm-.82-244.833q-32.224 0-55.254-23.288-23.03-23.289-23.03-55.623 0-32.333 23.271-55.364 23.272-23.03 55.495-23.03 32.224 0 55.193 23.288 22.969 23.289 22.969 55.622 0 32.334-23.21 55.364-23.21 23.031-55.434 23.031Z"/></svg>
|
||||
</label>
|
||||
<div class="toc-content">
|
||||
{{ macros_toc::toc(page=page, header=false, language_strings=language_strings) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Button to go to the comment section #}
|
||||
{% if comment_system %}
|
||||
<a href="#comments" id="comments-button" title="Go to comment section">
|
||||
<svg viewBox="0 0 20 20" fill="currentColor"><path d="M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z" clip-rule="evenodd" fill-rule="evenodd"/></svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{# Button to go to the top of the page #}
|
||||
<a href="#" id="top-button" title="Go to top of page">
|
||||
<svg viewBox="0 0 20 20" fill="currentColor"><path d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Add KaTeX functionality #}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="katex", page=page, default_global_value=false) == "true" -%}
|
||||
<link rel="stylesheet" href="{{ get_url(path='katex.min.css', trailing_slash=false) | safe }}">
|
||||
<script defer src="{{ get_url(path='js/katex.min.js', trailing_slash=false) | safe }}"></script>
|
||||
{%- endif -%}
|
||||
|
||||
{# Add copy button to code blocks #}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="copy_button", page=page, default_global_value=true) == "true" -%}
|
||||
<script defer src="{{ get_url(path='js/copyCodeToClipboard.min.js', trailing_slash=false) | safe }}"/></script>
|
||||
{%- endif -%}
|
||||
|
||||
{# Add backlinks to footnotes #}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="footnote_backlinks", page=page, default_global_value=false) == "true" -%}
|
||||
<script defer src="{{ get_url(path='js/footnoteBacklinks.min.js', trailing_slash=false | safe )}}"/></script>
|
||||
{%- endif -%}
|
||||
|
||||
{% endblock main_content %}
|
||||
|
@ -0,0 +1,43 @@
|
||||
<li class="language-switcher">
|
||||
<div class="dropdown" type="Button">
|
||||
<div class="language-switcher-icon"></div>
|
||||
|
||||
<div class="dropdown-content">
|
||||
{#- Display the current language first in the dropdown -#}
|
||||
{{ macros_translate::translate(key="language_name", default=lang, language_strings=language_strings) }}
|
||||
|
||||
{#- Loop through all the available languages in the config -#}
|
||||
{%- for lcode, ldetails in config.languages -%}
|
||||
{#- Skip the current language to avoid linking to the current page -#}
|
||||
{%- if lang == lcode -%}
|
||||
{%- continue -%}
|
||||
{%- endif -%}
|
||||
|
||||
{#- Dynamically load the language strings for each language -#}
|
||||
{%- set other_language_strings = load_data(path="i18n/" ~ lcode ~ ".toml", required=false) -%}
|
||||
{%- if not other_language_strings -%}
|
||||
{%- set other_language_strings = load_data(path="themes/tabi/i18n/" ~ lcode ~ ".toml", required=false) -%}
|
||||
{%- endif -%}
|
||||
|
||||
{#- Use the loaded language strings to get the language name -#}
|
||||
{% set language_name = macros_translate::translate(key="language_name", default=lcode,
|
||||
language_strings=other_language_strings) %}
|
||||
|
||||
{#- Check if the language code matches the default language -#}
|
||||
{%- if lcode == config.default_language -%}
|
||||
{#- If it does, link to the root path (no language code in URL) -#}
|
||||
<a type="Button" href="{{ current_url | replace(from='/' ~ lang ~ '/', to = '/') }}">{{ language_name }}</a>
|
||||
{%- elif lang == config.default_language -%}
|
||||
{#- Check if the current language is the default language -#}
|
||||
{#- If it is, append the language code to the base URL -#}
|
||||
<a type="Button" href="{{ config.base_url }}/{{ lcode }}{{ current_path | default(value=" /") | safe }}">{{
|
||||
language_name }}</a>
|
||||
{%- else -%}
|
||||
{#- If it's not, replace the current language code in the URL with the new one -#}
|
||||
<a type="Button" href="{{ current_url | replace(from='/' ~ lang ~ '/', to='/' ~ lcode ~ '/') }}">{{
|
||||
language_name }}</a>
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
Loading…
Reference in New Issue