One language setting; localized in-memory speech per language
This commit is contained in:
@@ -97,7 +97,7 @@ def test_bank_sound_apply_revert_in_editor(win, tmp_path):
|
||||
w, root, originals = win
|
||||
before = files(root)
|
||||
w.cmb_arch.setCurrentText("BANK")
|
||||
assert w.proxy.rowCount() == 6
|
||||
assert w.proxy.rowCount() == 7 # 6 neutral + the INT copy of a localized line
|
||||
assert w.select_name("CHR_SynthFoley_1")
|
||||
ed = w.editor
|
||||
assert "bank CHR_SynthFoley (2 copies)" in ed.meta.text()
|
||||
@@ -116,7 +116,7 @@ def test_subtitles_tab_edit_and_link(win):
|
||||
before = files(root)
|
||||
w.tabs.setCurrentWidget(w.subs)
|
||||
p = w.subs
|
||||
assert p.lang == "INT" and p.model.rowCount() == 2
|
||||
assert p.lang == "INT" and p.model.rowCount() == 3
|
||||
p.search.setText("scanner")
|
||||
p._filter()
|
||||
assert p.proxy.rowCount() == 1
|
||||
@@ -141,6 +141,22 @@ def test_subtitles_tab_edit_and_link(win):
|
||||
assert files(root) == before and not w.ws.texts.records()
|
||||
|
||||
|
||||
def test_one_language_for_everything(win):
|
||||
w, root, _ = win
|
||||
assert w.language == "INT" and w.cmb_lang.currentText() == "INT" and not w.lbl_voices.text()
|
||||
assert {"INT", "ITA", "RUS"} <= {w.cmb_lang.itemText(i) for i in range(w.cmb_lang.count())}
|
||||
w.load_game(root, "RUS") # no Russian voices: INT speech, RUS texts
|
||||
assert w.language == "RUS" and "voices: INT" in w.lbl_voices.text()
|
||||
assert "INT" in w.ws.catalog.archives
|
||||
w.tabs.setCurrentWidget(w.subs)
|
||||
assert w.subs.lang == "RUS" and "RUS" in w.subs.lbl_lang.text()
|
||||
w.tabs.setCurrentIndex(0)
|
||||
w.select_name("CHR_RadioScanner_2")
|
||||
assert [e.text() for e in w.editor.subtitle.edits] == ["Строка два"]
|
||||
w.tabs.setCurrentWidget(w.menu)
|
||||
assert w.menu.lang is None and w.menu.model.rowCount() == 0 # no RUS menu files in the synthetic game
|
||||
|
||||
|
||||
def test_subtitles_find_replace(win):
|
||||
w, root, _ = win
|
||||
before = files(root)
|
||||
|
||||
Reference in New Issue
Block a user