package gallery import "strings" // The gallery's own words: every label the chrome shows, by id. The // examples' labels and markup are the manifest's and are not here. // // A value that still reads TODO-COPY: has not been through copy // review; TestTheGalleryCarriesNoPlaceholderCopy fails while any // remains, so a placeholder cannot reach a page by accident. The ids // are the ones the review is filed under. // // Most of what follows is Rastrillo's approved English, carried word // for word from its gallery's prose table and its base catalog, with // the id written beside it so the translation exporter can match the // English against Rastrillo's rows. Fiesta's own strings are the ones // part 3's review passed. var text = map[string]string{ // The of every page: the page first, because a tab strip // truncates from the end, then the site, then the theme. "gallery.title": "{page} · Fiesta · {theme}", // The brand link at the start of the header, back to the Overview. "gallery.brand": "Fiesta", // The skip link, first in every page. "gallery.skip": "Skip to content", // The theme switcher's accessible name. "gallery.theme.label": "Theme", // The page kinds' titles, which name the pages, the rail's sections // and the routes off the Overview. The families' titles are the // prose's. "gallery.kind.overview": "Overview", "gallery.kind.tokens": "Tokens", "gallery.kind.icons": "Icons", "gallery.kind.getting-started": "Getting started", // The Overview's route into the Tokens page. "gallery.route.tokens": "Every custom property the system is built out of: the theme's colour and type, and the scales for size, spacing and radius.", // The Overview: the heading over its routes. "gallery.overview.next": "Where to go next", // The Overview: its intro, and its routes into Getting started and the Icons page. "gallery.overview.intro": "Fiesta is Rastrillo's design system as a project of its own: consistent, polished, accessible components for any website or app, in any stack or none, with no or minimal JavaScript, in twelve languages, in clean, modern HTML and CSS. One stylesheet and done; the markup is yours to copy and remix.", "gallery.routes.getting-started": "What ships: the one-link stylesheet, each theme, the optional scripts and the strings, with what each file weighs.", "gallery.routes.icons": "Every icon slug at the size components draw it, with the file to copy and its lucide.dev name.", // The previous and next pair at the foot of every page. "gallery.step.prev": "Previous: {page}", "gallery.step.next": "Next: {page}", "gallery.steps.label": "Previous and next", // The rail: its accessible name, the Demos group, each section's // overview item and the mark on a link that leaves the page. "gallery.nav.sections": "Sections and demos", "gallery.nav.demos": "Demos", "gallery.nav.overview": "Overview", "gallery.nav.overview.aria": "{section} overview", "gallery.demos.shell": "The {shell} shell", "gallery.demos.modal": "The modal route", "gallery.demos.app": "The demo application", "gallery.newtab": "opens in a new tab", // The rail's filter. "gallery.filter": "Filter", "gallery.filter.empty": "No matches", // The display settings menu on a phone, and the language menu in it // and in the bar. "gallery.prefs": "Display settings", "gallery.language": "Language", "gallery.language.current": ", currently {language}", "gallery.locale.name": "English", // The way back from a content page on a phone: the shell's own // words, from Rastrillo's base catalog. "gallery.up": "Back to {name}", "gallery.up.label": "Sections", // The preview widget: the tabs' legend and names, the HTML tab, // the frame's accessible name, the Copy button and its live region, // the wrapper line, and the note naming the routes a sample stands // for. "gallery.view.legend": "Preview", "gallery.view.desktop": "Desktop", "gallery.view.mobile": "Mobile", "gallery.html": "HTML", "gallery.frame.title": "{example}: {state}", "gallery.copy": "Copy", "gallery.copied": "Copied", "gallery.copy.failed": "Copy failed. Select the code and copy it yourself.", "gallery.wrap": "Put this inside {wrapper}.", "gallery.routes": "In an app this would reach {routes}. Here its links and forms go nowhere.", // An example's page: the two sentences under its heading. "gallery.example.live": "Each example is live, but its links go nowhere.", "gallery.example.html": "HTML shows the markup to copy.", // The demo application on the Overview, the shells' open buttons, // and the way back from the demo and the modal route. "gallery.demo.heading": "The demo application", "gallery.demo.lead": "A working app built only from this system: a dashboard, a list, one record open. Each has its own address. No JavaScript.", "gallery.demo.open": "Open the demo application", "gallery.shell.open": "Open the {shell} shell", "gallery.back": "Back to the design system", // The primitives' live links. "gallery.primitives.modal.live": "See it live at the URL it belongs to", "gallery.primitives.sidebar.live": "Open the sidebar shell demo, a standalone preview.", "gallery.primitives.topbar.live": "Open the topbar shell demo, a dedicated preview.", // The demo application's request view: the body of its closing // callout, Fiesta's own words under Rastrillo's title. "gallery.demo.callout.body": "Each screen is a page of its own, plain HTML in the sidebar shell, and works the same with JavaScript off. On a phone, the sections are a list and each screen has a way back.", // The modal route: the page under it and the panel over it. "gallery.modal.close": "Close settings", "gallery.modal.own": "Modals get their own URL.", "gallery.modal.settings": "Settings", "gallery.modal.sub": "The page the modal opened over. It is marked inert, so nothing in here takes focus or reaches a screen reader while the panel is up.", "gallery.modal.account": "Account", "gallery.modal.profile": "Profile", "gallery.modal.billing": "Billing", "gallery.modal.notifications": "Notifications", "gallery.modal.body": "Update the name and photo shown across the account.", "gallery.modal.nojs": "Close link designed to work without JS.", "gallery.modal.inapp": "In an application the ✕ would return you to the screen in the backdrop.", // Getting started: its headings, the weights table's note and line, // and the per-file blurbs Rastrillo wrote for the files Fiesta // ships too. "gallery.started.stylesheets": "The stylesheets", "gallery.started.scripts": "The scripts", "gallery.started.weights": "What each file weighs", "gallery.started.weights.note": "Sizes in KiB. Gzipped is what a visitor downloads.", "gallery.started.weight": "{raw} as written · {gzip} gzipped · {stripped} gzipped without comments", "gallery.started.upgrading": "Upgrading", "gallery.started.file.tokens": "Structure: every component class, every scale, and no colour literal anywhere. The same file under every theme.", "gallery.started.file.theme": "Colour, type family and shape for the {theme} theme: one :root block where every colour is declared once as a light-dark() pair.", "gallery.started.file.shell-css": "The slide between pages on a phone, for the sidebar and console shells. Deletable with shell.js.", "gallery.started.file.light-js": "The light the depth styles read: shadows lit by the hour, and a sheen on the button under the pointer. Delete it for the still design.", "gallery.started.file.anchor-js": "Keeps a dropdown's menu on the screen in browsers without CSS anchor positioning. It does nothing where they have it: delete it once every browser you support does.", "gallery.started.file.shell-js": "Phone navigation for the sidebar and console shells: the slide between pages, Back that reuses history, and focus returned to the section you left. Deletable on its own.", "gallery.started.file.transition-js": "Prevents an error when the browser skips a page transition on column, stage and topbar pages. Load it before the stylesheets, without defer. Sidebar and console pages don't need it.", "gallery.started.file.copy-js": "The snippet's Copy button: it copies the code, says Copied, and stays hidden where the browser has no clipboard. Deletable on its own.", "gallery.started.file.select-js": "field-select's searchable combobox. Inert until a select opts in with data-rst-select, and deletable on its own.", "gallery.started.file.datetime-js": "The date fields' natural-language input. Inert until a field opts in with data-rst-date or data-rst-time, and deletable on its own.", "gallery.started.file.calendar-js": "The month grid that field's calendar button opens. Inert until datetime.js asks it for a panel, and deletable on its own: without it the button falls back to the browser's own picker.", // Getting started: its lead, its sections' bodies and headings, the blurbs for Fiesta's own files, and the total. "gallery.started.lead": "Fiesta is one stylesheet and a handful of optional scripts. Everything works with scripts off; the scripts are enhancements, each its own file, so you load the ones your page uses and nothing else.", "gallery.started.stylesheets.body": "fiesta.css is tokens.css and the Day theme joined, comments stripped, under 25 KiB gzipped. The tokens hold every component's layout and behaviour; the theme paints them. fiesta-plain.css and fiesta-signal.css are the same tokens with the Plain and Signal themes. A page that uses the sidebar or console shell links shell.css as well; nothing else needs it.", "gallery.started.scripts.body": "fiesta.js closes menus, lets a switch's knob be dragged, gives iOS its pressed state and runs the colour-scheme menu; load it first. busy.js, light.js, anchor.js, shell.js, transition.js, copy.js, select.js, datetime.js and calendar.js are each inert until a page uses what they enhance, and each deletable on its own. Load calendar.js last.", "gallery.started.file.bundle": "Tokens and the {theme} theme in one file: every component class, every scale, and the colours, each declared once as a light-dark() pair.", "gallery.started.file.fiesta-js": "The enhancements most pages want: menus that close on an outside click and on Escape, the switch's drag, iOS's pressed state, and the colour-scheme menu. Load it first.", "gallery.started.file.busy-js": "The busy rule: while a form sends, its button shows a spinner for at least 650ms and refuses a second submit, and Back hands it back.", "gallery.started.file.strings": "The words select.js, datetime.js and copy.js put on screen, in {language}. Load the one that matches your page's lang.", "gallery.started.file.sprite": "A sprite with one symbol per icon, for a site that serves its own copy of Fiesta. From the CDN, inline the SVG from icons/<slug>.svg instead.", "gallery.started.total": "A page that links fiesta.css and every script gets {raw} of CSS and JavaScript as written, {gzip} gzipped.", "gallery.started.link.heading": "The one link", "gallery.started.link.body": "Link fiesta.css from the CDN and your markup is styled. /1/ is the newest 1.x; a change that would break existing markup is a new major. Pin the exact version when you need bytes that never move.", "gallery.started.own.heading": "Serving your own copy", "gallery.started.own.body": "Take tokens.css and one theme, or the joined file, from a release and serve them with your site; the files under releases/<version>/ in the repository carry a SHA256SUMS. Link tokens.css first.", "gallery.started.upgrading.body": "A page on /1/ picks up every 1.x release the day it ships; the changelog says what changed. A page pinned to an exact version moves when you change the link, and not before.", // The tokens page: lead, the note on the palette, and a heading per // group of tokens.Group.Key. "gallery.tokens.lead": "The custom properties every component reads. Colour, type family and shape come from the theme, css/themes/{theme}.css. The type scale and the spacing steps are structure, the same in every theme, and come from css/tokens.css.", "gallery.tokens.note": "Light values shown. Every colour is declared once as a light-dark() pair, and the chips follow the scheme menu above. WCAG 2.2 AA floors: 4.5:1 for text, 3:1 for control borders.", "gallery.tokens.group.surfaces-and-lines": "Surfaces and lines", "gallery.tokens.group.text": "Text", "gallery.tokens.group.accent": "Accent", "gallery.tokens.group.status-tones": "Status tones", "gallery.tokens.group.depth": "Depth", "gallery.tokens.group.controls": "Controls", "gallery.tokens.group.type-choices": "Type choices", "gallery.tokens.group.radius": "Radius", "gallery.tokens.group.type-family": "Type family", "gallery.tokens.group.type-scale": "Type scale", "gallery.tokens.group.spacing": "Spacing", // The icons page: its lead, and where the glyphs come from. "gallery.icons.lead": "{total} icons from Lucide, each an inline SVG sized from the text beside it by tokens.css's own .icon rule, which is the size shown here.", "gallery.icons.source": "Where the glyphs come from", "gallery.icons.lucide": "The whole set is at {link}.", "gallery.icons.kebab": "kebab and menu are the pair worth keeping straight: kebab is the three dots that mean more actions on this row, menu the three lines that mean navigation. The shells use menu when they collapse.", // The Icons page: the section on the names, and the body of the section on the source. "gallery.icons.names.heading": "The names are Fiesta's own", "gallery.icons.names.body": "{renamed} of the {total} differ from the name lucide.dev publishes. Where the last line under an icon does not repeat its name, that is one of them. The names stay the same whatever a later icon set is drawn from.", "gallery.icons.source.body": "Lucide, under the ISC licence, copied into the repository rather than fetched. The release carries the inline SVGs and a sprite; the gallery draws each one the way a component does.", } // say returns the English filed under id, with each {name} replaced by // the value following it in args. An id nothing is filed under is a // programming error, not a page to render, so it panics: every id // written in a template is one of the keys above. The pages read // their words through site.say, which is this in the page's locale. func say(id string, args ...string) string { s, ok := text[id] if !ok { panic("gallery: no text for " + id) } return interpolate(s, args) } // interpolate replaces each {name} in s with the value following it in // args. An unmatched placeholder is left on the page rather than // deleted, so a typo shows up as "{shel}" instead of half a sentence // vanishing. func interpolate(s string, args []string) string { for i := 0; i+1 < len(args); i += 2 { s = strings.ReplaceAll(s, "{"+args[i]+"}", args[i+1]) } return s }