Repository navigation
docs: add a fork guide for target languages, prompts and backends - #44
Merged
Merged
Conversation
Adding a translation target language is an entry in about eight tables, and
every one of them is a `dict.get()` with a fallback — so a fork that registers
the code and stops gets a working picker and silently worse output, with
nothing logged. FORKING.md documents each table in the order it bites, using
Czech as the worked example because the repo is already half-wired for it
(spell_checker and _LATIN_SCRIPT_TARGETS know `cs`; a cs_CZ UI ships), which is
what makes the silent defaults visible:
get_encodings_for_locale("cs") -> ('utf-8', 'windows-1252') wrong
get_encodings_for_locale("czech") -> ('utf-8', 'windows-1250') the entry
default_style_rule("cs") -> "...polished cs..." bare code
Also covered: the Prompt Editor's three layers and how to_system_prompt()
assembles them (including that rule 3(a) ships ~30 Ukrainian bracket-token
examples to *every* target, which a non-Ukrainian fork should swap); the worker
signal interface for a new backend; themes, plugin field types and new
settings; and which tests catch a language change — notably that
test_download_lang_dicts.py derives its coverage from the checker modules, so a
word-list checker without a downloader entry fails the suite.
Documentation of the app's own UI locales stays in TRANSLATING.md. The two were
easy to confuse, so both files now open by naming the distinction, and the
ambiguous "Adding a new language" heading there is now "Adding a new interface
language" (in-page anchor updated with it).
docs/forking.rst follows the contributing.rst convention: summarise and link
out rather than keep a second copy that drifts. Sphinx builds clean under -W.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new
FORKING.mdfor people who fork this editor to add their own target language, their own translation voice, or their own quality checks — and which of those need a fork at all.Why
Adding a translation target language touches about eight tables, and every one of them is a
dict.get()with a fallback. A fork that registers the code and stops gets a working picker and silently worse output, with nothing logged:Czech is the worked example precisely because the repo is already half-wired for it (
spell_checker.LANG_TO_DICTandquality_checker._LATIN_SCRIPT_TARGETSknowcs; acs_CZUI translation ships), so it shows both what you add and what quietly defaults to something wrong.Contents
BSE_CONFIG_DIR_LANG_DISPLAY,_TARGET_STYLE,ENCODING_PAIRS,_GENDERED_TARGETS, the four-file word-list procedure, spell check, QC wiring, optional language-specific checkers, font/width verification, and a 10-row checklistto_system_prompt()and how to add aPROMPT_DIALSentry_FIELD_DEFS, string categories, lore RAG, new settingsTwo findings worth flagging on their own:
[Lie]→[Збрехати], …) to every target — ask for German and the model still sees a wall of Cyrillic. Documented so a fork knows to swap them._LANG_DISPLAY, notSUPPORTED_LANGUAGES, so a language added only to the latter cannot be given a custom Rule 1 through the UI.Interface language vs translation target
These were easy to confuse, so both files now open by naming the distinction, and
TRANSLATING.md's ambiguous "Adding a new language" heading is now "Adding a new interface language" (its in-page anchor updated to match).Verification
Every factual claim was checked against the live modules with a 32-assertion script rather than written from memory — symbol names, fallback values, which sets gate which check, and the
get_prompt_customizations() == ({}, "", {})contract.docs/forking.rstfollows thecontributing.rstconvention (summarise and link out rather than keep a second copy that drifts); Sphinx builds clean under-W.No Python changed.
🤖 Generated with Claude Code