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.0.2.tar.gz (7.0 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.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sandrock_translator-1.0.2.tar.gz
  • Upload date:
  • Size: 7.0 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.2.tar.gz
Algorithm Hash digest
SHA256 f2148782bf07a584531169b0eecdf60fd47a3aecc041e57bd83ef1497f287cf0
MD5 6569f97f8023c3fba49be57058476b3c
BLAKE2b-256 955d896ab09145ef59c32983e5aea3356f407a15e7f8ec39ba051ca3709dccf3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sandrock_translator-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 abdfec30a72d65b79b9a83eb8406994a283aa9b2cfe4592f371da5c5bd7dd435
MD5 04653a1c77e3568baf42bd5cbf70869d
BLAKE2b-256 cbae518d540f0334f63e222df9595ea5f86d56251facb70b5bfbff606c7ea1c1

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