mirror of
https://github.com/Dasemu/faust-vn.git
synced 2026-11-26 23:36:25 +00:00
chore(vn): regenerate with the English translation and language choice
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1bfe0e0022
commit
a35d8e842c
11 files changed
+11943
-2348
No files matched your search
@@ -0,0 +1,26 @@
|
||||
## Languages: the play's own text, plus every translation built by `vnpipe translate`
|
||||
## (game/tl/<language>/). The player picks one in Preferences, or at first launch; the
|
||||
## choice is kept in `persistent.vn_language`. `config.language` is set from that choice
|
||||
## only, so a language preference left by an older build never overrides it, and loading a
|
||||
## save keeps the chosen language. Static except for the substituted list.
|
||||
|
||||
default persistent.vn_language = None
|
||||
|
||||
## (Ren'Py language, label in that language) pairs; the first is the default.
|
||||
define vn_languages = [('spanish', 'Español'), ('english', 'English')]
|
||||
|
||||
init 1 python:
|
||||
|
||||
def vn_known_language(language):
|
||||
return any(lang == language for lang, _label in vn_languages)
|
||||
|
||||
def vn_set_language(language):
|
||||
"""Remember the player's choice; Language(language) then switches to it."""
|
||||
persistent.vn_language = language
|
||||
config.language = language
|
||||
|
||||
if vn_known_language(persistent.vn_language):
|
||||
config.language = persistent.vn_language
|
||||
else:
|
||||
config.language = vn_languages[0][0]
|
||||
config.default_language = vn_languages[0][0]
|
||||
Reference in new issue
Block a user