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.3.tar.gz (7.1 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.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sandrock_translator-1.0.3.tar.gz
  • Upload date:
  • Size: 7.1 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.3.tar.gz
Algorithm Hash digest
SHA256 1bcf2d6303abc32966c9baca99a3bbe8b1402b14f14ed7410ad3d2883c70981c
MD5 e66c809d5415e2a40d26a565d3bc5a16
BLAKE2b-256 8b09bbddee3a7b81b7ded6e81380632bf303bde61394aab2331917a928d330bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sandrock_translator-1.0.3-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.6 Linux/6.7.0-arch3-1

File hashes

Hashes for sandrock_translator-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7f86f4fea205dda425d57bcecdba6d9d472323e05d45f5cd5bd5f1e1c8db34ae
MD5 417df16f98c69f1765e900aa274dd85b
BLAKE2b-256 69f141f60b3bca2e390c90ae7ec04e9cb80069c31cf12ac17502c678e3e004ca

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