LunaTranslator/docs/en/settings.md

189 lines
7.0 KiB
Markdown
Raw Normal View History

2024-07-03 17:24:13 +08:00
# Settings
2024-07-03 17:24:13 +08:00
Access the settings window by clicking the settings button in the toolbar or the tray icon.
2024-07-03 17:24:13 +08:00
## Basic Settings
2024-07-03 17:24:13 +08:00
Choose your text output source. A pink ✓ indicates selection, while a gray × indicates inactive selection; only one can be selected at a time.
2024-07-03 17:24:13 +08:00
- When selecting OCR as the text input, you need to define the OCR region in the toolbar.
2024-07-03 17:24:13 +08:00
- Choosing Textractor (HOOK) as the text input will open a process selection window, followed by a text selection window after choosing a game.
2024-07-03 17:24:13 +08:00
- The default is clipboard mode, which automatically extracts and translates text from the clipboard.
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/5.jpg)
2024-07-03 17:24:13 +08:00
## Translation Settings
2024-07-03 17:24:13 +08:00
Configure various translation engines. The developer (HIllya51) hasn't separated different types of translators into categories.
2024-07-03 17:24:13 +08:00
Supported translation engines include:
2024-07-03 17:24:13 +08:00
  **Offline Translation**: Supports JBeijing7, Kingsoft FastAIT, and YiDianTong for offline translation.
2024-07-03 17:24:13 +08:00
  Free Online Translation: Supports Baidu, Bing, Google, Ali, Youdao, Caiyun, Sogou, DeepL, Kingsoft, iFlytek, Tencent, ByteDance, Volcano, Papago, and Yeekit.
2024-07-03 17:24:13 +08:00
  **Registered Online Translation**: Supports user-registered API keys for Baidu, Tencent, Youdao, Niutrans, Caiyun, Volcano, and DeepL.
2024-07-03 17:24:13 +08:00
  **Pre-translation**: Supports loading human translations and aggregated machine pre-translations.
