Renaming «Inicio» was six edits — base.html, home.py's section list,
config.yaml three times, an aria-label, and the breadcrumb schema — and
none of them reachable from Gestión. That is the thing Identidad exists
to end for the site's name, and it stopped before it reached the labels.
The mechanism, and the navigation through it. The rest of the ~560
strings follow in later commits; this one is the path proved end to end.
apps/board/strings/*.yaml is the catalogue, shipped in the image through
the Dockerfile's existing COPY. Only the differences are stored, which
is brand.FACTORY's rule and buys the same thing: a wording I improve
later improves for everyone who has not deliberately overridden it.
The `site.` prefix decides everything — one box or three, SQLite or a
commit of data/ui.yaml, this page load or the next pipeline run.
The fallback order is a judgement rather than an accident: an override
for the asked-for language, then the *shipped* word in that language,
then Spanish. Somebody who reworded only the Spanish has said nothing
about German, and showing a German reader Spanish would be reading an
intention into silence. Verified in a real build: with es overridden,
the Spanish menu says «Escritorio» and the German still says «Start».
The screen is generic — it iterates the catalogue, so extracting another
hundred strings costs nothing here. There is no field list in ui.py and
there must never be one.
Two guards are what make a 560-string extraction mechanical rather than
risky: every t("…") used must exist, and every key defined must be used.
A typo renders as nav.incio on a page; an orphan is a box in Gestión
that changes nothing. Both fail the suite instead. I proved all three
guards (including the one holding t.html to the catalogue) by
introducing the bug each describes and watching it go red.
Two things fixed on the way, both found by the extraction rather than
looked for: home.py and base.html held two copies of the same six words,
so a rename would have reached the members area and not the strip on the
public site; and memberbar.js hardcoded two more in a fingerprinted
script, the one surface no setting could ever reach.
No migration — `strings` is a new table, so CREATE TABLE IF NOT EXISTS
makes it, as activity and site arrived. The erase guard caught the new
members(id) reference by itself, which is the mechanism working.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
58 lines
3.3 KiB
HTML
58 lines
3.3 KiB
HTML
{{- /* 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", "Hoy" — and there
|
|
are eleven of them, which is a table rather than a reason to install i18n
|
|
files and a translation workflow for the theme.
|
|
|
|
Usage: {{ partial "t.html" (dict "key" "place" "lang" .Site.Language.Lang) }}
|
|
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")
|
|
-}}
|
|
{{- /* What Gestión → Textos has said instead, if anything. Read through
|
|
nested `with` rather than as site.Data.ui.<key>.<lang>, 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 -}}
|
|
{{- if $said -}}
|
|
{{- $said -}}
|
|
{{- else -}}
|
|
{{- $entry := index $words .key -}}
|
|
{{- if $entry -}}
|
|
{{- index $entry .lang | default (index $entry "es") -}}
|
|
{{- else -}}
|
|
{{- .key -}}
|
|
{{- end -}}
|
|
{{- end -}}
|