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.4.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.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sandrock_translator-1.0.4.tar.gz
Algorithm Hash digest
SHA256 aac1753c0d42aa43f94d9f3b7695c8034f6eeea1993e7ad661260654c0c3464e
MD5 371bd073781ad8613acc95ba5fdcec4d
BLAKE2b-256 bf02ebe9f51ee16bab1e861c0384a435fecdc63c7628e93c88d70476ad289a00

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for sandrock_translator-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6a16aa0137dc4af266f53e99ba2d2b3b75b36dd125734f09ee91592be1293740
MD5 c08364dd9ffd1d51b5b66279dc89c3cb
BLAKE2b-256 6ecfa7783c4f3e8634fdeebef91983a5ce9acacdee513be2c1091ddc6a4eb07b

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