Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion pdf2zh_next/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
)
from pdf2zh_next.config.translate_engine_model import TRANSLATION_ENGINE_METADATA
from pdf2zh_next.config.translate_engine_model import TRANSLATION_ENGINE_METADATA_MAP
from pdf2zh_next.const import DEFAULT_CONFIG_DIR
from pdf2zh_next.const import DEFAULT_CONFIG_FILE
from pdf2zh_next.high_level import TranslationError
from pdf2zh_next.high_level import do_translate_async_stream
Expand Down Expand Up @@ -1231,7 +1232,14 @@ def save_config(
assets_dir = current_dir / "assets"
logo_path = assets_dir / "powered_by_siliconflow_light.png"
translation_file_path = current_dir / "gui_translation.yaml"
config_fake_pdf_path = assets_dir / "config.fake.pdf"
config_fake_pdf_path = DEFAULT_CONFIG_DIR / "config.fake.pdf"

if not config_fake_pdf_path.exists():
with config_fake_pdf_path.open("w") as f:
f.write("This is a fake PDF file for configuration saving.")
f.flush()


tech_details_string = f"""
<summary>Technical details</summary>
- ⭐ Star at GitHub: <a href="https://github.com/PDFMathTranslate/PDFMathTranslate-next">PDFMathTranslate/PDFMathTranslate-next</a><br>
Expand Down
Loading