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
110 lines
4.7 KiB
HTML
110 lines
4.7 KiB
HTML
{# Chrome deliberately mirrors the public site's header and footer, so moving
|
|
between vienalatina.com and the members area does not feel like leaving. #}
|
|
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<title>{% block title %}{{ t('chrome.titulo') }}{% endblock %} — Viena Latina</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='board.css') }}">
|
|
{% block brand_css %}
|
|
{# After board.css, so the admin's colours win, and cache-busted by when
|
|
they were saved. A generated file rather than an inline <style> because
|
|
the CSP has no 'unsafe-inline' — an inline block would simply not apply,
|
|
without a word in the console. The Marca screen overrides this block
|
|
with nothing, so custom CSS that breaks the page cannot hide the page
|
|
that undoes it. #}
|
|
<link rel="stylesheet" href="{{ url_for('brand.stylesheet_file') }}?v={{ brand.stamp }}">
|
|
{% endblock %}
|
|
{% if brand.favicon_name %}
|
|
<link rel="icon" type="image/png"
|
|
href="{{ url_for('brand.picture', stored_name=brand.favicon_name) }}?v={{ brand.stamp }}">
|
|
{% endif %}
|
|
<script src="{{ url_for('static', filename='board.js') }}" defer></script>
|
|
</head>
|
|
<body>
|
|
|
|
<header class="site-bar">
|
|
<div class="site-bar__inner">
|
|
<a class="site-bar__brand" href="/">
|
|
{% if brand.logo_name %}
|
|
<img class="site-bar__logo" alt="Viena Latina"
|
|
src="{{ url_for('brand.picture', stored_name=brand.logo_name) }}?v={{ brand.stamp }}">
|
|
{% else %}
|
|
<span class="site-bar__brand-text">Viena Latina</span>
|
|
{% endif %}
|
|
</a>
|
|
{% if g.member %}
|
|
{# <details> rather than a button with a handler: the CSP has no
|
|
'unsafe-inline', so a menu that needs onclick="" is a menu that
|
|
silently never opens. This one works with the CSS and the HTML
|
|
alone. #}
|
|
<details class="account">
|
|
<summary class="account__name">{{ g.member.display_name }}</summary>
|
|
<div class="account__menu">
|
|
<a href="{{ url_for('profiles.edit') }}">{{ t('account.perfil') }}</a>
|
|
<a href="{{ url_for('members.export') }}">{{ t('account.datos') }}</a>
|
|
<form method="post" action="{{ url_for('auth.logout') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="linkish" type="submit">{{ t('account.salir') }}</button>
|
|
</form>
|
|
</div>
|
|
</details>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if g.member %}
|
|
<nav class="site-bar__pages" aria-label="{{ t('nav.secciones') }}">
|
|
{# Six entries, and five of them are the same for everybody. The role
|
|
only decides whether Gestión is there — it used to decide three of
|
|
them, which is how an ordinary member ended up signing in to a wall
|
|
and a member list with their own profile and their own private
|
|
messages hidden from them. Account items are in the corner menu
|
|
above, because "Mi perfil" is not a section of the site.
|
|
|
|
*Privados* used to be here, holding a list of conversations. The
|
|
people are the section now and the messages live on each person's
|
|
page, so the unread badge hangs on Miembros: it is the only thing
|
|
left that tells a member somebody wrote to them, which is why it is
|
|
also repeated on the card of whoever wrote. #}
|
|
<ul class="page-nav">
|
|
<li><a href="{{ url_for('home.index') }}">{{ t('nav.inicio') }}</a></li>
|
|
<li><a href="{{ url_for('board.threads') }}">{{ t('nav.muro') }}</a></li>
|
|
<li>
|
|
<a href="{{ url_for('members.index') }}">{{ t('nav.miembros') }}{% set unread = unread_private() %}{% if unread %} <span class="tag">{{ unread }}</span>{% endif %}</a>
|
|
</li>
|
|
<li>
|
|
{# The badge counts what is waiting for a moderator, so for
|
|
anybody else the function returns 0 and nothing is drawn. #}
|
|
<a href="{{ url_for('submissions.index') }}">{{ t('nav.publicaciones') }}{% set waiting = pending_review() %}{% if waiting %} <span class="tag">{{ waiting }}</span>{% endif %}</a>
|
|
</li>
|
|
<li><a href="{{ url_for('events.month') }}">{{ t('nav.calendario') }}</a></li>
|
|
{% if is_at_least(g.member.role, 'admin') %}
|
|
<li><a href="{{ url_for('home.gestion') }}">{{ t('nav.gestion') }}</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|
|
</header>
|
|
|
|
<div class="page-shell">
|
|
<main class="feed">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% for category, message in messages %}
|
|
<p class="flash flash--{{ category }}">{{ message }}</p>
|
|
{% endfor %}
|
|
{% endwith %}
|
|
|
|
{% block main %}{% endblock %}
|
|
</main>
|
|
|
|
<footer class="site-foot">
|
|
<a href="/">{{ t('chrome.publico') }}</a>
|
|
<div class="site-foot__legal">Viena Latina © {{ current_year }} · {{ t('chrome.privada') }}</div>
|
|
</footer>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|