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 -r ./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.0.1.tar.gz (6.8 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.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sandrock_translator-1.0.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.7.0-arch3-1

File hashes

Hashes for sandrock_translator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a03cc71a9e0f9868d7ca6c642a2821dabd807e4f3a4d5cb620d6a23440745870
MD5 630e625d456268fe69f1e039fdec5d93
BLAKE2b-256 81db1d64412d22e7575513b31290effda98096367d843ee82498b855893bb9c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sandrock_translator-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.7.0-arch3-1

File hashes

Hashes for sandrock_translator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17524b64c18aa155bc4e5e4a220f2a7075166adbc3f74a49698aea6c79f2ff5a
MD5 7e88192e17b5eb1a506cfa1275500da2
BLAKE2b-256 d1bd5bdd985d6a4c1006d9bd34196824417792d2ba567ff3af408d969ec291f1

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