Docs navigation

Styleguide

The styleguide section of loccy.yaml holds the hand-authored rules every AI translation is written against. It sits at the top level, alongside modules, and is sent as context with each AI action. Every field is optional.

#Full example

Every field, and every shape a field's value can take, appears once here.

styleguide:
  product: |
    Whisker Café: staff app for a real cat café.
    Used by baristas mid-shift, on a phone, one hand free.
  voice: |
    Warm, lightly cheeky, cat-first. Address the user informally.
    No marketing filler, no fake urgency. Exclamation marks only for genuine surprise.
  mechanics: |
    Buttons and menu labels max ~25 characters.
    No emoji.
  localeRules:
    en: |
      Sentence case for headings and buttons ("Book now" instead of "Book Now").
      Contractions are fine.
    de: |
      Avoid anglicisms when a natural German word exists.
      German runs long: compress rather than truncate.
    de-CH:
      extends: de
      style: |
        Replace ß with ss (schliessen).
        Use Swiss guillemets «…».
  doNotTranslate:
    - term: Whisker Café
      definition: Café brand name
      caseSensitive: true
    - term: Mister Mittens
  glossary:
    - definition: A cat that lives at the café
      terms:
        en: Resident
        de: Bewohner
    - definition: One staff member's working block, opening to closing handover
      terms:
        en: Shift
        de: Schicht
    - definition: A booked seating slot (the booking itself, not the act of reserving)
      terms:
        en: Reservation
        de: Reservierung
        de-CH:
          preferred: Reservation
          deprecated: [Buchung]
  keys: |
    Group keys by feature, dot-separated ("checkout.button.submit").

npx loccy init and Loccy: Create Config File write exactly this block, commented out, as a scaffold to adapt.

#Fields

FieldWhat it describes
productWhat the product is and who uses it
voiceHow the product speaks: personality, register, how the user is addressed
mechanicsFormatting that holds in every locale: casing, punctuation, length limits, markup
localeRulesWhat each language decides for itself, keyed by locale code
doNotTranslateTerms that stay verbatim everywhere: brand names, plan names
glossaryTerms with one approved translation per locale
keysHow keypaths are named and organized