contextweave 2.6.1__tar.gz → 2.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {contextweave-2.6.1 → contextweave-2.7.0}/PKG-INFO +1 -1
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/runtime.py +5 -7
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/app_setup.py +7 -1
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/projects.py +14 -5
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/cli/config_file.py +8 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/config.py +7 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub.py +1 -1
- contextweave-2.6.1/context_aware_translation/ui/constants.py → contextweave-2.7.0/context_aware_translation/languages.py +15 -21
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/glossary_translator.py +9 -1
- contextweave-2.7.0/context_aware_translation/llm/language_pair_prompts/__init__.py +63 -0
- contextweave-2.7.0/context_aware_translation/llm/language_pair_prompts/japanese_to_simplified_chinese.py +16 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/translator.py +8 -0
- contextweave-2.7.0/context_aware_translation/ui/constants.py +26 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/app_setup_view.py +2 -2
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/workflow_profile_editor.py +2 -2
- {contextweave-2.6.1 → contextweave-2.7.0}/pyproject.toml +1 -1
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/test_composition.py +23 -9
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/cli/test_cli.py +19 -2
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/config/test_endpoint_profiles.py +31 -15
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/integration/test_business_logic.py +1 -1
- contextweave-2.7.0/tests/llm/test_language_pair_prompts.py +90 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/test_book_manager.py +19 -19
- contextweave-2.7.0/tests/test_languages.py +34 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_app_setup_view.py +6 -5
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_library_view.py +7 -8
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_workflow_profile_editor.py +1 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_session.py +1 -1
- {contextweave-2.6.1 → contextweave-2.7.0}/.github/workflows/release.yml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/.gitignore +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/LICENSE +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/Makefile +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/README.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/README_ZH.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/cat-ui.spec +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/files/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/files/glossary_io.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/application_event_bridge.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/task_engine.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/base_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/batch_task_overlap_guard.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/batch_translation_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/chunk_retranslation_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/export_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/glossary_export_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/glossary_extraction_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/glossary_review_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/glossary_translation_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/image_reembedding_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/import_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/ocr_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/operation_tracker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/translate_and_export_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/translation_manga_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/adapters/qt/workers/translation_text_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/app_identity.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/composition.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/contracts/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/contracts/app_setup.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/contracts/common.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/contracts/document.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/contracts/project_setup.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/contracts/projects.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/contracts/queue.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/contracts/terms.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/contracts/work.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/errors.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/events.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/_export_support.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/document.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/project_setup.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/queue.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/terms.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/work.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/cli/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/cli/galgame_skill.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/cli/main.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/cli/output.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/cli/runtime.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/cli/wait.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/cancellation.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/context_extractor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/context_manager.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/galgame_document_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/manga_document_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/models.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/progress.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/term_memory.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/term_memory_builder.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/core/translation_strategies.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/base.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/content/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/content/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/content/ocr_content.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/content/ocr_items.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_container.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/container_model.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/container_patch.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/container_reader.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/container_shared.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/container_writer.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/inline_markers.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/nav_ops.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/slot_lines.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_support/xml_utils.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/epub_xhtml_utils.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/galgame.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/manga.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/manga_alignment.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/manga_reembed_planner.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/pdf.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/scanned_book.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/subtitle.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/documents/text.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/batch_jobs/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/batch_jobs/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/batch_jobs/base.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/batch_jobs/gemini_gateway.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/client.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/epub_ocr.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/extractor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/image_backend_base.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/image_backends/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/image_backends/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/image_backends/gemini_backend.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/image_backends/openai_backend.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/image_backends/qwen_backend.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/image_generator.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/language_detector.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/manga_ocr.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/manga_translator.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/ocr.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/reviewer.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/session_trace.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/summarizor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/token_tracker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/translation_strategies.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/hk2s.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/jp2s.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/s2hk.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/s2t.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/s2tw.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/s2twp.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/t2hk.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/t2s.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/t2tw.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/tw2s.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/config/tw2sp.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/HKVariants.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/HKVariantsPhrases.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/HKVariantsRev.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/HKVariantsRevPhrases.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/JPVariants.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/JPVariantsRev.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/STCharacters.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/STPhrases.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/TSCharacters.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/TSPhrases.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/TWPhrases.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/TWPhrasesRev.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/TWVariants.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/TWVariantsRev.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/opencc/dictionary/TWVariantsRevPhrases.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/tokenizers/deepseek-v3/special_tokens_map.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/tokenizers/deepseek-v3/tokenizer.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/resources/tokenizers/deepseek-v3/tokenizer_config.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/stdio.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/library/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/library/book_manager.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/models/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/models/book.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/models/config_profile.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/models/endpoint_profile.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/repositories/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/repositories/document_repository.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/repositories/llm_batch_store.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/repositories/task_store.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/repositories/term_repository.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/repositories/translation_batch_task_store.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/schema/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/schema/book_db.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/schema/registry_db.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/storage/sqlite_locking.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/chrome_sizing.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/app_settings_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/document_images_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/document_ocr_tab.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/document_translation_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/document_workspace_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/library_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/project_settings_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/queue_drawer_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/terms_table_widget.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/terms_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/work_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/i18n.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/json_utils.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/main.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/main_window.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/BootstrapProbe.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/app/AppShellChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/dialogs/app_settings/AppSettingsDialogChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/dialogs/app_settings/AppSettingsPane.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/dialogs/project_settings/ProjectSettingsDialogChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/dialogs/project_settings/ProjectSettingsPane.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/document/DocumentShellChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/document/export/DocumentExportPaneChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/document/images/DocumentImagesPaneChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/document/ocr/DocumentOCRPaneChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/document/translation/DocumentTranslationPaneChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/project/ProjectShellChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/project/terms/TermsPaneChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/project/work_home/WorkHomeChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml/queue/QueueShellChrome.qml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/qml_resources.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/resources/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/resources/styles.qss +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/shell_hosts/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/shell_hosts/app_settings_dialog_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/shell_hosts/app_shell_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/shell_hosts/document_shell_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/shell_hosts/hybrid.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/shell_hosts/project_settings_dialog_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/shell_hosts/project_shell_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/shell_hosts/queue_shell_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/sleep_inhibitor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/startup.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/tips.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/translations/zh_CN.qm +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/translations/zh_CN.ts +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/app_settings_dialog.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/app_settings_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/app_shell.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/base.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/document_export_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/document_images_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/document_ocr_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/document_shell.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/document_translation_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/project_settings_dialog.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/project_settings_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/project_shell.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/queue_shell.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/router.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/terms_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/viewmodels/work_home.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/widgets/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/widgets/hybrid_controls.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/widgets/image_viewer.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/widgets/progress_widget.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/widgets/table_support.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/window_controllers.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/chunking.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/cjk_normalize.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/compression_marker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/file_utils.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/hard_wrap.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/hashing.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/image_utils.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/llm_json_cleaner.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/markdown_escape.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/pandoc_export.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/semantic_chunker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/string_similarity.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/utils/symbol_check.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/bootstrap.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/image_fetcher.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/ops/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/ops/bootstrap_ops.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/ops/export_ops.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/ops/glossary_ops.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/ops/import_ops.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/ops/import_support.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/ops/ocr_ops.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/ops/translation_ops.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/runtime.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/session.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/task_runtime.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/claims.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/engine_core.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/exceptions.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/execution/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/execution/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/execution/batch_translation_executor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/execution/batch_translation_ops.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/glossary_preflight.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/base.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/batch_translation.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/chunk_retranslation.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/glossary_export.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/glossary_extraction.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/glossary_review.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/glossary_translation.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/image_reembedding.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/ocr.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/translate_and_export.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/translation_manga.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/handlers/translation_text.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/models.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/translate_and_export_support.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/workflow/tasks/worker_deps.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/demo/The Count of Monte Cristo.epub +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/demo//345/237/272/347/235/243/345/261/261/344/274/257/347/210/265.epub" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/.nojekyll +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/examples/contextweave-cli.yaml +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/index.html +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/project-terms-manual-entry-ux.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN/API/351/205/215/347/275/256.png" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN/latest_new_project_dialog.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN/latest_project_work_overview.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN/latest_projects_overview.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN/latest_setup_wizard_provider_selection.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN/latest_setup_wizard_workflow_profile_review.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN/latest_terms_overview.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN//345/257/274/345/205/245.png" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN//345/257/274/345/207/272.png" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN//346/226/260/351/241/271/347/233/256.png" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN//346/234/257/350/257/255.png" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN//347/277/273/350/257/221.png" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN//350/256/276/347/275/256.png" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN//350/256/276/347/275/256/345/220/221/345/257/274.png" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/CN//350/256/276/347/275/256/347/273/223/346/235/237.png" +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/APISetup.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/Export.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/Import.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/InitialSetup.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/Language.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/NewProject.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/Terms.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/Translate.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/TranslateAndExport.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/Wizard.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/latest_new_project_dialog.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/latest_project_work_overview.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/latest_projects_overview.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/latest_setup_wizard_provider_selection.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/latest_setup_wizard_workflow_profile_review.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/screenshots/EN/latest_terms_overview.png +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/docs/styles.css +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/installer/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/installer/macos/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/installer/macos/entitlements.plist +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/installer/windows/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/scripts/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/scripts/build_ui.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/scripts/generate_readme_screenshots.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/scripts/run_ui_tests.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/adapters/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/adapters/files/test_glossary_io.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/fakes.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/test_contracts.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/test_document_service.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/test_document_translation_service.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/test_events.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/test_export_services.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/test_queue_service.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/test_terms_service.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/application/test_ui_harness_pattern.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/architecture/test_migrated_ui_boundaries.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/architecture/test_packaging_hidden_imports.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/architecture/test_qml_ui_boundaries.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/config/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/config/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/conftest.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/expected_batching_output.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/test-terms.json +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/test_context_extractor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/test_context_manager.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/test_galgame_document_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/test_manga_document_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/test_models.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/test_noise_filtering_pipeline.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/test_term_memory_builder.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/core/test_translation_context_manager_strategy_api.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/data/test_chunk.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/data/test_chunk2.txt +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/content/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/content/test_ocr_content.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/content/test_ocr_items.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_base.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_epub.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_epub_container.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_epub_inline_markers.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_epub_xhtml_utils.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_galgame.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_manga.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_manga_alignment.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_ocr_image_embedded_text.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_pdf.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_scanned_book.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_subtitle.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/documents/test_text.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/integration/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/integration/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_extractor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_extractor_unit.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_gemini_backend.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_gemini_batch_gateway.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_glossary_translator.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_image_generator.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_image_token_usage.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_language_detector.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_llm_client.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_manga_translator.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_ocr.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_reviewer.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_session_trace.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_summarizor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_token_tracker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_token_usage_extraction.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/llm/test_translator.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/test_book_db.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/test_document_repository.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/test_document_tables.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/test_llm_batch_store.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/test_task_store.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/test_term_repository.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/test_token_tracking.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/storage/test_translation_batch_task_store.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/test_logging_handlers.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/test_stdio.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/conftest.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/tasks/test_task_engine.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_app_settings_dialog_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_app_settings_dialog_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_app_settings_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_app_settings_pane_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_app_shell_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_app_shell_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_document_export_pane_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_document_images_pane_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_document_images_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_document_ocr_tab.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_document_shell_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_document_shell_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_document_translation_pane_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_document_translation_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_document_workspace_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_i18n_progress_messages.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_image_viewer.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_main.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_main_window_shell.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_progress_widget.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_project_settings_dialog_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_project_settings_dialog_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_project_settings_pane.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_project_settings_pane_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_project_shell_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_project_shell_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_qml_bootstrap.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_qml_viewmodel_harness.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_queue_drawer_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_queue_shell_host.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_queue_shell_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_shell_host_infrastructure.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_sleep_inhibitor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_terms_pane_viewmodel.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_terms_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_ui_clickthrough_smoke.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_viewmodel_base.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_work_view.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/test_worker_cancellation_reporting.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_batch_task_overlap_guard.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_chunk_retranslation_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_config_snapshot_workers.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_glossary_export_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_glossary_review_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_ocr_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_operation_tracker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_translate_and_export_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_translation_manga_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/ui/workers/test_translation_text_task_worker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_chunking.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_cjk_normalize.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_file_utils.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_hard_wrap.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_hashing.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_llm_json_cleaner.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_markdown_escape.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_semantic_chunker.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_string_similarity.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/utils/test_symbol_check.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/execution/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/execution/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/execution/test_batch_translation_executor.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/AGENTS.md +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/__init__.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_batch_translation_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_chunk_retranslation_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_glossary_export_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_glossary_extraction_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_glossary_review_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_glossary_translation_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_image_reembedding_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_ocr_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_translate_and_export_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_translation_manga_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/handlers/test_translation_text_handler.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/test_claims.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/tasks/test_engine_core.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_glossary_ops_scoping.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_import_export.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_multi_document.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_ocr_required_for_translation.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_run_ocr.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_service_bootstrap_lock.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_service_cancellation_semantics.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_translator_image_fetcher.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/tests/workflow/test_translator_import_path.py +0 -0
- {contextweave-2.6.1 → contextweave-2.7.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: contextweave
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7.0
|
|
4
4
|
Summary: ContextWeave: context-aware document translation with glossary management
|
|
5
5
|
Project-URL: Homepage, https://github.com/bot-32142/ContextWeave
|
|
6
6
|
Project-URL: Documentation, https://bot-32142.github.io/ContextWeave/
|
|
@@ -53,6 +53,10 @@ from context_aware_translation.application.events import (
|
|
|
53
53
|
WorkboardInvalidatedEvent,
|
|
54
54
|
)
|
|
55
55
|
from context_aware_translation.config import Config, infer_async_batch_provider
|
|
56
|
+
from context_aware_translation.languages import (
|
|
57
|
+
display_target_language_name,
|
|
58
|
+
require_storage_target_language_name,
|
|
59
|
+
)
|
|
56
60
|
from context_aware_translation.storage.library.book_manager import BookManager
|
|
57
61
|
from context_aware_translation.storage.models.book import Book
|
|
58
62
|
from context_aware_translation.storage.models.config_profile import ConfigProfile
|
|
@@ -61,10 +65,6 @@ from context_aware_translation.storage.repositories.document_repository import D
|
|
|
61
65
|
from context_aware_translation.storage.repositories.task_store import TaskRecord, TaskStore
|
|
62
66
|
from context_aware_translation.storage.repositories.term_repository import TermRepository
|
|
63
67
|
from context_aware_translation.storage.schema.book_db import SQLiteBookDB
|
|
64
|
-
from context_aware_translation.ui.constants import (
|
|
65
|
-
display_target_language_name,
|
|
66
|
-
storage_target_language_name,
|
|
67
|
-
)
|
|
68
68
|
from context_aware_translation.workflow.tasks.models import TaskAction
|
|
69
69
|
|
|
70
70
|
if TYPE_CHECKING:
|
|
@@ -900,9 +900,7 @@ def build_workflow_profile_payload(
|
|
|
900
900
|
source_profile_id: str | None = None,
|
|
901
901
|
) -> dict[str, Any]:
|
|
902
902
|
payload = dict(base_config or {})
|
|
903
|
-
payload["translation_target_language"] = (
|
|
904
|
-
storage_target_language_name(profile.target_language) or profile.target_language
|
|
905
|
-
)
|
|
903
|
+
payload["translation_target_language"] = require_storage_target_language_name(profile.target_language)
|
|
906
904
|
if source_profile_id:
|
|
907
905
|
payload[_UI_SOURCE_PROFILE_ID_KEY] = source_profile_id
|
|
908
906
|
else:
|
|
@@ -38,6 +38,7 @@ from context_aware_translation.application.runtime import (
|
|
|
38
38
|
recommended_workflow_profile_from_drafts,
|
|
39
39
|
wizard_connection_key_for_draft,
|
|
40
40
|
)
|
|
41
|
+
from context_aware_translation.languages import display_target_language_name
|
|
41
42
|
from context_aware_translation.storage.models.config_profile import ConfigProfile
|
|
42
43
|
from context_aware_translation.storage.models.endpoint_profile import EndpointProfile
|
|
43
44
|
|
|
@@ -133,7 +134,12 @@ class DefaultAppSetupService:
|
|
|
133
134
|
target_language = current_detail.target_language
|
|
134
135
|
requested_target_language = (request.target_language or "").strip()
|
|
135
136
|
if requested_target_language:
|
|
136
|
-
target_language = requested_target_language
|
|
137
|
+
target_language = display_target_language_name(requested_target_language) or ""
|
|
138
|
+
if not target_language:
|
|
139
|
+
raise_application_error(
|
|
140
|
+
ApplicationErrorCode.VALIDATION,
|
|
141
|
+
"Target language must be one of the supported language presets.",
|
|
142
|
+
)
|
|
137
143
|
profile_name = (request.profile_name or "").strip() or None
|
|
138
144
|
recommendation = recommended_workflow_profile_from_drafts(
|
|
139
145
|
request.connections,
|
{contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/application/services/projects.py
RENAMED
|
@@ -16,11 +16,11 @@ from context_aware_translation.application.runtime import (
|
|
|
16
16
|
build_project_summary,
|
|
17
17
|
raise_application_error,
|
|
18
18
|
)
|
|
19
|
-
from context_aware_translation.
|
|
20
|
-
from context_aware_translation.ui.constants import (
|
|
19
|
+
from context_aware_translation.languages import (
|
|
21
20
|
display_target_language_name,
|
|
22
21
|
storage_target_language_name,
|
|
23
22
|
)
|
|
23
|
+
from context_aware_translation.storage.models.book import BookStatus
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class ProjectsService(Protocol):
|
|
@@ -75,6 +75,11 @@ class DefaultProjectsService:
|
|
|
75
75
|
)
|
|
76
76
|
|
|
77
77
|
requested_target_language = storage_target_language_name(request.target_language)
|
|
78
|
+
if request.target_language is not None and requested_target_language is None:
|
|
79
|
+
raise_application_error(
|
|
80
|
+
ApplicationErrorCode.VALIDATION,
|
|
81
|
+
"Target language must be one of the supported language presets.",
|
|
82
|
+
)
|
|
78
83
|
profile_for_defaults = requested_profile or self._runtime.get_default_profile()
|
|
79
84
|
default_target_language = None
|
|
80
85
|
if profile_for_defaults is not None:
|
|
@@ -127,11 +132,15 @@ class DefaultProjectsService:
|
|
|
127
132
|
if updated is None:
|
|
128
133
|
raise_application_error(ApplicationErrorCode.NOT_FOUND, f"Project not found: {request.project_id}")
|
|
129
134
|
if request.target_language is not None:
|
|
135
|
+
target_language = storage_target_language_name(request.target_language)
|
|
136
|
+
if target_language is None:
|
|
137
|
+
raise_application_error(
|
|
138
|
+
ApplicationErrorCode.VALIDATION,
|
|
139
|
+
"Target language must be one of the supported language presets.",
|
|
140
|
+
)
|
|
130
141
|
book = self._runtime.get_book(request.project_id)
|
|
131
142
|
config = self._runtime.get_effective_config_payload(request.project_id)
|
|
132
|
-
config["translation_target_language"] =
|
|
133
|
-
storage_target_language_name(request.target_language) or request.target_language
|
|
134
|
-
)
|
|
143
|
+
config["translation_target_language"] = target_language
|
|
135
144
|
if book.profile_id is not None:
|
|
136
145
|
config["_ui_source_profile_id"] = book.profile_id
|
|
137
146
|
self._runtime.book_manager.set_book_custom_config(request.project_id, config)
|
|
@@ -12,6 +12,7 @@ from context_aware_translation.app_identity import default_user_config_dir
|
|
|
12
12
|
from context_aware_translation.application.contracts.app_setup import ConnectionDraft, WorkflowProfileDetail
|
|
13
13
|
from context_aware_translation.application.runtime import build_workflow_profile_payload
|
|
14
14
|
from context_aware_translation.config import EndpointProfile, ensure_valid_persisted_config_payload
|
|
15
|
+
from context_aware_translation.languages import storage_target_language_name
|
|
15
16
|
|
|
16
17
|
from .output import EXIT_USAGE, CliError
|
|
17
18
|
|
|
@@ -218,6 +219,13 @@ def load_cli_config(path: Path) -> ResolvedCliConfig:
|
|
|
218
219
|
)
|
|
219
220
|
|
|
220
221
|
profile = WorkflowProfileDetail.model_validate(profile_payload)
|
|
222
|
+
if storage_target_language_name(profile.target_language) is None:
|
|
223
|
+
raise CliError(
|
|
224
|
+
"invalid_config",
|
|
225
|
+
"target_language must be one of the supported language presets.",
|
|
226
|
+
exit_code=EXIT_USAGE,
|
|
227
|
+
details={"target_language": profile.target_language},
|
|
228
|
+
)
|
|
221
229
|
_validate_route_connections(profile, endpoint_profiles)
|
|
222
230
|
custom_config = build_workflow_profile_payload(base_config=None, profile=profile)
|
|
223
231
|
custom_config["endpoint_profiles"] = {
|
|
@@ -10,6 +10,10 @@ from typing import TYPE_CHECKING, Any, Protocol, TypeVar
|
|
|
10
10
|
import yaml
|
|
11
11
|
|
|
12
12
|
from context_aware_translation import configure_logging
|
|
13
|
+
from context_aware_translation.languages import (
|
|
14
|
+
require_storage_target_language_name,
|
|
15
|
+
storage_target_language_name,
|
|
16
|
+
)
|
|
13
17
|
from context_aware_translation.llm.image_generator import ImageBackend
|
|
14
18
|
|
|
15
19
|
if TYPE_CHECKING:
|
|
@@ -980,6 +984,7 @@ class Config:
|
|
|
980
984
|
)
|
|
981
985
|
|
|
982
986
|
def __post_init__(self) -> None:
|
|
987
|
+
self.translation_target_language = require_storage_target_language_name(self.translation_target_language)
|
|
983
988
|
self.output_dir = Path(self.output_dir)
|
|
984
989
|
if self.working_dir is None:
|
|
985
990
|
self.working_dir = self.output_dir / DEFAULT_WORKING_SUBDIR
|
|
@@ -1148,6 +1153,8 @@ def validate_persisted_config_payload(
|
|
|
1148
1153
|
target_language = config.get("translation_target_language")
|
|
1149
1154
|
if not isinstance(target_language, str) or target_language.strip() == "":
|
|
1150
1155
|
errors.append("translation_target_language is required")
|
|
1156
|
+
elif storage_target_language_name(target_language) is None:
|
|
1157
|
+
errors.append("translation_target_language must be one of the supported language presets")
|
|
1151
1158
|
|
|
1152
1159
|
endpoint_profiles = config.get("endpoint_profiles", {})
|
|
1153
1160
|
if endpoint_profiles is None:
|
|
@@ -60,9 +60,9 @@ from context_aware_translation.documents.epub_xhtml_utils import (
|
|
|
60
60
|
flatten_annotationless_ruby_in_xhtml,
|
|
61
61
|
inject_translations_into_xhtml,
|
|
62
62
|
)
|
|
63
|
+
from context_aware_translation.languages import LANGUAGES as UI_LANGUAGE_PRESETS
|
|
63
64
|
from context_aware_translation.llm.epub_ocr import ocr_epub_images
|
|
64
65
|
from context_aware_translation.llm.image_generator import build_text_replacements, create_image_generator
|
|
65
|
-
from context_aware_translation.ui.constants import LANGUAGES as UI_LANGUAGE_PRESETS
|
|
66
66
|
from context_aware_translation.utils.compression_marker import decode_compressed_lines
|
|
67
67
|
from context_aware_translation.utils.hard_wrap import unwrap_hard_wrapped_text
|
|
68
68
|
from context_aware_translation.utils.image_utils import (
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Supported translation target languages and their canonical labels."""
|
|
2
2
|
|
|
3
3
|
from typing import Final
|
|
4
4
|
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# Language presets: (Display Name in native script, Internal Chinese name)
|
|
9
|
-
# All languages supported by Gemini, ranked by population of native speakers
|
|
10
|
-
LANGUAGES: Final[list[tuple[str, str]]] = [
|
|
5
|
+
# (User-facing name in native script, canonical persisted Chinese name)
|
|
6
|
+
# All languages supported by Gemini, ranked by population of native speakers.
|
|
7
|
+
LANGUAGES: Final[tuple[tuple[str, str], ...]] = (
|
|
11
8
|
("中文(简体)", "简体中文"),
|
|
12
9
|
("中文(繁體)", "繁体中文"),
|
|
13
10
|
("Español", "西班牙语"),
|
|
@@ -57,7 +54,7 @@ LANGUAGES: Final[list[tuple[str, str]]] = [
|
|
|
57
54
|
("Slovenščina", "斯洛文尼亚语"),
|
|
58
55
|
("Latviešu", "拉脱维亚语"),
|
|
59
56
|
("Eesti", "爱沙尼亚语"),
|
|
60
|
-
|
|
57
|
+
)
|
|
61
58
|
|
|
62
59
|
|
|
63
60
|
def _normalize_language_label(value: str) -> str:
|
|
@@ -74,31 +71,28 @@ for _display_name, _internal_name in LANGUAGES:
|
|
|
74
71
|
|
|
75
72
|
|
|
76
73
|
def display_target_language_name(value: str | None) -> str | None:
|
|
74
|
+
"""Return the preset display name, or ``None`` for unsupported input."""
|
|
77
75
|
if not isinstance(value, str):
|
|
78
76
|
return None
|
|
79
77
|
cleaned = value.strip()
|
|
80
78
|
if not cleaned:
|
|
81
79
|
return None
|
|
82
|
-
return _DISPLAY_LANGUAGE_BY_KEY.get(_normalize_language_label(cleaned)
|
|
80
|
+
return _DISPLAY_LANGUAGE_BY_KEY.get(_normalize_language_label(cleaned))
|
|
83
81
|
|
|
84
82
|
|
|
85
83
|
def storage_target_language_name(value: str | None) -> str | None:
|
|
84
|
+
"""Return the canonical persisted name, or ``None`` for unsupported input."""
|
|
86
85
|
if not isinstance(value, str):
|
|
87
86
|
return None
|
|
88
87
|
cleaned = value.strip()
|
|
89
88
|
if not cleaned:
|
|
90
89
|
return None
|
|
91
|
-
return _STORAGE_LANGUAGE_BY_KEY.get(_normalize_language_label(cleaned)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
# Default window dimensions
|
|
95
|
-
DEFAULT_WINDOW_WIDTH: Final[int] = 1120
|
|
96
|
-
DEFAULT_WINDOW_HEIGHT: Final[int] = 760
|
|
97
|
-
MIN_WINDOW_WIDTH: Final[int] = 800
|
|
98
|
-
MIN_WINDOW_HEIGHT: Final[int] = 600
|
|
90
|
+
return _STORAGE_LANGUAGE_BY_KEY.get(_normalize_language_label(cleaned))
|
|
99
91
|
|
|
100
|
-
# Sidebar width
|
|
101
|
-
SIDEBAR_WIDTH: Final[int] = 280
|
|
102
92
|
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
def require_storage_target_language_name(value: str | None) -> str:
|
|
94
|
+
"""Return a canonical target language or raise for non-preset input."""
|
|
95
|
+
canonical = storage_target_language_name(value)
|
|
96
|
+
if canonical is None:
|
|
97
|
+
raise ValueError("translation_target_language must be one of the supported language presets")
|
|
98
|
+
return canonical
|
{contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/llm/glossary_translator.py
RENAMED
|
@@ -8,6 +8,7 @@ from collections.abc import Callable
|
|
|
8
8
|
from context_aware_translation.config import GlossaryTranslationConfig
|
|
9
9
|
from context_aware_translation.core.cancellation import OperationCancelledError, raise_if_cancelled
|
|
10
10
|
from context_aware_translation.llm.client import LLMClient
|
|
11
|
+
from context_aware_translation.llm.language_pair_prompts import apply_language_pair_prompt_policy
|
|
11
12
|
from context_aware_translation.llm.session_trace import llm_session_scope
|
|
12
13
|
from context_aware_translation.llm.translator import TranslationValidationError
|
|
13
14
|
from context_aware_translation.utils.cjk_normalize import build_normalized_key_mapping
|
|
@@ -20,7 +21,7 @@ def _build_batch_system_prompt(source_language: str, target_language: str) -> st
|
|
|
20
21
|
"""
|
|
21
22
|
Build system prompt for batch translation of similar terms.
|
|
22
23
|
"""
|
|
23
|
-
|
|
24
|
+
prompt = (
|
|
24
25
|
"---角色---\n"
|
|
25
26
|
f"你负责翻译{source_language}名称。\n\n"
|
|
26
27
|
"---指令---\n"
|
|
@@ -68,6 +69,13 @@ def _build_batch_system_prompt(source_language: str, target_language: str) -> st
|
|
|
68
69
|
' "新翻译": {"HP": "HP"}\n'
|
|
69
70
|
"}\n\n"
|
|
70
71
|
)
|
|
72
|
+
return apply_language_pair_prompt_policy(
|
|
73
|
+
prompt,
|
|
74
|
+
source_language=source_language,
|
|
75
|
+
target_language=target_language,
|
|
76
|
+
prompt_kind="name_translation",
|
|
77
|
+
before_marker="---示例---\n",
|
|
78
|
+
)
|
|
71
79
|
|
|
72
80
|
|
|
73
81
|
def _build_batch_user_payload(
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""Hardcoded prompt guidance for specific source/target language pairs."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
from typing import Literal
|
|
7
|
+
|
|
8
|
+
from context_aware_translation.languages import storage_target_language_name
|
|
9
|
+
from context_aware_translation.llm.language_pair_prompts.japanese_to_simplified_chinese import (
|
|
10
|
+
NAME_TRANSLATION_PROMPT,
|
|
11
|
+
TRANSLATION_PROMPT,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
PromptKind = Literal["translation", "name_translation"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@dataclass(frozen=True)
|
|
18
|
+
class LanguagePairPromptPolicy:
|
|
19
|
+
"""Optional prompt additions for one canonical language pair."""
|
|
20
|
+
|
|
21
|
+
translation: str | None = None
|
|
22
|
+
name_translation: str | None = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
_JAPANESE_TO_SIMPLIFIED_CHINESE_POLICY = LanguagePairPromptPolicy(
|
|
26
|
+
translation=TRANSLATION_PROMPT,
|
|
27
|
+
name_translation=NAME_TRANSLATION_PROMPT,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
_LANGUAGE_PAIR_PROMPT_POLICIES: dict[tuple[str, str], LanguagePairPromptPolicy] = {
|
|
31
|
+
("日语", "简体中文"): _JAPANESE_TO_SIMPLIFIED_CHINESE_POLICY,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def get_language_pair_prompt_policy(
|
|
36
|
+
source_language: str,
|
|
37
|
+
target_language: str,
|
|
38
|
+
) -> LanguagePairPromptPolicy | None:
|
|
39
|
+
"""Return a registered policy, normalizing known preset labels first."""
|
|
40
|
+
canonical_source = storage_target_language_name(source_language) or source_language.strip()
|
|
41
|
+
canonical_target = storage_target_language_name(target_language) or target_language.strip()
|
|
42
|
+
return _LANGUAGE_PAIR_PROMPT_POLICIES.get((canonical_source, canonical_target))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def apply_language_pair_prompt_policy(
|
|
46
|
+
prompt: str,
|
|
47
|
+
*,
|
|
48
|
+
source_language: str,
|
|
49
|
+
target_language: str,
|
|
50
|
+
prompt_kind: PromptKind,
|
|
51
|
+
before_marker: str,
|
|
52
|
+
) -> str:
|
|
53
|
+
"""Insert registered guidance, leaving unregistered prompts unchanged."""
|
|
54
|
+
policy = get_language_pair_prompt_policy(source_language, target_language)
|
|
55
|
+
if policy is None:
|
|
56
|
+
return prompt
|
|
57
|
+
|
|
58
|
+
guidance = policy.translation if prompt_kind == "translation" else policy.name_translation
|
|
59
|
+
if not guidance:
|
|
60
|
+
return prompt
|
|
61
|
+
if before_marker not in prompt:
|
|
62
|
+
raise ValueError(f"Prompt insertion marker not found: {before_marker}")
|
|
63
|
+
return prompt.replace(before_marker, f"{guidance}\n\n{before_marker}", 1)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Japanese-to-Simplified-Chinese prompt additions."""
|
|
2
|
+
|
|
3
|
+
TRANSLATION_PROMPT = """--日译简中专项要求--
|
|
4
|
+
1. 警惕日中同形异义词和汉字表面直译;按句中含义选择中文表达。
|
|
5
|
+
2. 日语的形式名词、助词、终助词和敬语不得逐字对应;根据其在句中的实际作用翻译。
|
|
6
|
+
3. 日语拟声词、拟态词、惯用语和双关语没有直接对应表达时,传达其在当前语境中的作用。
|
|
7
|
+
4. 按语义将日文标点转换为简体中文规范标点,不得机械替换:「、」应根据并列或停顿关系译为顿号或逗号;「」与『』应根据对话、引用或作品名改用对应的中文引号或书名号;省略号和破折号使用规范的「……」和「——」。"""
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
NAME_TRANSLATION_PROMPT = """---日语名称译简中专项要求---
|
|
11
|
+
1. 先依据名称与描述判断其是日本人名、外国来源人名、地名、组织名还是普通术语,再决定译法;不得只按汉字字面猜测。
|
|
12
|
+
2. 有官方或通行中文译名时优先采用该译名。
|
|
13
|
+
3. 日本人名中的汉字原则上保持原字对应关系,并转换为规范简体字;不得把姓名含义意译,也不得擅自改造成中文姓名。
|
|
14
|
+
4. 仅由假名构成、读音不可由汉字稳定对应的人名,按日语实际读音音译。
|
|
15
|
+
5. 明显源自其他语言的片假名或拉丁字母名称,优先还原其原语言名称或采用通行中文译名;不要无条件按日语转写再次音译。
|
|
16
|
+
6. 敬称、职衔、身份称呼和非固有前后缀不得并入核心名称,除非它本身就是专名不可分割的一部分。"""
|
|
@@ -15,6 +15,7 @@ from context_aware_translation.documents.epub_support.inline_markers import (
|
|
|
15
15
|
validate_inline_marker_sanity,
|
|
16
16
|
)
|
|
17
17
|
from context_aware_translation.llm.client import LLMClient
|
|
18
|
+
from context_aware_translation.llm.language_pair_prompts import apply_language_pair_prompt_policy
|
|
18
19
|
from context_aware_translation.llm.session_trace import get_llm_session_id, llm_session_scope
|
|
19
20
|
from context_aware_translation.utils.compression_marker import COMPRESSED_LINE_SENTINEL
|
|
20
21
|
from context_aware_translation.utils.llm_json_cleaner import clean_llm_response, parse_llm_json
|
|
@@ -544,6 +545,13 @@ c. 结合上下文,在不造成误解、歧义或信息缺失的前提下,
|
|
|
544
545
|
|
|
545
546
|
{_build_translation_prompt_examples()}
|
|
546
547
|
"""
|
|
548
|
+
system_prompt = apply_language_pair_prompt_policy(
|
|
549
|
+
system_prompt,
|
|
550
|
+
source_language=source_language,
|
|
551
|
+
target_language=target_language,
|
|
552
|
+
prompt_kind="translation",
|
|
553
|
+
before_marker="--格式与标记(必须严格遵守)--",
|
|
554
|
+
)
|
|
547
555
|
|
|
548
556
|
# Build JSON payload for user prompt with Chinese keys
|
|
549
557
|
terms_json = []
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Constants for the UI module."""
|
|
2
|
+
|
|
3
|
+
from typing import Final
|
|
4
|
+
|
|
5
|
+
from context_aware_translation.languages import (
|
|
6
|
+
LANGUAGES,
|
|
7
|
+
display_target_language_name,
|
|
8
|
+
storage_target_language_name,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
__all__ = ("LANGUAGES", "display_target_language_name", "storage_target_language_name")
|
|
12
|
+
|
|
13
|
+
# Application version
|
|
14
|
+
APP_VERSION: Final[str] = "0.1.1"
|
|
15
|
+
|
|
16
|
+
# Default window dimensions
|
|
17
|
+
DEFAULT_WINDOW_WIDTH: Final[int] = 1120
|
|
18
|
+
DEFAULT_WINDOW_HEIGHT: Final[int] = 760
|
|
19
|
+
MIN_WINDOW_WIDTH: Final[int] = 800
|
|
20
|
+
MIN_WINDOW_HEIGHT: Final[int] = 600
|
|
21
|
+
|
|
22
|
+
# Sidebar width
|
|
23
|
+
SIDEBAR_WIDTH: Final[int] = 280
|
|
24
|
+
|
|
25
|
+
# Table defaults
|
|
26
|
+
DEFAULT_PAGE_SIZE: Final[int] = 50
|
{contextweave-2.6.1 → contextweave-2.7.0}/context_aware_translation/ui/features/app_setup_view.py
RENAMED
|
@@ -664,7 +664,7 @@ class SetupWizardDialog(QDialog):
|
|
|
664
664
|
)
|
|
665
665
|
self._profile_name_edit = QLineEdit(suggested_name)
|
|
666
666
|
self._target_language_combo = QSearchableComboBox()
|
|
667
|
-
self._target_language_combo.setEditable(
|
|
667
|
+
self._target_language_combo.setEditable(False)
|
|
668
668
|
seen_languages: set[str] = set()
|
|
669
669
|
for display_name, _internal_name in LANGUAGES:
|
|
670
670
|
if display_name in seen_languages:
|
|
@@ -682,7 +682,7 @@ class SetupWizardDialog(QDialog):
|
|
|
682
682
|
if index >= 0:
|
|
683
683
|
self._target_language_combo.setCurrentIndex(index)
|
|
684
684
|
else:
|
|
685
|
-
self._target_language_combo.
|
|
685
|
+
self._target_language_combo.setCurrentIndex(0)
|
|
686
686
|
mode_row = QWidget()
|
|
687
687
|
mode_row_layout = QHBoxLayout(mode_row)
|
|
688
688
|
mode_row_layout.setContentsMargins(0, 0, 0, 0)
|
|
@@ -1188,7 +1188,7 @@ class WorkflowProfileEditorDialog(QDialog):
|
|
|
1188
1188
|
self.name_edit = QLineEdit(self._original_profile.name)
|
|
1189
1189
|
self.name_edit.setEnabled(self._allow_name_edit)
|
|
1190
1190
|
self.target_language_combo = QSearchableComboBox()
|
|
1191
|
-
self.target_language_combo.setEditable(
|
|
1191
|
+
self.target_language_combo.setEditable(False)
|
|
1192
1192
|
seen_languages: set[str] = set()
|
|
1193
1193
|
for display_name, _code in LANGUAGES:
|
|
1194
1194
|
if display_name in seen_languages:
|
|
@@ -1200,7 +1200,7 @@ class WorkflowProfileEditorDialog(QDialog):
|
|
|
1200
1200
|
if index >= 0:
|
|
1201
1201
|
self.target_language_combo.setCurrentIndex(index)
|
|
1202
1202
|
else:
|
|
1203
|
-
self.target_language_combo.
|
|
1203
|
+
self.target_language_combo.setCurrentIndex(0)
|
|
1204
1204
|
|
|
1205
1205
|
basics_layout.addRow(self.tr("Profile name"), self.name_edit)
|
|
1206
1206
|
basics_layout.addRow(self.tr("Target language"), self.target_language_combo)
|
|
@@ -7,7 +7,7 @@ packages = ["context_aware_translation"]
|
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "contextweave"
|
|
10
|
-
version = "2.
|
|
10
|
+
version = "2.7.0"
|
|
11
11
|
description = "ContextWeave: context-aware document translation with glossary management"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
license = "GPL-3.0-only"
|
|
@@ -118,13 +118,25 @@ def test_projects_service_persists_internal_language_names_but_displays_english(
|
|
|
118
118
|
context.close()
|
|
119
119
|
|
|
120
120
|
|
|
121
|
+
def test_projects_service_rejects_unsupported_target_language(tmp_path: Path) -> None:
|
|
122
|
+
_ensure_qt_app()
|
|
123
|
+
context = _build_configured_context(tmp_path)
|
|
124
|
+
try:
|
|
125
|
+
with pytest.raises(ApplicationError, match="supported language presets"):
|
|
126
|
+
context.services.projects.create_project(
|
|
127
|
+
CreateProjectRequest(name="Unsupported Language", target_language="Klingon")
|
|
128
|
+
)
|
|
129
|
+
finally:
|
|
130
|
+
context.close()
|
|
131
|
+
|
|
132
|
+
|
|
121
133
|
def test_projects_service_creates_project_with_selected_workflow_profile(tmp_path: Path) -> None:
|
|
122
134
|
_ensure_qt_app()
|
|
123
135
|
context = _build_configured_context(tmp_path)
|
|
124
136
|
try:
|
|
125
137
|
default_profile = context.runtime.book_manager.list_profiles()[0]
|
|
126
138
|
alternate_config = dict(default_profile.config)
|
|
127
|
-
alternate_config["translation_target_language"] = "
|
|
139
|
+
alternate_config["translation_target_language"] = "日语"
|
|
128
140
|
alternate_profile = context.runtime.book_manager.create_profile(
|
|
129
141
|
name="Japanese Profile",
|
|
130
142
|
config=alternate_config,
|
|
@@ -138,7 +150,7 @@ def test_projects_service_creates_project_with_selected_workflow_profile(tmp_pat
|
|
|
138
150
|
project_setup = context.services.project_setup.get_state(project_id)
|
|
139
151
|
|
|
140
152
|
assert book.profile_id == alternate_profile.profile_id
|
|
141
|
-
assert created.target_language == "
|
|
153
|
+
assert created.target_language == "日本語"
|
|
142
154
|
assert project_setup.selected_shared_profile_id == alternate_profile.profile_id
|
|
143
155
|
finally:
|
|
144
156
|
context.close()
|
|
@@ -154,7 +166,7 @@ def test_projects_service_preserves_selected_profile_when_overriding_target_lang
|
|
|
154
166
|
CreateProjectRequest(
|
|
155
167
|
name="Profile Override",
|
|
156
168
|
workflow_profile_id=shared_profile.profile_id,
|
|
157
|
-
target_language="
|
|
169
|
+
target_language="中文(简体)",
|
|
158
170
|
)
|
|
159
171
|
)
|
|
160
172
|
project_id = created.project.project_id
|
|
@@ -163,7 +175,7 @@ def test_projects_service_preserves_selected_profile_when_overriding_target_lang
|
|
|
163
175
|
project_setup = context.services.project_setup.get_state(project_id)
|
|
164
176
|
|
|
165
177
|
assert book.profile_id is None
|
|
166
|
-
assert config["translation_target_language"] == "
|
|
178
|
+
assert config["translation_target_language"] == "简体中文"
|
|
167
179
|
assert config["_ui_source_profile_id"] == shared_profile.profile_id
|
|
168
180
|
assert project_setup.selected_shared_profile_id == shared_profile.profile_id
|
|
169
181
|
finally:
|
|
@@ -199,7 +211,9 @@ def test_projects_service_preserves_source_profile_when_editing_target_language(
|
|
|
199
211
|
created = context.services.projects.create_project(CreateProjectRequest(name="Edit Target"))
|
|
200
212
|
project_id = created.project.project_id
|
|
201
213
|
|
|
202
|
-
context.services.projects.update_project(
|
|
214
|
+
context.services.projects.update_project(
|
|
215
|
+
UpdateProjectRequest(project_id=project_id, target_language="中文(简体)")
|
|
216
|
+
)
|
|
203
217
|
|
|
204
218
|
book = context.runtime.get_book(project_id)
|
|
205
219
|
config = context.runtime.get_effective_config_payload(project_id)
|
|
@@ -297,7 +311,7 @@ def test_app_setup_preview_exposes_recommended_profile(tmp_path: Path) -> None:
|
|
|
297
311
|
default_model="deepseek-v4-pro",
|
|
298
312
|
),
|
|
299
313
|
],
|
|
300
|
-
target_language="
|
|
314
|
+
target_language="日本語",
|
|
301
315
|
)
|
|
302
316
|
)
|
|
303
317
|
|
|
@@ -305,7 +319,7 @@ def test_app_setup_preview_exposes_recommended_profile(tmp_path: Path) -> None:
|
|
|
305
319
|
assert preview.recommendation is not None
|
|
306
320
|
assert preview.recommendation.routes
|
|
307
321
|
assert preview.recommendation.name == "Recommended"
|
|
308
|
-
assert preview.recommendation.target_language == "
|
|
322
|
+
assert preview.recommendation.target_language == "日本語"
|
|
309
323
|
finally:
|
|
310
324
|
context.close()
|
|
311
325
|
|
|
@@ -318,7 +332,7 @@ def test_setup_wizard_creates_curated_connections_and_named_profile(tmp_path: Pa
|
|
|
318
332
|
SetupWizardRequest(
|
|
319
333
|
providers=[ProviderKind.GEMINI, ProviderKind.DEEPSEEK],
|
|
320
334
|
profile_name="Team Default",
|
|
321
|
-
target_language="
|
|
335
|
+
target_language="日本語",
|
|
322
336
|
connections=[
|
|
323
337
|
ConnectionDraft(display_name="Gemini", provider=ProviderKind.GEMINI, api_key="gkey"),
|
|
324
338
|
ConnectionDraft(display_name="DeepSeek", provider=ProviderKind.DEEPSEEK, api_key="dkey"),
|
|
@@ -350,7 +364,7 @@ def test_setup_wizard_creates_curated_connections_and_named_profile(tmp_path: Pa
|
|
|
350
364
|
detail = context.services.app_setup.get_state()
|
|
351
365
|
assert any(profile.name == "Team Default" for profile in detail.shared_profiles)
|
|
352
366
|
assert created_profile.is_default is True
|
|
353
|
-
assert created_profile.config["translation_target_language"] == "
|
|
367
|
+
assert created_profile.config["translation_target_language"] == "日语"
|
|
354
368
|
assert created_profile.config["glossary_config"]["model"] == "deepseek-v4-pro"
|
|
355
369
|
assert created_profile.config["glossary_config"]["kwargs"] == _DEEPSEEK_THINKING_KWARGS
|
|
356
370
|
assert created_profile.config["translator_config"]["model"] == "deepseek-v4-pro"
|
|
@@ -10,7 +10,12 @@ from context_aware_translation.cli.config_file import CONFIG_ENV_VAR, default_co
|
|
|
10
10
|
from context_aware_translation.cli.main import run
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
def _config_text(
|
|
13
|
+
def _config_text(
|
|
14
|
+
env_name: str = "CAT_TEST_API_KEY",
|
|
15
|
+
*,
|
|
16
|
+
unknown_connection: bool = False,
|
|
17
|
+
target_language: str = "English",
|
|
18
|
+
) -> str:
|
|
14
19
|
translator_connection = "missing" if unknown_connection else "test"
|
|
15
20
|
return f"""
|
|
16
21
|
version: 1
|
|
@@ -27,7 +32,7 @@ workflow_profiles:
|
|
|
27
32
|
profile_id: balanced
|
|
28
33
|
name: Balanced
|
|
29
34
|
kind: shared
|
|
30
|
-
target_language:
|
|
35
|
+
target_language: {target_language}
|
|
31
36
|
routes:
|
|
32
37
|
- step_id: extractor
|
|
33
38
|
step_label: Extractor
|
|
@@ -180,6 +185,18 @@ def test_config_validate_rejects_unknown_route_connection(tmp_path: Path, monkey
|
|
|
180
185
|
assert "unknown connection" in payload["error"]["message"]
|
|
181
186
|
|
|
182
187
|
|
|
188
|
+
def test_config_validate_rejects_unsupported_target_language(tmp_path: Path, monkeypatch: Any, capsys: Any) -> None:
|
|
189
|
+
monkeypatch.setenv("CAT_TEST_API_KEY", "test-key")
|
|
190
|
+
config_path = _write_config(tmp_path, _config_text(target_language="Klingon"))
|
|
191
|
+
|
|
192
|
+
exit_code = run(["--config", str(config_path), "--json", "config", "validate"])
|
|
193
|
+
|
|
194
|
+
assert exit_code == 2
|
|
195
|
+
payload = _json_stdout(capsys)
|
|
196
|
+
assert payload["error"]["code"] == "invalid_config"
|
|
197
|
+
assert "supported language presets" in payload["error"]["message"]
|
|
198
|
+
|
|
199
|
+
|
|
183
200
|
def test_books_list_show_delete_json(tmp_path: Path, monkeypatch: Any, capsys: Any) -> None:
|
|
184
201
|
monkeypatch.setenv("CAT_TEST_API_KEY", "test-key")
|
|
185
202
|
monkeypatch.setattr(DefaultDocumentService, "run_translate_and_export", _fake_run_translate_and_export)
|