Standard: Multilingual strings
Applies to
- Every sentence a person sees:
- the page (HTML and JS for the yard and the overlay)
- error and status messages the backend returns to the page
- window titles and the tray menu
- file dialog titles
- Supported languages: Korean (
ko), English (en), Japanese (ja), Simplified Chinese (zh-hans).
Not covered:
- Sentences the app's CLI mode writes for the terminal and coding agents (usage, errors, MCP tool descriptions). Always in English.
- Template sentences of prompts sent to the AI (
chat/prompt.rs). Written in English; the prompt sets the reply language. - Words sent by an agent or a person (
say, AI replies). Shown as is, untranslated. - Test code, comments and developer docs (
docs/). Written in English. Dated design records and decision records stay as they are.
Rules
Tables
- Page strings live in
src/core/strings/<language>.js, backend strings insrc-tauri/src/i18n/<language>.rs. - The Korean file is the reference. Other languages have the same keys in the same order.
- No other module or markup contains Korean sentences.
- Steps for adding a language: Add a language.
Keys and placeholders
- Every language has the same keys.
- The sentences for one key have the same placeholders (
{name}). - Lists contain nonempty localized lines with the same placeholders.
- Do not copy English sentences into another table so a missing translation passes the structural checks.
- Review meaning and terminology in every language.
- Every key the code calls (
t('…'),list('…'),data-i18n,data-title,i18n::t("…")) exists in the table. - A missing key shows its own name on screen.
- Key names use lowercase and dots, area first (
invite.open_folder,error.pet_missing). - Reuse the key when the same sentence appears again.
Tone
| Language | UI tone | A friend's own lines |
|---|---|---|
| Korean | Friendly, polite style | Informal speech |
| English | Short sentences, only the first letter capitalized | Contractions |
| Japanese | Page strings in the です and ます style | Casual speech |
| Simplified Chinese | Plain, friendly 你 (never 您), full-width punctuation | Casual speech |
- A friend's own lines are what it says: speech bubbles, lines it says unprompted, at a new closeness level or about an event.
- They are casual in every language.
- Everything else follows its language's UI tone.
- The English tables (
en.js,en.rs) use American spelling (color, favorite).
Korean particles
- In Korean, the particle after a name is attached to the placeholder:
{name:<consonant-form>/<vowel-form>}. - The app fills in the form that matches whether the name ends in a final consonant.
Agent status
- Coding agents send their status as codes (
@thinking,@tool Bash,@done). - The app turns them into
agent.*keys. - Add a new status's code and key together.
Terms
- Keep the terms below consistent.
- Each term's localized spelling is its key in each language table.
- Use those keys as the glossary; do not add new synonyms.
- A named Mini pet describes its artwork, not a window mode.
- Appearance changes never select a relationship.
| Term | Meaning |
|---|---|
| Pet | A character file (pet.json and the sprite sheet) |
| Friend | Someone invited into the yard |
| Import | Bringing in pet files |
| Invite | Adding a friend to the yard from a pet |
| AI connection | The AI a friend uses to chat (Claude Code, Codex, Ollama, OpenAI-compatible) |
| Agent integration | Hook and MCP settings for coding agents |
| Yard, Always on top, desktop | The resizable main window, its independent pin setting, the desktop overlay |
| Closeness | How close a friend has grown to the person, in five levels (Just met, At ease, Warm, Very close, Dearest) |
| Relationship | Who a friend is to the person (friend, partner, mentor, younger sibling), which sets how it talks |
| Tag | The chasing game |
| Send away | Taking a friend out of the yard |
| Type | The pet filter on the Invite tab (invite.kind_label) |
| Rare | The album's badge (catch.rare) for what seldom comes, comes only during an event, or is an uncommon dig find; the dig's 24-hour rule uses the same word |
Examples
The page:
js
import { t } from '../core/i18n.js';
// The Korean table supplies the particle form along with its localized sentence.
await confirmAction({ title: t('friend.send_away_confirm', { name: pet.name }) }); // "Send Frieren away from the yard?"html
<button id="update-button" data-i18n="settings.update_check"></button>
<input data-i18n-placeholder="chat.placeholder">The backend:
rust
return Err(i18n::tr("error.pets_limit", &[("limit", &LIMIT.to_string())]));Recommendations
Follow these when you can. When you cannot, say why in the PR.
- Spell out development terms (config, provider, sprite) in sentences people see.
- Error messages say what failed and what the person can do (“Check your internet connection”).
Exceptions
| When | How |
|---|---|
Code that handles Korean itself, such as particle handling (src/core/words.js) | Allowed. Already in the guard test's exception list |
| Proper nouns and language names (the language choices in Settings) | Allowed. Not translated |
| You cannot fill every language at once | Do not leave them empty or fill them with English; split the PR. Tests block empty strings |
Rationale
- Strings scattered through the code cannot be translated, and the terms drift.
- Two tables let tests catch missing and mismatched entries.
- Agent hooks run in a different process from the app and do not know the app's language, so they send codes.
- Based on: decision “Strings live in two per-language tables, one for the page and one for the backend, and agent status is sent as codes”
Automated checks
tests/i18n.test.mjs:- matching keys, placeholders and nonempty list lines across every language
- English-only current developer guidance
- Korean in page code and markup, comments included (only the tables
strings/ko.jsandstrings/names.js(each language's own name),words.jsandi18n.jsmay show it) - the keys the page calls exist
- every page key is used: named in quotes in
src/, or in a family the page builds at run time (BUILT)
- Rust
i18n::tests:- matching keys and placeholders across every language
- Korean in every
src/module, comments included (test modules may use Korean input data) - the keys the backend calls exist
- agent code conversion
Change history
- 2026-10-01 First version
- 2026-10-06 Simplified Chinese added; the guard tests also look at comments
- 2026-10-10 Friends' own lines are casual in every language; American spelling in English; closeness, relationship, tag, send away and Type added to the terms
- 2026-11-09 A page key that nothing names fails the tests