-
Notifications
You must be signed in to change notification settings - Fork 166
[EN] Chinese Localization Workflow
We joined the TerraFirmaGreg-Translation-CN organization to collectively maintain a Github repository. Each contributor also maintains their own fork.
The repository primarily uses 2 branches: dev and translate/zh_cn
- The
translate/zh_cnbranch is where we submit our translations daily. After completing their translations, contributors either git push directly or submit a PR to this branch. -
devis a protected branch. It does not accept PRs from other repositories directly, only Merge Requests from thetranslate/zh_cnbranch within this repository. I review all MRs (including in-game checks). - After translation and proofreading are complete, the content is finally submitted via a PR to the upstream repository's
devbranch. - We use pull to sync content from the upstream repository. This step does not require review.
- Do not translate
tfg/en_us/ore_veins.jsondirectly. It is generated fromhttps://github.com/TerraFirmaGreg-Team/Tools-Modern/tree/dev/OresToFieldGuide/data, translate it here.
We use a Paratranz project as a collaborative translation tool. We have also developed a Java desktop application called TransSync for bidirectional synchronization, which is currently manual. However, it also supports command-line mode for potential automation.
- Clone/Pull the Tools-Modern and Modpack-Modern repositories locally.
- Upload Source Files: Upload the English (en_us) files from the
translate/zh_cnbranch toParatranz. This step is typically performed after updates from the upstream repository. - Perform translation work within
Paratranz. This step involves three statuses: "Translate", "Checked", and "Reviewed". We generally only download content from Paratranz to the local repository when it reaches the "Checked" status. - Download Translations: Download the translated and checked files from
Paratranzto the local repository'stranslate/zh_cnbranch, then push them to the remote. - Submit an MR from the
translate/zh_cnbranch to thedevbranch.
In the configuration of the TransSync tool, we set some ignores so that files which haven't finished translation are skipped during the download.
{
"token": "Your Paratranz Token",
"projectId": 0,// Your Project Id
"httpLogLevel": "BODY",
"workspace": "/Users/yan/repo/tfg",
"rules": [
{
"enabled": true,
"sourcePattern": "Tools-Modern/LanguageMerger/LanguageFiles/**/en_us/*.json",
"translationPattern": "%original_path_pre%/%language%/%original_path%/%original_file_name%",
"srcLang": "en_us",
"destLang": "zh_cn",
"ignores": [
"tfg/en_us/ore_veins.json"
]
},
{
"enabled": false,
"sourcePattern": "Modpack-Modern/kubejs/assets/tfc/patchouli_books/field_guide/en_us/**.json",
"translationPattern": "%original_path_pre%/%language%/%original_path%/%original_file_name%",
"srcLang": "en_us",
"destLang": "zh_cn",
"ignores": [
"**/tfg_ores/*_index.json"
]
},
{
"enabled": true,
"sourcePattern": "Tools-Modern/LanguageMerger/LanguageFiles/tfg/en_us/Quests/*.json",
"translationPattern": "%original_path_pre%/%language%/%original_path%/%original_file_name%",
"srcLang": "en_us",
"destLang": "zh_cn",
"ignores": []
}
]
}After contributors download the translations from Paratranz to their local repository, they can use the LanguageSync tool for in-game checking.
It's a command-line tool requiring Java 17 or higher. Its purpose is to copy all language files for a specified language (e.g., zh_cn) from the Tools-Modern repository to the game's kubejs/assets/*/lang/ directory.
On Windows, I write a batch file and double-click to execute it before each in-game check. On MacOS, it's a shell script, with no significant difference.
java -jar E:\repo\Tools-Modern\LanguageSync\langsync-1.0.0-jar-with-dependencies.jar assembly -l zh_cn -w E:\repo -o E:\HMCL-3.6.12\.minecraft\versions\TerraFirmaGreg-Modern-0.11.7Parameters:
-w --workspace: The folder where you put Tools-Modern in.
-l --language: The target language you want to upgrade or assembly.
-o --output: The folder you want to write in.
Once all content submitted to the dev branch has been reviewed and checked, submit a PR to the official repository. Wait for review by the 2 administrators. If there are no major issues with the files, the process is complete.
│
├─ Upgrade Guides
│ │
│ ├─ 0.7 to 0.9 [EN] [CN]
│ │
│ ├─ 0.9 to 0.10 [EN] [CN]
│ │
│ └─ 0.10 to 0.11 [EN] [CN]
│
│
├─ Major Changelogs
│ │
│ ├─ Update 0.10 [EN] [CN]
│ │
│ └─ Update 0.11 [EN] [CN]
│
│
├─ Developer Information
│ │
│ ├─ Cheat Sheet [EN] [CN]
│ │
│ ├─ Pixel Comp. [EN] [CN]
│ │
│ ├─ Kubejs Scripts [EN] [CN]
│ │
│ ├─ Worldgen [EN] [CN]
│ │
│ └─ Paratranz Loc. Workflow [EN] [CN]
│
│
└─ Modpack Information
│
└─ Optional Mods [EN] [CN]