Source for clipy-app.com, built with Eleventy, Nunjucks, and JSON. All languages share one page template.
Use Node.js 24 (see .nvmrc), then run:
npm ci
npm run devOpen the local URL printed by Eleventy. Use /en/ or /ja/ to preview a
specific language. The root page / selects a supported language based on the
browser's preferences and displays English when JavaScript is disabled.
Before opening a pull request, run:
npm run buildThis checks translations and builds the site into _site/. Generated files
should not be committed.
To update a translation, edit its JSON file in
src/_data/locales/.
To add a language:
- Copy
src/_data/locales/en.jsonto a file named with the language tag, such assrc/_data/locales/fr.json. - Translate the text, including image descriptions, and update
ogLocale(for example,fr_FR). Keep the same keys and JSON structure as English. Write plain text rather than HTML. - Preview the new page at its language path, such as
/fr/, and runnpm run buildbefore opening a pull request.
New languages are discovered automatically; no template or route changes are needed. Screenshots use the shared English images unless a localized version is provided, so screenshot contributions are optional.
Keep placeholders such as {minimumMacOS}, {issues}, {pullRequests}, and
{author} intact. They insert shared values or links and can be moved within
a sentence to match the language's grammar. Let text wrap naturally rather
than adding manual line breaks or language-specific widths and margins.
To check translations without building the site, run:
npm run i18n:checkAdd images under src/img/screenshots/<language>/, then add their public paths
to src/_data/screenshots.json. For example, add
a fr entry to clipboardHistory while keeping the existing language entries:
{
"clipboardHistory": {
"en": "/img/common/clipboard-history.png",
"ja": "/img/screenshots/ja/clipboard-history.png",
"fr": "/img/screenshots/fr/clipboard-history.png"
}
}Each image without an override uses its en path. Main slides and thumbnails
use the same image; no separate thumbnail files are needed.
