Files
blog/frontend/shared/utils/i18n.ts
T
davide ac536bd152 Add an English translation of the corralito training-courses page
It was deliberately left Italian-only when /en support was first added;
now translated and following the same thin-page + shared-view pattern
as every other route, with the nav link and language switch no longer
special-casing it.
2026-09-11 15:39:31 +02:00

172 lines
8.8 KiB
TypeScript

/**
* Static UI copy, in both languages. Deliberately a plain object, not a
* library: two locales, ~20 short strings, no plurals — see docs/frontend.md.
* Keyed by role (not by the Italian text), so a wording tweak never touches
* the key.
*/
import type { Locale } from './locale'
export const STRINGS = {
it: {
skipLink: 'Vai al contenuto',
tagline: 'Articoli, guide e analisi.',
navAriaLabel: 'Navigazione principale',
navHome: 'Home',
navBlog: 'Tutti gli articoli',
navCorralito: 'Come difendersi dal corralito',
footerNavAriaLabel: 'Naviga',
footerNavigaKicker: 'Naviga',
footerSeguiciKicker: 'Seguici',
footerFollowAriaLabel: 'Seguici',
contactLabel: 'Contatti:',
copyright: 'Tutti i diritti riservati.',
langSwitch: {
ariaLabel: 'Lingua del sito',
it: 'Italiano',
en: 'English',
},
home: {
heading: "La fine dell'Unione Europea per come l'abbiamo conosciuta.",
img1Alt: 'Manifesti e scritte contro le banche durante una crisi bancaria',
img2Alt: "Bandiera dell'Unione Europea incrinata",
p1: "La fine della nostra moneta come moneta forte: la fine di quella moneta che ci ha dato la vera libertà di viaggiare, consumare e fare.",
p2: "Una fine che avverrà a seguito di un \"incidente\" nucleare, al quale farà seguito un corralito bancario, ossia l'impossibilità, da parte dei cittadini europei, di disporre liberamente dei propri depositi.",
p3: "Le monete fiduciarie sono per loro natura cannibalizzanti. Oggi tocca all'euro. Anche perché le altre hanno praticamente perso tutte tutto.",
fallbackKicker: 'Ultimo',
readLatest: "Leggi l'ultimo articolo",
metaDescription: 'Articoli, guide e analisi.',
},
blog: {
archiveKicker: "L'archivio",
title: 'Articoli',
titlePage: 'Articoli — pagina {page}',
metaDescription: 'Tutti gli articoli pubblicati sul blog.',
loadError: 'Non è stato possibile caricare gli articoli. Riprova più tardi.',
loading: 'Caricamento…',
empty: 'Non è stato ancora pubblicato nulla.',
prevPage: 'Pagina precedente',
nextPage: 'Pagina successiva',
pageOf: 'Pagina {current} di {total}',
goToPage: 'Vai a pagina {page}',
paginationAriaLabel: 'Paginazione',
},
category: {
kicker: 'Categoria',
metaDescription: 'Tutti gli articoli nella categoria {name}.',
loadError: 'Non è stato possibile caricare gli articoli. Riprova più tardi.',
empty: 'Non ci sono articoli in questa categoria.',
},
article: {
breadcrumbAriaLabel: 'Percorso di navigazione',
articlesCrumb: 'Articoli',
byAuthor: 'Di {author}',
backToArticles: 'Torna a tutti gli articoli',
},
corralito: {
metaTitle: 'Corsi di formazione sulle criptovalute',
metaDescription: 'Corsi pratici, individuali o di gruppo, per capire come funzionano le criptovalute e difendersi dal corralito.',
coverAlt: 'Manifesti e scritte contro le banche durante una crisi bancaria',
p1: 'Stai pensando di avvicinarti al mondo delle criptovalute (un mercato parallelo al mercato tradizionale finanziario), ma non sai da dove cominciare?',
p2: "È possibile organizzare corsi individuali o di gruppo dedicati alla conoscenza e al funzionamento delle criptovalute, con un approccio prevalentemente pratico e senza fornire consigli o raccomandazioni finanziarie.",
topicsIntro: 'Durante il corso possiamo affrontare, tra gli altri, questi argomenti:',
topics: [
'quali sono i principali tipi di criptovalute e quali differenze esistono tra loro;',
'come funziona una blockchain e cosa significa realmente effettuare una transazione;',
'dove e come vengono conservate le criptovalute: wallet, exchange e sistemi di custodia;',
'come acquistare e vendere criptovalute e quali sono le principali modalità disponibili;',
'come utilizzare un wallet e gestire correttamente le proprie chiavi;',
'quali sono i principali rischi legati alla sicurezza e alla custodia;',
'come orientarsi nel vastissimo universo delle criptovalute e dei token.',
],
disclaimer: "Non si tratta di consulenza finanziaria e non verranno fornite indicazioni su quali criptovalute acquistare o vendere. L'obiettivo è fornire conoscenze e strumenti per comprendere questo nuovo mondo e muoversi al suo interno con maggiore consapevolezza.",
contactKicker: 'Per informazioni sui corsi, modalità e disponibilità',
emailLink: 'Scrivimi via email',
telegramLink: 'Scrivimi su Telegram',
},
},
en: {
skipLink: 'Skip to content',
tagline: 'Articles, guides and analysis.',
navAriaLabel: 'Main navigation',
navHome: 'Home',
navBlog: 'All articles',
navCorralito: 'How to protect yourself from the corralito',
footerNavAriaLabel: 'Navigate',
footerNavigaKicker: 'Navigate',
footerSeguiciKicker: 'Follow us',
footerFollowAriaLabel: 'Follow us',
contactLabel: 'Contact:',
copyright: 'All rights reserved.',
langSwitch: {
ariaLabel: 'Site language',
it: 'Italiano',
en: 'English',
},
home: {
heading: "The end of the European Union as we've known it.",
img1Alt: 'Banners and graffiti against banks during a banking crisis',
img2Alt: 'Cracked European Union flag',
p1: 'The end of our currency as a strong currency: the end of the currency that gave us the real freedom to travel, spend and act.',
p2: 'An end that will follow a nuclear "incident", followed by a banking corralito — the impossibility, for European citizens, of freely accessing their own deposits.',
p3: "Fiat currencies are cannibalizing by nature. Today it's the euro's turn. Especially since the others have already lost almost everything.",
fallbackKicker: 'Latest',
readLatest: 'Read the latest article',
metaDescription: 'Articles, guides and analysis.',
},
blog: {
archiveKicker: 'The archive',
title: 'Articles',
titlePage: 'Articles — page {page}',
metaDescription: 'All the articles published on the blog.',
loadError: 'Could not load the articles. Please try again later.',
loading: 'Loading…',
empty: 'Nothing has been published yet.',
prevPage: 'Previous page',
nextPage: 'Next page',
pageOf: 'Page {current} of {total}',
goToPage: 'Go to page {page}',
paginationAriaLabel: 'Pagination',
},
category: {
kicker: 'Category',
metaDescription: 'All the articles in the {name} category.',
loadError: 'Could not load the articles. Please try again later.',
empty: 'There are no articles in this category.',
},
article: {
breadcrumbAriaLabel: 'Breadcrumb',
articlesCrumb: 'Articles',
byAuthor: 'By {author}',
backToArticles: 'Back to all articles',
},
corralito: {
metaTitle: 'Cryptocurrency training courses',
metaDescription: 'Practical, individual or group courses to understand how cryptocurrencies work and protect yourself from the corralito.',
coverAlt: 'Banners and graffiti against banks during a banking crisis',
p1: "Are you thinking about getting into the world of cryptocurrencies (a market parallel to the traditional financial market), but don't know where to start?",
p2: 'I can organize individual or group courses dedicated to understanding how cryptocurrencies work, with a mostly hands-on approach and without giving financial advice or recommendations.',
topicsIntro: 'During the course we can cover, among others, these topics:',
topics: [
'the main types of cryptocurrencies and the differences between them;',
'how a blockchain works and what actually happens when you make a transaction;',
'where and how cryptocurrencies are stored: wallets, exchanges and custody systems;',
'how to buy and sell cryptocurrencies and the main methods available;',
'how to use a wallet and correctly manage your own keys;',
'the main risks related to security and custody;',
'how to find your way around the vast universe of cryptocurrencies and tokens.',
],
disclaimer: 'This is not financial advice, and no indications will be given on which cryptocurrencies to buy or sell. The goal is to provide knowledge and tools to understand this new world and navigate it with greater awareness.',
contactKicker: 'For information on courses, format and availability',
emailLink: 'Email me',
telegramLink: 'Message me on Telegram',
},
},
} as const satisfies Record<Locale, unknown>
/** Fills `{placeholder}` tokens in a translated string. */
export function interpolate(template: string, params: Record<string, string | number>): string {
return template.replace(/\{(\w+)\}/g, (match, key: string) =>
key in params ? String(params[key]) : match
)
}