{{- /* The handful of words the templates themselves say. Everything else on this site is content and arrives already translated by the pipeline. These are the labels around it — "Lugar", "Compartir" — and they are a table rather than a reason to install i18n files and a translation workflow for the theme. What is below is the *default*. Gestión → Textos can say something else, and that is read first, out of data/ui.yaml. The same defaults also live in apps/board/strings/sitio.yaml so the screen can show them as placeholders — two copies, unavoidably, because Hugo reads the repository and the members area reads its own image and neither can read the other's file. test_strings.py fails if they drift, the way brand.FACTORY is held to the two `:root` blocks. Usage: {{ partial "t.html" (dict "key" "place" "lang" $.Site.Language.Lang) }} **`$.` and never a bare `.`** Inside a `{{ with }}` the dot is whatever that block holds — a string, a slice — and `.Site` on a string fails the build rather than producing a wrong word. Two call sites shipped that way and the build only broke on a post that happened to carry an `author`. `$` is the page everywhere, and a test holds every call site to it. An unknown key returns itself, so a typo is visible on the page instead of rendering as nothing. */ -}} {{- $words := dict "time" (dict "es" "Hora" "de" "Uhrzeit" "pt-br" "Hora") "place" (dict "es" "Lugar" "de" "Ort" "pt-br" "Local") "add" (dict "es" "Añadir a mi calendario" "de" "Zum Kalender hinzufügen" "pt-br" "Adicionar ao meu calendário") "agenda" (dict "es" "Agenda" "de" "Termine" "pt-br" "Agenda") "previous" (dict "es" "Mes anterior" "de" "Voriger Monat" "pt-br" "Mês anterior") "next" (dict "es" "Mes siguiente" "de" "Nächster Monat" "pt-br" "Próximo mês") "noevents" (dict "es" "No hay nada en este mes." "de" "In diesem Monat ist nichts geplant." "pt-br" "Nada marcado neste mês.") "ai" (dict "es" "Generado con IA" "de" "Mit KI erstellt" "pt-br" "Gerado com IA") "pinned" (dict "es" "Fijado" "de" "Angeheftet" "pt-br" "Fixado") "share" (dict "es" "Compartir" "de" "Teilen" "pt-br" "Compartilhar") "copylink" (dict "es" "Copiar enlace" "de" "Link kopieren" "pt-br" "Copiar link") "copied" (dict "es" "Enlace copiado" "de" "Link kopiert" "pt-br" "Link copiado") "askmasto" (dict "es" "¿En qué servidor de Mastodon tienes tu cuenta? Por ejemplo: mastodon.social" "de" "Auf welchem Mastodon-Server hast du dein Konto? Zum Beispiel: mastodon.social" "pt-br" "Em qual servidor do Mastodon está a sua conta? Por exemplo: mastodon.social") "aifull" (dict "es" "Quien lo publicó marcó este texto como generado con inteligencia artificial." "de" "Wer diesen Beitrag veröffentlicht hat, hat ihn als mit künstlicher Intelligenz erstellt gekennzeichnet." "pt-br" "Quem publicou marcou este texto como gerado com inteligência artificial.") "community" (dict "es" "Comunidad" "de" "Community" "pt-br" "Comunidade") "menu" (dict "es" "Menú" "de" "Menü" "pt-br" "Menu") "home" (dict "es" "Inicio" "de" "Start" "pt-br" "Início") "back" (dict "es" "← Volver al inicio" "de" "← Zurück zur Startseite" "pt-br" "← Voltar ao início") "by" (dict "es" "por" "de" "von" "pt-br" "por") "faq" (dict "es" "Preguntas frecuentes" "de" "Häufige Fragen" "pt-br" "Perguntas frequentes") "sections" (dict "es" "Secciones" "de" "Bereiche" "pt-br" "Seções") "language" (dict "es" "Idioma" "de" "Sprache" "pt-br" "Idioma") "pages" (dict "es" "Páginas del sitio" "de" "Seiten" "pt-br" "Páginas do site") "social" (dict "es" "Redes" "de" "Soziale Netzwerke" "pt-br" "Redes") -}} {{- /* What Gestión → Textos has said instead, if anything. Read through nested `with` rather than as site.Data.ui.., because on a site with no data file that dotted chain is a field lookup on nil and fails the build — which is the state every install starts in. Same shape, and the same trap, as site-name.html. */ -}} {{- $said := "" -}} {{- with site.Data.ui -}} {{- with index . $.key -}} {{- with index . $.lang }}{{ $said = . }}{{ end -}} {{- end -}} {{- end -}} {{- /* Then what the pipeline translated into the languages that box was left empty in — data/ui_auto.yaml, written by scripts/translate.py. It only ever holds a key whose Spanish somebody overrode, so it beats the shipped word without ever displacing one nobody touched. That ordering is a judgement: rename «Inicio» to «Escritorio» and the shipped «Start» is no longer a translation of anything, it describes the old section. Leave the key alone and this file has no entry and nothing changes. */ -}} {{- if not $said -}} {{- with site.Data.ui_auto -}} {{- with index . $.key -}} {{- with index . $.lang }}{{ $said = . }}{{ end -}} {{- end -}} {{- end -}} {{- end -}} {{- if $said -}} {{- $said -}} {{- else -}} {{- $entry := index $words .key -}} {{- if $entry -}} {{- index $entry .lang | default (index $entry "es") -}} {{- else -}} {{- .key -}} {{- end -}} {{- end -}}