feat: _() strings and screen texts become translatable strings; search looks in all states; stutter hint
show text _("...") and literal screen texts are listed in Names and menu; typing in search switches the filter from To do to All; the translator is told how stutters are spelled.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
262db2687e
commit
cc71050362
5 files changed
+73
-1
No files matched your search
@@ -309,6 +309,8 @@ function EntriesView({ versionId, lang, tab, ov, onStats, session, fills, fillTi
|
||||
const t = setTimeout(() => {
|
||||
setQ(query);
|
||||
setPage(0);
|
||||
// looking for a phrase means looking everywhere, not only among what still needs work
|
||||
if (query.trim()) setState((current) => (current === "todo" ? "all" : current));
|
||||
}, 300);
|
||||
return () => clearTimeout(t);
|
||||
}, [query]);
|
||||
|
||||
@@ -44,6 +44,11 @@ function loadPrefs(): Prefs {
|
||||
}
|
||||
}
|
||||
|
||||
/** Visual novels spell stutters with hyphens and repeated letters; models misread the broken word. */
|
||||
const STUTTER_HINT = "The source may contain stuttering written with hyphens and repeated letters, "
|
||||
+ "like \"c-cer-cervix\" or \"m-my\". First work out the intended word, translate that word correctly "
|
||||
+ "and keep the stutter in the translation (for example \"ш-шейка матки\"). Never translate the broken spelling literally.";
|
||||
|
||||
export type Connection = Link | "idle" | "checking";
|
||||
|
||||
export interface Session {
|
||||
@@ -151,7 +156,7 @@ export function useTranslatorSession(versionId: string | undefined, version: Ver
|
||||
context: [`Game: ${title}.`, prefs.about && g?.description,
|
||||
prefs.about && g?.tags?.length ? `Genres and tags: ${g.tags.join(", ")}.` : ""]
|
||||
.filter(Boolean).join(" ").slice(0, 4000),
|
||||
instructions: instructions.trim(),
|
||||
instructions: [instructions.trim(), STUTTER_HINT].filter(Boolean).join(" "),
|
||||
glossary: Object.fromEntries((meta.glossary ?? []).filter((t) => t.src.trim() && t.t.trim())
|
||||
.map((t) => [t.src.trim(), t.t.trim()])),
|
||||
provider: prefs.provider || "lmstudio",
|
||||
|
||||
Reference in new issue
Block a user