Translation Toolkit 3DS: Difference between revisions

From GameBrew
(Created page with "{{Infobox-3DS-Homebrews | title = TranslationToolkit | image = https://dlhb.gamebrew.org/3dshomebrew/TranslationToolkit-3DS.jpg|250px | type = Hack Utilities | version = v2.7....")
 
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox-3DS-Homebrews
{{Infobox 3DS Homebrews
| title = TranslationToolkit
|title=TranslationToolkit
| image = https://dlhb.gamebrew.org/3dshomebrew/TranslationToolkit-3DS.jpg|250px
|image=Translationtoolkit3ds2.png
| type = Hack Utilities
|description=A command line interface to simplify the workflow for translating 3DS games and releasing patches.
| version = v2.7.1
|author=Ich73
| lastupdated = 2021/08/25
|lastupdated=2023/01/21
| licence = Mixed
|type=Hack Utilities
| author = Ich73
|version=2.7.3
| website = https://github.com/Ich73/TranslationToolkit
|license=Mixed
| download = https://dlhb.gamebrew.org/3dshomebrew/TranslationToolkit-3DS.rar
|download=https://dlhb.gamebrew.org/3dshomebrews/translationtoolkit3ds.7z
| source = https://github.com/Ich73/TranslationToolkit
|website=https://github.com/Ich73/TranslationToolkit
|source=https://github.com/Ich73/TranslationToolkit
}}
}}
<youtube></youtube>
[![](https://img.shields.io/github/v/release/Ich73/TranslationToolkit?include_prereleases&label=Release)](https://github.com/Ich73/TranslationToolkit/releases/latest)
[![](https://img.shields.io/github/downloads/Ich73/TranslationToolkit/total?label=Downloads)](https://github.com/Ich73/TranslationToolkit/releases)
[![](https://img.shields.io/github/license/Ich73/TranslationToolkit?label=License)](/LICENSE)
# Translation Toolkit
Translation Toolkit is a command line interface to simplify the workflow for translating 3DS games and releasing patches.
Translation Toolkit is a command line interface to simplify the workflow for translating 3DS games and releasing patches.


It uses the following tools:
It uses the following tools:
* [xdelta](https://github.com/jmacd/xdelta-gpl) ([v3.1.0](https://github.com/jmacd/xdelta-gpl/releases/tag/v3.1.0))
* [[xdelta|xdelta]] ([https://github.com/jmacd/xdelta-gpl/releases/tag/v3.1.0 v3.1.0])
* [3dstool](https://github.com/dnasdw/3dstool) ([v1.1.0](https://github.com/dnasdw/3dstool/releases/tag/v1.1.0))
* [[3dstool_by_dnasdw_3DS|3dstool]] ([https://github.com/dnasdw/3dstool/releases/tag/v1.1.0 v1.1.0])
* [ctrtool](https://github.com/3DSGuy/Project_CTR) ([v0.7](https://github.com/3DSGuy/Project_CTR/releases/tag/ctrtool-v0.7))
* [[Project CTR 3DS|ctrtool]] ([https://github.com/3DSGuy/Project_CTR/releases/tag/ctrtool-v0.7 v0.7])
* [makerom](https://github.com/3DSGuy/Project_CTR) ([v0.17](https://github.com/3DSGuy/Project_CTR/releases/tag/makerom-v0.17))
* [[Project CTR 3DS|makerom]] ([https://github.com/3DSGuy/Project_CTR/releases/tag/makerom-v0.17 v0.17])
## Using Translation Toolkit
 
You can download the newest version as an executable from the [Release Page](https://github.com/Ich73/TranslationToolkit/releases/latest). Extract the archive and copy `TranslationToolkit.exe` to the root of your translation directory and run it.
==Features==
## Scripts
* Scripts options:
### Apply Patches (AP)
** Apply Patches (AP).
This script is used to apply `.xdelta`, `.patJ` and `.patE` patches to all files from the original game.
** Create Patches (CP).
** Distribute (D).
** Send via FTP (S).
** Send to Citra (SC).
** Setup Workspace (SW).
** Update Workspace (UW).
** Release Patches (RP).
** Replace Files (RF).
** Create Saves (CS).
** Extract Game (EG).
** Rebuild Game (RG).
* Combinations:
** Distribute & Send via FTP (DS).
** Distribute & Send to Citra (DSC).
 
==Installation==
Download contains the following prebuilt binaries:
* win_i686 - For 32-bit Windows.
* win_x86_64 - For 64-bit Windows.
* linux_x86_64 - For and 64-bit Linux.
 
Extract the archive and copy <code>TranslationToolkit.exe</code> to the root of your translation directory and run it.
 
[https://github.com/Ich73/TranslationToolkit/blob/master/README.md#using-translation-toolkit Using Translation Toolkit.]
 
==Screenshot==
https://dlhb.gamebrew.org/3dshomebrews/translationtoolkit3ds3.png


It searches internally specified folders using the naming scheme `<folder>_<language>` (e.g. `Layout_EN`) for patches and applies them to the files with matching names from the folder `<folder>_<originalLanguage>` (e.g. `Layout_JA`).
==Changelog==
A `<file>.<ext>.xdelta` patch will create `<file>.<ext>`, a `<file>.patJ` patch will create `<file>.binJ` and update `<file>.savJ` if found and a `<file>.patE` patch will create `<file>.e` and update `<file>.savE` if found.
'''v2.7.3'''
Only files with a different hash will be overriden by default. The default original language is `JA`.
* Internal changes.


_Options:_
'''v2.7.2'''
* `-f`: Force overriding all files even if their hashes match (e.g. `AP -f`).
* Change update behaviour for tools.
* `-o=<XY>`: Set the original language to `<XY>` (e.g. `AP -o=JA`).
### Create Patches (CP)
This script is used to create `.xdelta`, `.patJ` and `.patE` patches for all edited game files.


It searches internally specified folders using the naming scheme `<folder>_<language>` (e.g. `Layout_EN`) for edited files and creates patches using the files with matching names from the folder `<folder>_<originalLanguage>` (e.g. `Layout_JA`).
'''v2.7.1'''
A `<file>.<ext>` file will create a `<file>.<ext>.xdelta` patch, a `<file>.savJ` project file will create a `<file>.patJ` patch and a `<file>.savE` project file will create a `<file>.patE` patch. If no `<file>.savJ` or `<file>.savE` project file is found `<file>.binJ` and `<file>.e` files are used to create the patch.
* Add option to enter a local zip file instead of an url to SW and UW script.
Only patches with a different hash will be overriden by default. The default original language is `JA`.
_Options:_
* `-f`: Force overriding all patches even if their hashes match (e.g. `CP -f`).
* `-o=<XY>`: Set the original language to `<XY>` (e.g. `CP -o=JA`).
### Distribute (D)
This script is used to copy all edited game files to a folder that matches the file structure of an extracted `.cia` or `.3ds` file. You can use this to either copy it to your extracted game to create a patched `.cia` or `.3ds` file, or use the `S` script to send the files to your 3DS so [Luma](https://github.com/LumaTeam/Luma3DS) can patch them.


The script requires you to specify a single language (e.g.`EN`) or multiple languages (e.g. `DE,EN`) to distribute. If you specify multiple languages the translations of the first language are used whenever possible. The other languages are used when translations are missing. This works line-by-line for `.binJ` files (if `.patJ` files are found) and file-by-file for all other file types.
'''v2.7.0'''
Additionally you need to specify a version. If you choose the original version (`v1.0`) only those files are being distributed. If you chose an updated version (e.g. `v1.1`) the files from the original version and the updated files will be distributed.
* Add CS script.
The third value is the directory you want the files to be distributed to.
* Remove UD script.


The script only overrides files with a different hash by default. The default original language is `JA`.
'''v2.6.0'''
_Options:_
* Add support for Linux.
* `-f`: Force overriding all files even if their hashes match (e.g. `D -f`).
* Add EG and RG scripts.
* `-o=<XY>`: Set the original language to `<XY>` (e.g. `D -o=JA`).
* Add DS and DSC combination scripts.
### Send via FTP (S)
This script is used to send the with the `D` script generated folder to 3DS so [Luma](https://github.com/LumaTeam/Luma3DS) can patch the game. For this to work your 3DS needs a FTP Server application, for example [FTPD](https://github.com/mtheall/ftpd), and your 3DS and your PC need to be connected to the same network.


The script requires you to specify the following values to properly send the files:
'''v2.5.0'''
* `Folder`: The folder generated by the `D` script.
* Add support for .ttparams configuration file.
* `Title ID`: The ID of the game you want to patch.
* Add support for 32-bit Windows.
* `3DS IP`: The local IP address of your 3DS. FTPD displays it on the top screen (e.g. **[192.168.1.1]**:5000).
* `Port`: The port the FTP Server is listening. FTPD displays it on the top screen (e.g. [192.168.1.1]:**5000**).
* `User`: The registered username. In FTPD you can configure this in the settings by opening the Menu (Y) and selecting Settings. (This can be left blank to connect unauthorized.)
* `Password`: The registered password. This value can be configured the same way as the username can. (This can be left blank to connect unauthorized.)
The script only overrides files when they are newer than the files on the 3DS by default. Make sure your computer and the 3DS are set to the same time and date.


_Options:_
'''v2.4.0'''
* `-f`: Force overriding all files even if the timestamp is newer (e.g. `S -f`).
* Auto-download for xdelta and 3dstool.
### Send to Citra (SC)
* Add support for missing files and icon patching.
This script is used to send the with the `D` script generated folder to [Citra](https://citra-emu.org/)'s mod folder.
* Improve CP script for binJ and e files.
* Update xdelta version for smaller patch files.
* Add support for custom Citra mod folders.


The script requires you to specify the following values to properly send the files:
'''v2.3.0'''
* `Folder`: The folder generated by the `D` script.
* Add SC script.
* `Title ID`: The ID of the game you want to patch.
* Config save folder per language and version in D script.
_Options:_
* Parameter input checks that directories exist.
* `-f`: Force overriding all files even if their hashes match (e.g. `SC -f`).
* Fix bug in S script that caused files to be sent even though they didn't changed.
### Setup Workspace (SW)
This script is used to download the latest patches from the repository, copy the required original files from the extracted CIA and run the `AP` script.


The script requires you to specify the following values:
'''v2.2.0'''
* `Download URL or Zip File`: The url for downloading all patches as a zip file, or the full path to a local zip file.
* Add RP script.
* `CIA Folder`: The folder containing the extracted CIA file.
* Shorten descriptions to show all scripts in menu.
_Options:_
* `-f`: Force overriding all files even if their hashes match (e.g. `SW -f`).
* `-o=<XY>`: Set the original language to `<XY>` (e.g. `SW -o=JA`).
### Update Workspace (UW)
This script is used to download the latest patches from the repository and run the `AP` script.


The script requires you to specify the following values:
'''v2.1.0'''
* `Download URL or Zip File`: The url for downloading all patches as a zip file, or the full path to a local zip file.
* Add support for multiple versions of a game.
_Options:_
* Add support for code patching in the S script.
* `-f`: Force overriding all files even if their hashes match (e.g. `UW -f`).
* Fix crash in D script.
* `-o=<XY>`: Set the original language to `<XY>` (e.g. `UW -o=JA`).
### Release Patches (RP)
This script is used to create `banner.xdelta`, `code.xdelta` and `RomFS.xdelta` patches by distributing the files for a given language and version and rebuilding the banner and romFS files.
The script requires you to specify the following values:
* `Language`: A single language (e.g.`EN`) or multiple languages (e.g. `DE,EN`) to distribute. More information can be found in the details of the `D` script.
* `Version`: The version to release patches for (e.g. `v1.0`, `v1.1`).
* `CIA Folder`: The folder containing the extracted CIA file to override. Do _not_ use the folder you used for the `SW` script, but a copy of it.
* `Patches File`: The archive file to write the patches to.
_Options:_
* `-o=<XY>`: Set the original language to `<XY>` (e.g. `RP -o=JA`).
### Replace Files (RF)
This script searches the given destination folder for files with the same name as the files in the given source folder and replaces them. This can be used to update multiple `.bclim` files at once when editing `.arc` files.
### Create Saves (CS)
This script is used to apply `.patJ` and `.patE` patches to all files from the original game in order to create `.savJ` and `.savE` files.
It can also be used to update the decoding tables used in those files by enabling the `-f` option.


It searches internally specified folders using the naming scheme `<folder>_<language>` (e.g. `Message_EN`) for patches and applies them to the files with matching names from the folder `<folder>_<originalLanguage>` (e.g. `Message_JA`).
'''v2.0.0'''
A `<file>.patJ` patch will create `<file>.savJ` and a `<file>.patE` patch will `<file>.savE`.
* Add support for e files.
No files will be overwritten by default. The default original language is `JA`.
* Add code patching.
* Add Hidden Scripts.


The script requires you to specify the following values:
'''v1.1.0'''
* `Table File`: The filename of the updated decoding table. This table will be stored inside the save files.
* Show summary at the end of each script.
* Add update checker.
* Allow FTP connection without Login.


_Options:_
==External links==
* `-f`: Force overriding all files even if they exist (e.g. `CS -f`).
* GitHub - https://github.com/Ich73/TranslationToolkit
* `-o=<XY>`: Set the original language to `<XY>` (e.g. `CS -o=JA`).
### Extract Game (EG)
This script is used to extract a `.cia` or `.3ds` file in order to use the extracted folder for the `SW` script.
The script requires you to specify the following values:
* `Game File`: The full path to the `.cia` or `.3ds` to extract.
* `Game Folder`: The full path to the folder the game should be extracted to. This folder can then be used by the `SW` script.
### Rebuild Game (RG)
This script is used to rebuild a `.cia` or `.3ds` file after using the `RP` script.
The script requires you to specify the following values:
* `Game Folder`: The full path to the folder containing the game files. The folder from the `RP` script can be used for it.
* `Game File`: The full path to the destination `.cia` or `.3ds` file to create.
* `CIA Version`: If you want to rebuild a `.cia` file you need to specify a version as a string (e.g. `v1.0.0`) or integer (e.g. `1024`).
### Distribute & Send via FTP (DS)
This script combines the `D` and `S` scripts.
### Distribute & Send to Citra (DSC)
This script combines the `D` and `SC` scripts.
## Configuring Translation Toolkit
When starting the program it searches for a file named `.ttparams` which defines the file structure of the game and the repository. If the file is missing default values will be used. It is a json file with the following, optional parameters:
* `SEP`: The separator token used in `.binJ` and `.e` files as a string of hexadecimal digits. More information can be found in [BinJ Format](https://github.com/Ich73/BinJEditor/wiki/BinJ-Format) and [E Format](https://github.com/Ich73/BinJEditor/wiki/E-Format).
Example: `"E31B"`
* `XDELTA`: The base names of the folders in the repository and the corresponding file extensions of game files inside those folders for which `.xdelta` patches should be used as an object from string to list of strings.
Example: `"Banner": [".bcwav", ".cbmd", ".cgfx"]`
* `PAT`: The base names of the folders in the repository and the corresponding type of file (`binJ` or `e`), game file extension, save file extension and patch file extension for which `.patJ` or `.patE` patches should be used as an object from string to list of strings.
Example: `"Message": ["binJ", ".binJ", ".savJ", ".patJ"]`
* `PARENT`: The base names of the folders in the repository mapped to the directories in the game files as an object from string to string.
Example: `"Banner": "ExtractedBanner"`
* `UPDATE_ACTIONS`: A list of operations that should be executed when the `UW` or `SW` script is called as a list of lists. Valid actions are:
* `rename-folder`: Rename the folders with the first argument as the base name to folders with the second argument as the base name.
Example: `["rename-folder", ["Code", "ExeFS"]]`
* `delete-folder`: Delete the folders with the argument as the base name.
Example: `["delete-folder", "Code"]`
## For Developers
### Setup
This program is written using [Python 3.8](https://www.python.org/downloads/release/python-383/). Addionally you need [`JTools.py`](https://github.com/Ich73/BinJEditor/blob/master/JTools.py) found in [BinJ Editor](https://github.com/Ich73/BinJEditor).
### Running
You can run the program by using the command `python TranslationToolkit.py`.
### Distributing
To pack the program into a single executable file, [pyinstaller](http://www.pyinstaller.org/) is needed. Simply run the command `pyinstaller TranslationToolkit.spec --noconfirm` and the executable will be created in the `dist` folder.


[[Category:3DS homebrew rom hacks]]
[[Category:3DS homebrew rom hacks]]
[[Category:Homebrew 3DS game hacks]]
[[Category:Homebrew 3DS game hacks]]

Latest revision as of 07:33, 1 February 2024

TranslationToolkit
Translationtoolkit3ds2.png
General
AuthorIch73
TypeHack Utilities
Version2.7.3
LicenseMixed
Last Updated2023/01/21
Links
Download
Website
Source

Translation Toolkit is a command line interface to simplify the workflow for translating 3DS games and releasing patches.

It uses the following tools:

Features

  • Scripts options:
    • Apply Patches (AP).
    • Create Patches (CP).
    • Distribute (D).
    • Send via FTP (S).
    • Send to Citra (SC).
    • Setup Workspace (SW).
    • Update Workspace (UW).
    • Release Patches (RP).
    • Replace Files (RF).
    • Create Saves (CS).
    • Extract Game (EG).
    • Rebuild Game (RG).
  • Combinations:
    • Distribute & Send via FTP (DS).
    • Distribute & Send to Citra (DSC).

Installation

Download contains the following prebuilt binaries:

  • win_i686 - For 32-bit Windows.
  • win_x86_64 - For 64-bit Windows.
  • linux_x86_64 - For and 64-bit Linux.

Extract the archive and copy TranslationToolkit.exe to the root of your translation directory and run it.

Using Translation Toolkit.

Screenshot

translationtoolkit3ds3.png

Changelog

v2.7.3

  • Internal changes.

v2.7.2

  • Change update behaviour for tools.

v2.7.1

  • Add option to enter a local zip file instead of an url to SW and UW script.

v2.7.0

  • Add CS script.
  • Remove UD script.

v2.6.0

  • Add support for Linux.
  • Add EG and RG scripts.
  • Add DS and DSC combination scripts.

v2.5.0

  • Add support for .ttparams configuration file.
  • Add support for 32-bit Windows.

v2.4.0

  • Auto-download for xdelta and 3dstool.
  • Add support for missing files and icon patching.
  • Improve CP script for binJ and e files.
  • Update xdelta version for smaller patch files.
  • Add support for custom Citra mod folders.

v2.3.0

  • Add SC script.
  • Config save folder per language and version in D script.
  • Parameter input checks that directories exist.
  • Fix bug in S script that caused files to be sent even though they didn't changed.

v2.2.0

  • Add RP script.
  • Shorten descriptions to show all scripts in menu.

v2.1.0

  • Add support for multiple versions of a game.
  • Add support for code patching in the S script.
  • Fix crash in D script.

v2.0.0

  • Add support for e files.
  • Add code patching.
  • Add Hidden Scripts.

v1.1.0

  • Show summary at the end of each script.
  • Add update checker.
  • Allow FTP connection without Login.

External links

Advertising: