Add Czech and Slovak translation files (AI)
cmjs/strings/cs.json restores the site's original Czech UI text (now sourced as a translation file rather than hardcoded); sk.json is a new Slovak translation. Both cover every key in en.json. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AXSVPS3UmmASiiprPfcnUd
This commit is contained in:
1 parent
9d87cffeeb
commit
99bb85e98a
3 files changed
+86
-2
No files matched your search
@@ -54,7 +54,9 @@ cmjs/
|
||||
│ ├── views.js # loadArticleList, loadArticle, loadAuthorView, loadCategoryView, loadSearch
|
||||
│ └── router.js # Hash router and app entry point
|
||||
├── strings/
|
||||
│ └── en.json # UI strings (default/fallback locale) — see "Translations" below
|
||||
│ ├── en.json # UI strings (default/fallback locale) — see "Translations" below
|
||||
│ ├── cs.json # Czech translation
|
||||
│ └── sk.json # Slovak translation
|
||||
├── templates/
|
||||
│ ├── card.html # Article list card layout
|
||||
│ └── article.html # Full article view layout
|
||||
@@ -174,7 +176,9 @@ Every UI string the JS renders (loading/error states, pagination, filter labels,
|
||||
contents heading, etc.) is looked up through `t(key, params)` in `cmjs/js/i18n.js` rather than
|
||||
hardcoded — `cmjs/strings/en.json` is the default/fallback string table.
|
||||
|
||||
To add a translation:
|
||||
Available locales: `en` (default), `cs` (Czech), `sk` (Slovak).
|
||||
|
||||
To add another translation:
|
||||
|
||||
1. Set `<html lang="xx">` in your `index.html` to the target language code (e.g. `cs`).
|
||||
2. Add `cmjs/strings/xx.json` with the same keys as `en.json` (copy it as a starting point) —
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"siteName": "Expediční blogy",
|
||||
"appStartError": "Blog se nepodařilo spustit: {message}",
|
||||
"articleNotFound": "Článek nebyl nalezen",
|
||||
|
||||
"filterAuthor": "Autor: {value}",
|
||||
"filterTag": "Štítek: {value}",
|
||||
"filterYear": "Ročník: {value}",
|
||||
"filterAllArticles": "Všechny články",
|
||||
"yearLabel": "Expa {year}",
|
||||
|
||||
"paginationLabel": "Stránkování",
|
||||
"paginationPrevious": "Předchozí",
|
||||
"paginationNext": "Další",
|
||||
"paginationPageInfo": "{page} z {totalPages}",
|
||||
|
||||
"templateEmptyError": "Šablona článku je prázdná.",
|
||||
"readingTime": "{minutes} min čtení",
|
||||
|
||||
"crawlHealthAuthorsFailed": "Pozor: nepodařilo se načíst žádného autora — zkontrolujte nastavení serveru.",
|
||||
"crawlHealthArticlesFailed": "Pozor: načtena jen {loaded} z {total} položek — zkontrolujte nastavení serveru.",
|
||||
|
||||
"loadingArticles": "Načítám články…",
|
||||
"loadingGeneric": "Načítám…",
|
||||
"emptyArticleList": "Nebyly nalezeny žádné články.",
|
||||
"articlesLoadError": "Články se nepodařilo načíst: {message}",
|
||||
|
||||
"searching": "Hledám…",
|
||||
"searchHeading": "Hledání: „{query}“",
|
||||
"searchNoResults": "Hledání neodpovídá žádný článek.",
|
||||
"searchError": "Hledání se nepodařilo: {message}",
|
||||
|
||||
"tocTitle": "Obsah",
|
||||
"tocFallbackHeading": "sekce",
|
||||
|
||||
"backToArticles": "Zpět na články",
|
||||
"articleLoadError": "Článek se nepodařilo načíst: {message}",
|
||||
|
||||
"socialWebsite": "Web"
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"siteName": "Expedičné blogy",
|
||||
"appStartError": "Blog sa nepodarilo spustiť: {message}",
|
||||
"articleNotFound": "Článok nebol nájdený",
|
||||
|
||||
"filterAuthor": "Autor: {value}",
|
||||
"filterTag": "Štítok: {value}",
|
||||
"filterYear": "Ročník: {value}",
|
||||
"filterAllArticles": "Všetky články",
|
||||
"yearLabel": "Expa {year}",
|
||||
|
||||
"paginationLabel": "Stránkovanie",
|
||||
"paginationPrevious": "Predchádzajúca",
|
||||
"paginationNext": "Ďalšia",
|
||||
"paginationPageInfo": "{page} z {totalPages}",
|
||||
|
||||
"templateEmptyError": "Šablóna článku je prázdna.",
|
||||
"readingTime": "{minutes} min čítania",
|
||||
|
||||
"crawlHealthAuthorsFailed": "Pozor: nepodarilo sa načítať žiadneho autora — skontrolujte nastavenie servera.",
|
||||
"crawlHealthArticlesFailed": "Pozor: načítaných len {loaded} z {total} položiek — skontrolujte nastavenie servera.",
|
||||
|
||||
"loadingArticles": "Načítavam články…",
|
||||
"loadingGeneric": "Načítavam…",
|
||||
"emptyArticleList": "Neboli nájdené žiadne články.",
|
||||
"articlesLoadError": "Články sa nepodarilo načítať: {message}",
|
||||
|
||||
"searching": "Hľadám…",
|
||||
"searchHeading": "Hľadanie: „{query}“",
|
||||
"searchNoResults": "Hľadaniu nezodpovedá žiadny článok.",
|
||||
"searchError": "Hľadanie sa nepodarilo: {message}",
|
||||
|
||||
"tocTitle": "Obsah",
|
||||
"tocFallbackHeading": "sekcia",
|
||||
|
||||
"backToArticles": "Späť na články",
|
||||
"articleLoadError": "Článok sa nepodarilo načítať: {message}",
|
||||
|
||||
"socialWebsite": "Web"
|
||||
}
|
||||
Reference in new issue
Block a user