mirror of
https://github.com/Dasemu/vnpipe.git
synced 2026-11-26 23:36:32 +00:00
feat(translate): map a public-domain translation onto the game's speeches
Add the translate {fetch,build,status} stage: parse a Project Gutenberg
ebook into speeches and directions, align them with the game's speeches by
speaker sequence, group split or merged speeches, and accept verbatim
overrides. Output: data/translations/<code>.json.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
70a0ad577b
commit
33c8b32b69
9 files changed
+1093
-2
No files matched your search
+8
-1
@@ -7,7 +7,7 @@ A work is a directory containing `work.toml`, plus the folders the pipeline fill
|
||||
| Table | Keys |
|
||||
|---|---|
|
||||
| `[work]` | `id`, `title`, `subtitle`, `author`, `translator`, `language` (`es`/`en`: About, menu and credits texts), `lyric_voice` (cast id for verse nobody speaks; default `poet_voice`), `end_text`, `menu_bg` (legacy alias of `[ui].main_menu_bg`). |
|
||||
| `[ui]` | `main_menu_bg` (background asset id of the main menu and, darker, the game menu; default: `[work].menu_bg`, else the first staged `bg`); `language` (Ren'Py language name, e.g. `spanish`, forced with `config.language` so an old persistent preference cannot switch the menus back to English; vnpipe ships `renpy_templates/tl/<language>/` (Ren'Py's common strings and every template screen string; only `spanish` so far) and copies `<work>/tl/<language>/*.rpy` on top, a work file replacing a shipped file with the same name). |
|
||||
| `[ui]` | `main_menu_bg` (background asset id of the main menu and, darker, the game menu; default: `[work].menu_bg`, else the first staged `bg`); `language` (Ren'Py language name of the work's own language, e.g. `spanish`; it is the default and `config.language` follows only the player's explicit choice, so an old persistent preference cannot switch the menus back to English; `language_label` (its name in the language choice, default from `[work].language`); vnpipe ships `renpy_templates/tl/<language>/` (Ren'Py's common strings and every template screen string; only `spanish` so far) and copies `<work>/tl/<language>/*.rpy` on top, a work file replacing a shipped file with the same name). |
|
||||
| `[source]` | `gutenberg_id`, `url`, `raw_file` (cache path, relative to the work root, gitignored). |
|
||||
| `[scope]` | `start_marker`, `end_marker` (whole stripped lines), `end_occurrence` (1-based, searched after the start; the end marker itself is excluded). |
|
||||
| `[speakers]` | Speaker heading as printed (upper case, without its italic note) → cast id. Several headings may share one id (anonymous crowd speakers). A key with punctuation or markup (`"CORO, TUTTI"`) is matched against the whole printed line first. An unknown speaker is a parse error. |
|
||||
@@ -127,3 +127,10 @@ heading = "Straße (I)" # heading line in the source text, s
|
||||
Voice data lives in the work: `voice/asr/NN.json` (committed ASR cache), `voice/map.json`,
|
||||
`voice/report/<scene>.txt`, `voice/clips/*.ogg`. `vnpipe renpy` copies the clips to
|
||||
`game/voice/` and credits them when `[voice].credits` is set.
|
||||
|
||||
### Translations
|
||||
|
||||
Optional `[translations.<code>]` tables: other languages from a published translation of the
|
||||
text (verbatim, never machine-translated). Configuration, mapping rules and the Ren'Py output
|
||||
are in [translations.md](translations.md); the mapping is committed as
|
||||
`data/translations/<code>.json`.
|
||||
Reference in new issue
Block a user