Skip to content

LPC Language Patches

John Arena III edited this page Jul 6, 2026 · 1 revision

LCP Language Patches

A language patch (.llp file) localizes the content of a single LCP (Lancer Content Pack) into one language. Anyone can make one for any LCP, official or community, without going through Weblate. A user installs it in COMP/CON's content manager (Content Packs > Install .LCP File, which also accepts .llp), and its translations apply whenever that language is selected.

This is separate from the core book translations in this repo, which ship bundled with the app. A .llp is the runtime-installable path for content that lives outside the app bundle.

Structure

{
  "lang": "fr", // app locale code (see list below)
  "target": "ows-data", // the LCP's item_prefix or name
  "target_version": ">=2.0.0", // semver range the translation was written against, warns only
  "translation_version": "1.0.0",
  "last_update": "2026-06-02",
  "translator": "John Lancer",
  "website": "https://massifpress.com",
  "data": {
    // flat "<item id>.<field>": "translation"
    "mf_gilgamesh.name": "Gilgamesh",
    "mf_gilgamesh.description": "...",
    "mf_gilgamesh.trait_reactor_burst.name": "...",
  },
}

Only lang and data are required. target / target_version are shown in the content manager and used for update warnings; they do not affect which strings get translated. Lookup is purely by item id, so a patch applies to any installed item whose id matches a key, whatever LCP it came from.

data keys

Keys are <item id>.<field> (dot notation for nested items). The id is the raw id value as written in the LCP's JSON (e.g. mf_gilgamesh), not the item_prefix.

Items must have an explicit id in the LCP JSON to be translatable. Items that rely on the app generating an id for them are skipped by the extractor and cannot be patched.

Only fields the app actually renders through its content resolver can be translated. Rather than guess them, generate the exact key set from the LCP itself (see below). The translatable fields are name, description, terse, detail, effect, trigger, and the paired active_* / passive_* and weapon on_hit / on_crit / on_attack / on_miss variants, on the item and on its nested actions, traits, ranks, profiles, deployables, etc. A key not in the generated set will be ignored.

Creation

Requirements

Directions

Extract an English base from an unpacked LCP (a directory with lib/*.json or the collection JSONs directly):

node scripts/build-llp.mjs extract path/to/your-lcp --out your-lcp.en.llp

This writes every translatable key with its English source string. Copy the file, change lang to your target code, then translate the values.

Or, wrap an already-translated flat map (for example a Weblate content/<component>/<lang>.json from this repo):

node scripts/build-llp.mjs pack content/lancer-data/zh_Hans.json --target lancer-data --lang zh_Hans

pack normalizes Weblate subtags to the app's short codes automatically (zh_Hans to zh, pt_BR to pt).

App locale codes

Use these in lang (hand-authored patches must use the short code, not a Weblate subtag):

en es de fr it ru ja ko zh ar pt hi

Translation guidelines

The rules in CONTRIBUTING.md about placeholders, markup (<br>, <b>, mdi-, cc:), untranslatable brand/manufacturer names, and tone apply to .llp values too.

LCP/LLP bundling

An LCP author can bundle .llp files directly into the .lcp zip so users get the pack and its translations in one install:

node scripts/build-llp.mjs bundle mypack.lcp mypack.fr.llp mypack.de.llp

When a user installs that .lcp, COMP/CON auto-detects the bundled patches and stages them alongside the pack. They can unstage any before installing.

Clone this wiki locally