2024-07-03 17:24:13 +08:00
You can select any number of translation engines without restriction.
2024-07-03 17:24:13 +08:00
- The buttons represent: Enable/Disable translator / Set translation text color / Settings
2024-07-03 17:24:13 +08:00
- Offline translation, API online translation, and pre-translation require setup before use.
2024-07-03 17:24:13 +08:00
- For Google Translate and DeepL, you may need to set up a proxy to access them.
2024-07-03 17:24:13 +08:00
- Pre-translation supports fuzzy matching (particularly effective in OCR mode).
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/6.jpg)
2024-07-03 17:24:13 +08:00
## HOOK设置
LocaleEmulator settings allow you to set the LocaleEmulator path (built-in for newer versions). Once set, you can launch games through LocaleEmulator.
2024-07-03 17:24:13 +08:00
- "Game Manager" stores previously hooked games for convenient launches (same as clicking "Open Game Manager" in the toolbar).
2024-07-03 17:24:13 +08:00
- "Record Translation File" saves extracted text to the "transkiroku" folder, outputting two files:
2024-07-03 17:24:13 +08:00
1. **game_md5_game_executable_name.sqlite**: Records a single translation source output for generating "manual translation" files. Setting a preferred translation source prioritizes that source, and falls back to others if translation fails.
2024-07-03 17:24:13 +08:00
2. **game_md5_game_executable_name.premt_synthesize.sqlite**: Used for "machine pre-translation" to record all valid translation results.
2024-07-03 17:24:13 +08:00
- "Export SQLite file to JSON" Exports to JSON for easy translation editing. Set the JSON file path as the "Manual Translation" file path to use manual translations.
2024-07-03 17:24:13 +08:00
- In clipboard and OCR modes, files are recorded with prefixes "0_copy" and "0_ocr" respectively.
2024-07-03 17:24:13 +08:00
[➔ See HOOK instructions for detailed usage](hooksetsumei.md)
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/21.jpg)
2024-07-03 17:24:13 +08:00
## OCR Settings
2024-07-03 17:24:13 +08:00
In OCR mode, select your preferred OCR source.
2024-07-03 17:24:13 +08:00
- The local OCR is a built-in engine that's easy to use.
2024-07-03 17:24:13 +08:00
- Baidu OCR, OCRSpace, and Docsumo require API keys.
2024-07-03 17:24:13 +08:00
- Youdao OCR and Youdao Image Translation are experimental interfaces that may be unstable.
2024-07-03 17:24:13 +08:00
- Windows OCR requires Japanese language components installed on your system.
2024-07-03 17:24:13 +08:00
- Setting "Perform OCR at regular intervals" and specifying a maximum interval forces OCR to occur every X seconds, regardless if the game scene has changed or not.
2024-07-03 17:24:13 +08:00
[➔ See OCR instructions for detailed usage](ocrsetsumei.md)
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/22.jpg)
2024-07-03 17:24:13 +08:00
## Display Settings
2024-07-03 17:24:13 +08:00
- Opacity sets the window background opacity.
2024-07-03 17:24:13 +08:00
- When "Show Original Text" is enabled, you can set options to display furigana and word segmentation results.
2024-07-03 17:24:13 +08:00
- Font styles include four options (Normal, Hollow, Outline, Shadow). The latter three advanced styles can be adjusted using "Hollow Line Width," "Outline Width," and "Shadow Strength" settings.
2024-07-03 17:24:13 +08:00
- "Original Text Color" sets the color for the source text, while "Background Color" sets the window background color.
2024-07-03 17:24:13 +08:00
- "Fill Color" is used for advanced font styles.
2024-07-03 17:24:13 +08:00
- "Selectable Mode" allows content selection within the translation window.
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/7.jpg)
2024-07-03 17:24:13 +08:00
The four font styles are shown below:
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/ziti1.jpg)
![img](https://image.lunatranslator.xyz/zh/ziti2.jpg)
![img](https://image.lunatranslator.xyz/zh/ziti3.jpg)
![img](https://image.lunatranslator.xyz/zh/ziti4.jpg)
2024-07-03 17:24:13 +08:00
Furigana (phonetic guide) display example:
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/jiaming.jpg)
2024-07-03 17:24:13 +08:00
Tokenization (word segmentation) display example:
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/fenci.jpg)
2024-07-03 17:24:13 +08:00
## Voice Settings
2024-07-03 17:24:13 +08:00
- Windows TTS requires Japanese language components installed on your system.
2024-07-03 17:24:13 +08:00
- Azure TTS and Volcano TTS are online services that may become unavailable in the future.
2024-07-03 17:24:13 +08:00
- VoiceRoid2 is an offline TTS engine.
2024-07-03 17:24:13 +08:00
- VOICEVOX is an open-source TTS engine, but it's relatively slow at Text-to-Speech.
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/8.jpg)
2024-07-03 17:24:13 +08:00
## Translation Optimization
2024-07-03 17:24:13 +08:00
For text extracted via HOOK, you can set up simple processing operations to improve the content.
2024-07-03 17:24:13 +08:00
This includes common settings and some advanced options.
2024-07-03 17:24:13 +08:00
- "Simple Text Replacement" allows replacing or filtering extracted text.
2024-07-03 17:24:13 +08:00
- "Regular Expression Replacement" requires knowledge of Python's re.sub method (Regex).
2024-07-03 17:24:13 +08:00
- "Manual Translation for Proper Nouns" supports user-configured dictionaries for special terms (e.g., names, places).
2024-07-03 17:24:13 +08:00
- "Translation Result Correction" occurs after translation; forced replacement of translation results can be useful when noun translations fail with certain engines.
2024-07-03 17:24:13 +08:00
- This software partially supports using VNR shared dictionaries.
2024-07-03 17:24:13 +08:00
- Users familiar with Python can directly modify the LunaTranslator\LunaTranslator\postprocess\post.py file to implement custom processing.
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/10.jpg)
2024-07-03 17:24:13 +08:00
## Dictionary Settings
2024-07-03 17:24:13 +08:00
With a dictionary configured, LunaTranslaotr can help you in your Japanese learning:
2024-07-03 17:24:13 +08:00
- MeCab setup + "Show Word Segmentation": Displays word boundaries (tokenization)
- MeCab + "Show Furigana": Applies furigana to kanji
- MeCab + "Show Different Colors for Parts of Speech": Highlights grammatical elements
- "Quick Word Lookup": Enables click-to-translate in the translation window
2024-07-03 17:24:13 +08:00
Note: Without MeCab, a basic built-in tokenizer will be used, providing limited furigana and segmentation without part-of-speech distinction.
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/cishu.jpg)
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/fenci.jpg)
![img](https://image.lunatranslator.xyz/zh/searchword.jpg)
![img](https://image.lunatranslator.xyz/zh/searchword2.jpg)
2024-07-03 17:24:13 +08:00
## Resource Download and Update
2024-07-03 17:24:13 +08:00
Automatic updates and links to commonly used resources.
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/down.jpg)
2024-07-03 17:24:13 +08:00
## Hotkey Settings
2024-07-03 17:24:13 +08:00
Enable the use of hotkeys, where you can activate and configure specific hotkey settings as desired.
2024-07-03 17:24:13 +08:00
2024-07-08 15:32:57 +08:00
![img](https://image.lunatranslator.xyz/zh/quick.jpg)