What a complete localization consists of
locales/<lang>.yml-- copylocales/en.ymland translate the values (never the keys). The sections, roughly in order of what a visitor vs. an author sees:
| Section | Who sees it |
|---|---|
date_format, date_time_format | everyone -- strftime formats for every rendered date |
thousands_separator, decimal_point | nobody reads these as words: they are how a number is written, not a message. English keeps , and ., German swaps them, Czech separates thousands with a non-breaking space. ./blog.sh stats formats its numbers through them, and every file size the engine prints -- beside an attachment on a page as well -- takes its decimal mark from decimal_point |
language_name | site visitors -- the language's name in itself (Deutsch), which the language switcher shows to a reader of any other language |
nav, post, pagination, tag, tags, type, series, index, archive, search, not_found, markdown_page, ui, redirect | site visitors -- the chrome, the listings, the tag index and the archive map, a post's own furniture (reading time, contents, series navigation), the 404 page and the one line an old address shows while it forwards |
chrome | site visitors -- the headings the engine says when the site writes none of its own: "About", "Links", "Find me on", each widget's "Recent toots" |
share | site visitors -- the row of controls under a post, including the question the Mastodon button asks and the two lines the copy button swaps between |
js | site visitors -- shipped into the browser for client-rendered strings; js.date_locale is a BCP-47 tag (de-DE) and must agree with date_format, or server- and client-rendered dates diverge |
build | authors -- what ruby build/build_blog.rb says while it renders: both lines it signs off with, and everything it names as not built -- a post, a page, a tag, a redirect, a picture a post's media folder does not hold |
cli | authors -- ./blog.sh, the wizard, $EDITOR hints |
poster | authors -- what the CLI says when an announcement cannot be sent or its numbers cannot be fetched |
doctor, check, stats, export | authors -- the commands that report on the installation and the archive. doctor and check pair each finding with a fix line, and the fix is a sentence telling somebody what to do, so it is worth as much care as the finding |
setup, style, wizard | authors -- the questions in ./setup.sh and ./style.sh, plus the plumbing both share |
cron, import | authors -- scheduled publishing and ./import.sh |
lock | authors -- what a command says when another run holds the site |
pair, on_this_day | authors -- ./blog.sh pair (the code an app connects with, the devices let in) and ./blog.sh on-this-day (what the day holds from earlier years); the card's own words for a reader are under chrome and js |
language_file | authors -- the build's and check's sentences about a config/site.<lang>.yml whose menu or footer links go elsewhere |
templates/markdown-cheat-sheet.<lang>.md-- the source of the generated/markdown/syntax page. Optional: without it the page falls back to English wholesale. Translate the prose, keep the syntax examples as they are -- they are what the page exists to show. Keep the::: exampleand::: endlines too, each on a line of its own around what a source becomes: they are not shown, they put the result in an element a stylesheet can set apart. A sheet without them builds the page it always did.
write/locales/<lang>.yml-- the strings of the/write/page, which is a separate app: it runs in a browser with no Ruby behind it, so its locales are compiled intowrite/i18n.jsbyruby write/build-i18n.rb. Copywrite/locales/en.yml, translate the values, run that script, and commit the generated file with them; it reports every key that still falls back to English as it goes. Theerrorsection is the codesscripts/receive.shandadd --jsonreturn -- the server sends a code, never translated text, and this is where it becomes a sentence. Optional the way the cheat sheet is: a page with no locale of its own falls back to English key by key, and a site withoutwrite: truenever publishes it at all.
That's the whole list. README.md and docs/ stay English.
