diff --git a/app/templates/base.html b/app/templates/base.html index 9bbb46f..97d1750 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -158,11 +158,10 @@ // HTMX (server-side translation), but plain UI labels are baked into // the HTML at render time. This dict + applyI18n() below let the // language toggle swap labels live without a page refresh. - // Convention: … (sets textContent), - // (sets .placeholder). - // First-render correctness is handled by the template's - // {% if user_lang == 'it' %} block — applyI18n only kicks in on - // subsequent toggle events. + // Convention: data-i18n="key" sets textContent; + // data-i18n-placeholder="key" sets .placeholder. + // First-render correctness is handled by the template's user_lang + // conditional, so applyI18n only kicks in on subsequent toggles. window.CASSANDRA_I18N = { 'chat.title': { en: 'Ask Cassandra', it: 'Chiedi a Cassandra' },