Skip to main content

My Time At Sandrock translation parsing and machine translation tool

Project description

My Time At Sandrock translation tool

Description

sandrock-translator is a tool for translating localization files of My Time At Sandrock using popular translation API Google Translate. It handles two output formats for intermediate and final usage: JSON and Binary. JSON translation file can be used to manually fix context errors. JSON translation file as well as binary file can be used to replace text in original binary file, this technic is beneficial because some languages has longer words or contains multi-byte characters than original translation resulting in not fitting end results. This tool can't change original size of text string in bytes so those kind of workarounds were implemented.

Installation

Tool is published to PYPI, use for example PIP

pip install --user sandrock-translator

Example usage

Externalize translation strings from original binary file into editable JSON.

sandrock-translator -o json ./english ./english.json

Translate to Japanese and externalize translation strings into editable JSON.

sandrock-translator -o json -t jp ./thailand ./japanese.json

Use "thailand" translation file as origin and replace with our "japanese.json" strings into usable translation file.

sandrock-translator -vpr ./japanese.json ./thailand ./japanese

Translate Thai file into japanese language in one step.

sandrock-translator -t jp ./thailand ./japanese

Development

This project uses Poetry for Python project management. Poetry Project Site

Why Thai?

In short

You will fit longer words with non-latin characters.

Reason

I recommend "thailand" translation file as translation source for it's longest allowed string sizes in bytes. My Time At Sandrock uses UTF-8 encoded strings in translations and Thai has longest words with biggest width of Unicode encoding in bytes per character across available options.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sandrock_translator-1.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sandrock_translator-1.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file sandrock_translator-1.1.0.tar.gz.

File metadata

  • Download URL: sandrock_translator-1.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.2 Linux/6.5.0-0.deb12.4-amd64

File hashes

Hashes for sandrock_translator-1.1.0.tar.gz
Algorithm Hash digest
SHA256 cc30291c191d62e643752e1f2b4bbd1332af62a9f5bd5758dd5f9d041b9bb4f2
MD5 e4438dcdf6f2da871b1a279b6eb917d3
BLAKE2b-256 802f1e97798b9b5851c3727ff08fb797ef9d7a56afdca9d21403dede470d96b2

See more details on using hashes here.

File details

Details for the file sandrock_translator-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: sandrock_translator-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.2 Linux/6.5.0-0.deb12.4-amd64

File hashes

Hashes for sandrock_translator-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08d94234b9363f8e7e5dd43a115d60cbf26d56896a18482ee2224fe2b9e70219
MD5 46f7210b6daa699112226b95bfb3cdd7
BLAKE2b-256 af668283a605f9da7809b150891ec083c645ae8c96fb7ea3bda33be76038a286

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page