feat: browser access (allowed_origins, CORS with Private Network Access), job cancel, Tomie/Unity adapters, benchmark
Includes earlier uncommitted work: Tomie and Unity adapters, benchmark, structured output, call metrics. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
13492929c6
commit
f49ee90477
32 files changed
+2799
-51
No files matched your search
@@ -7,23 +7,7 @@ import argparse
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def parse_dictionary(text):
|
||||
result = []
|
||||
seen = set()
|
||||
for line_number, line in enumerate(text.splitlines(), 1):
|
||||
if not line.strip() or line.lstrip().startswith((";", "#", "//")):
|
||||
continue
|
||||
key, separator, value = line.partition(":")
|
||||
if not separator or not key.strip() or not value.strip():
|
||||
continue
|
||||
key = key.strip()
|
||||
if key in seen:
|
||||
raise ValueError(f"Duplicate dictionary key at line {line_number}: {key}")
|
||||
seen.add(key)
|
||||
result.append({"id": key, "text": value.lstrip(), "line": line_number})
|
||||
return result
|
||||
from local_translator.naninovel import parse_dictionary
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -9,9 +9,28 @@
|
||||
"AUTO": "АВТО",
|
||||
"HIDE": "СКРЫТЬ",
|
||||
"LOG": "ИСТОРИЯ",
|
||||
"Q.LOAD": "БЫСТРАЯ ЗАГРУЗКА",
|
||||
"Q.SAVE": "БЫСТРОЕ СОХРАНЕНИЕ",
|
||||
"TITLE": "ГЛАВНОЕ МЕНЮ",
|
||||
"Q.LOAD": "Б.ЗАГР.",
|
||||
"Q.SAVE": "Б.СОХР.",
|
||||
"TITLE": "МЕНЮ",
|
||||
"NEW GAME": "НОВАЯ ИГРА",
|
||||
"CONTINUE": "ПРОДОЛЖИТЬ",
|
||||
"QUIT": "ВЫХОД",
|
||||
"EXIT": "ВЫХОД",
|
||||
"CREDIT": "АВТОРЫ",
|
||||
"CREDITS": "АВТОРЫ",
|
||||
"NEW": "НОВАЯ ИГРА",
|
||||
"RETURN": "НАЗАД",
|
||||
"CLOSE": "ЗАКРЫТЬ",
|
||||
"GALLERY": "ГАЛЕРЕЯ",
|
||||
"CONTENT\nOPTION": "НАСТРОЙКИ\nКОНТЕНТА",
|
||||
"Game Guide\nWalkthrough": "РУКОВОДСТВО\nПРОХОЖДЕНИЕ",
|
||||
"Achievements": "Достижения",
|
||||
"Very Low": "Очень низкое",
|
||||
"Low": "Низкое",
|
||||
"Medium": "Среднее",
|
||||
"High": "Высокое",
|
||||
"Very High": "Очень высокое",
|
||||
"Read Only": "Только прочитанное",
|
||||
"SAVE": "СОХРАНИТЬ",
|
||||
"LOAD": "ЗАГРУЗИТЬ",
|
||||
"SETTINGS": "НАСТРОЙКИ",
|
||||
|
||||
Reference in new issue
Block a user