mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-01-19 18:00:11 +03:00
Add comprehensive translation documentation
Co-authored-by: chipitsine <2217296+chipitsine@users.noreply.github.com>
This commit is contained in:
176
TRANSLATION_GUIDE.md
Normal file
176
TRANSLATION_GUIDE.md
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
# SoftEther VPN Translation Guide
|
||||||
|
|
||||||
|
This guide explains how to contribute translations to SoftEther VPN.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
SoftEther VPN supports multiple languages through string table (`.stb`) files. Each language has:
|
||||||
|
1. An entry in the language list file (`languages.txt`)
|
||||||
|
2. A complete string table file (`strtable_<lang>.stb`)
|
||||||
|
|
||||||
|
Currently supported languages:
|
||||||
|
- Japanese (ja)
|
||||||
|
- English (en)
|
||||||
|
- Simplified Chinese (cn)
|
||||||
|
- Traditional Chinese (tw)
|
||||||
|
- Korean (ko)
|
||||||
|
- Russian (ru)
|
||||||
|
- Portuguese-Brazil (pt_br)
|
||||||
|
- Indonesian (id)
|
||||||
|
- Turkish (tr)
|
||||||
|
|
||||||
|
## Adding a New Language
|
||||||
|
|
||||||
|
### Step 1: Add Language Entry
|
||||||
|
|
||||||
|
Edit `src/bin/hamcore/languages.txt` and add a new line with the following format:
|
||||||
|
|
||||||
|
```
|
||||||
|
<ID> <identifier> <English_Name> <Local_Name> <Windows_LCID> <UNIX_locales>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example (Turkish):**
|
||||||
|
```
|
||||||
|
8 tr Turkish Türkçe 1055 tr,tr_tr,turkish
|
||||||
|
```
|
||||||
|
|
||||||
|
**Fields explained:**
|
||||||
|
- **ID**: Sequential number (use the next available number)
|
||||||
|
- **identifier**: Short language code (e.g., `tr`, `de`, `fr`)
|
||||||
|
- **English_Name**: Language name in English (use underscores for spaces, e.g., `Simplified_Chinese`)
|
||||||
|
- **Local_Name**: Language name in its native script (e.g., `Türkçe`, `Deutsch`)
|
||||||
|
- **Windows_LCID**: Windows locale ID(s) - comma-separated if multiple (find your LCID at https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/)
|
||||||
|
- **UNIX_locales**: Comma-separated list of UNIX locale identifiers that should map to this language
|
||||||
|
|
||||||
|
### Step 2: Create String Table File
|
||||||
|
|
||||||
|
1. Copy the English string table as a template:
|
||||||
|
```bash
|
||||||
|
cp src/bin/hamcore/strtable_en.stb src/bin/hamcore/strtable_<your_lang>.stb
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Update the language metadata in your new file (lines 27-28):
|
||||||
|
```
|
||||||
|
LANG <your_language_ID>
|
||||||
|
LANGSTR <Your_Language_Name>
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Update the `DEFAULT_LOCALE` parameter (line 22) with localized weekday abbreviations:
|
||||||
|
```
|
||||||
|
DEFAULT_LOCALE - - $ : : $ Sun Mon Tue Wed Thu Fri Sat : : : $ (None)
|
||||||
|
```
|
||||||
|
Replace the weekday names and "(None)" with your language equivalents.
|
||||||
|
|
||||||
|
4. **Important**: Add the file to git using the `-f` flag (the hamcore directory is gitignored):
|
||||||
|
```bash
|
||||||
|
git add -f src/bin/hamcore/strtable_<your_lang>.stb
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 3: Translate Strings
|
||||||
|
|
||||||
|
Translate all string entries in the file. Each entry follows the format:
|
||||||
|
```
|
||||||
|
STRING_KEY Translated text here
|
||||||
|
```
|
||||||
|
|
||||||
|
**Important guidelines:**
|
||||||
|
- Keep the same `STRING_KEY` - only translate the value
|
||||||
|
- Preserve special formatting like `%s`, `%d`, `\r`, `\n` in the translations
|
||||||
|
- Some strings contain placeholders - maintain their order and format
|
||||||
|
- Technical terms (like "VPN", "SSL", "IPsec") are often kept in English
|
||||||
|
- Lines starting with `#` are comments and don't need translation
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
```
|
||||||
|
# Original English:
|
||||||
|
ERR_1 Connection to the server failed. Check network connection.
|
||||||
|
|
||||||
|
# Turkish translation:
|
||||||
|
ERR_1 Sunucuya bağlantı başarısız oldu. Ağ bağlantısını kontrol edin.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Translation Workflow
|
||||||
|
|
||||||
|
### Best Practices
|
||||||
|
|
||||||
|
1. **Use a proper text editor** that supports UTF-8 encoding without BOM
|
||||||
|
2. **Translate in context** - understand what the UI looks like when possible
|
||||||
|
3. **Be consistent** - use the same translation for repeated terms
|
||||||
|
4. **Keep it concise** - UI space is limited
|
||||||
|
5. **Preserve formatting** - maintain line breaks, spacing, and special characters
|
||||||
|
6. **Test your work** - if possible, build and test the software with your translation
|
||||||
|
|
||||||
|
### Progressive Translation
|
||||||
|
|
||||||
|
You don't need to translate everything at once! You can:
|
||||||
|
|
||||||
|
1. Start with the most important strings (error messages, main UI elements)
|
||||||
|
2. Leave less critical strings in English temporarily
|
||||||
|
3. Submit incremental improvements via pull requests
|
||||||
|
4. Collaborate with other translators for your language
|
||||||
|
|
||||||
|
## Validating Your Translation
|
||||||
|
|
||||||
|
Before submitting, verify your translation passes the consistency checker:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd developer_tools/stbchecker
|
||||||
|
dotnet run /path/to/SoftEtherVPN/src/bin/hamcore
|
||||||
|
```
|
||||||
|
|
||||||
|
This tool checks that:
|
||||||
|
- All string keys from other language files are present
|
||||||
|
- No extra or missing keys exist
|
||||||
|
- The file format is correct
|
||||||
|
|
||||||
|
**The checker must pass with "OK: Excellent! There are no errors" before submitting.**
|
||||||
|
|
||||||
|
## Submitting Your Translation
|
||||||
|
|
||||||
|
1. Fork the SoftEther VPN repository on GitHub
|
||||||
|
2. Create a new branch for your translation
|
||||||
|
3. Make your changes following the steps above
|
||||||
|
4. Commit your changes with a clear message:
|
||||||
|
```bash
|
||||||
|
git commit -m "Add [Language] translation"
|
||||||
|
# or
|
||||||
|
git commit -m "Update [Language] translation"
|
||||||
|
```
|
||||||
|
5. Push to your fork and create a Pull Request
|
||||||
|
6. In the PR description, mention:
|
||||||
|
- Which language you've added/updated
|
||||||
|
- Your native language proficiency
|
||||||
|
- Any areas you'd like feedback on
|
||||||
|
|
||||||
|
## Getting Help
|
||||||
|
|
||||||
|
- **Questions about translation**: Open an issue on GitHub with the tag `translation`
|
||||||
|
- **Technical questions**: Refer to the main README.md
|
||||||
|
- **String context unclear**: Ask in your Pull Request or open an issue
|
||||||
|
|
||||||
|
## Special Notes
|
||||||
|
|
||||||
|
### Font Settings
|
||||||
|
|
||||||
|
Some languages may need specific fonts. Update these if needed (lines 18-21):
|
||||||
|
```
|
||||||
|
DEFAULT_FONT Tahoma
|
||||||
|
DEFAULT_FONT_WIN7 Segoe UI
|
||||||
|
DEFAULT_FONT_2 Tahoma
|
||||||
|
DEFAULT_FONT_SIZE 8
|
||||||
|
```
|
||||||
|
|
||||||
|
### Character Encoding
|
||||||
|
|
||||||
|
All `.stb` files must be UTF-8 encoded. The system will automatically convert to the appropriate encoding for each platform.
|
||||||
|
|
||||||
|
### Regional Variants
|
||||||
|
|
||||||
|
For languages with significant regional differences (like Portuguese/Brazilian Portuguese), create separate entries:
|
||||||
|
- Use descriptive identifiers (e.g., `pt_br` vs `pt_pt`)
|
||||||
|
- Add both LCID codes if they differ
|
||||||
|
- Make the distinction clear in both English and local names
|
||||||
|
|
||||||
|
## Thank You!
|
||||||
|
|
||||||
|
Your translation helps make SoftEther VPN accessible to users worldwide. The community appreciates your contribution!
|
||||||
62
TURKISH_TRANSLATION.md
Normal file
62
TURKISH_TRANSLATION.md
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# Turkish Translation Status
|
||||||
|
|
||||||
|
The Turkish (Türkçe) language infrastructure has been added to SoftEther VPN.
|
||||||
|
|
||||||
|
## Current Status
|
||||||
|
|
||||||
|
- ✅ Language entry added to `languages.txt` (ID: 8, identifier: `tr`)
|
||||||
|
- ✅ String table file created: `strtable_tr.stb`
|
||||||
|
- ✅ File structure validated with stbchecker
|
||||||
|
- ⚠️ **Translation needed**: The file currently contains English text as placeholders
|
||||||
|
|
||||||
|
## How to Contribute
|
||||||
|
|
||||||
|
The Turkish string table (`src/bin/hamcore/strtable_tr.stb`) currently uses English text. We need native Turkish speakers to translate these strings.
|
||||||
|
|
||||||
|
### For Contributors
|
||||||
|
|
||||||
|
If you'd like to help with the Turkish translation:
|
||||||
|
|
||||||
|
1. See [TRANSLATION_GUIDE.md](TRANSLATION_GUIDE.md) for detailed instructions
|
||||||
|
2. The main file to translate is: `src/bin/hamcore/strtable_tr.stb`
|
||||||
|
3. It contains approximately 7,400+ lines, but many are comments or formatting
|
||||||
|
4. You can contribute partial translations - every bit helps!
|
||||||
|
|
||||||
|
### Quick Start
|
||||||
|
|
||||||
|
1. Fork this repository
|
||||||
|
2. Open `src/bin/hamcore/strtable_tr.stb`
|
||||||
|
3. Translate the text values (keep the keys unchanged)
|
||||||
|
4. Run the validation tool:
|
||||||
|
```bash
|
||||||
|
cd developer_tools/stbchecker
|
||||||
|
dotnet run ../../src/bin/hamcore
|
||||||
|
```
|
||||||
|
5. Submit a Pull Request with your translations
|
||||||
|
|
||||||
|
### Translation Guidelines
|
||||||
|
|
||||||
|
- Keep technical terms like "VPN", "SSL", "TCP/IP" in English
|
||||||
|
- Preserve formatting codes like `%s`, `%d`, `\r\n`
|
||||||
|
- Maintain the same meaning and tone as the English version
|
||||||
|
- Use formal Turkish ("siz" form) for user-facing messages
|
||||||
|
- Be consistent with terminology throughout
|
||||||
|
|
||||||
|
### Already Translated
|
||||||
|
|
||||||
|
The following metadata has been localized:
|
||||||
|
- Language identifier: Turkish
|
||||||
|
- Language ID: 8
|
||||||
|
- Weekday abbreviations: Paz, Pzt, Sal, Çar, Per, Cum, Cmt
|
||||||
|
- "None" translated to "Hiçbiri"
|
||||||
|
|
||||||
|
## Questions?
|
||||||
|
|
||||||
|
If you have questions about the translation:
|
||||||
|
- Open an issue on GitHub
|
||||||
|
- Tag it with `translation` and `Turkish`
|
||||||
|
- Reference this file or the main TRANSLATION_GUIDE.md
|
||||||
|
|
||||||
|
## Thank You!
|
||||||
|
|
||||||
|
Thank you to VamHunD and all contributors who help make SoftEther VPN accessible to Turkish users!
|
||||||
Reference in New Issue
Block a user