{"id":16876264,"url":"https://github.com/coolcat467/localization-translation-utility","last_synced_at":"2025-10-24T14:03:14.276Z","repository":{"id":45797843,"uuid":"322919282","full_name":"CoolCat467/Localization-Translation-Utility","owner":"CoolCat467","description":"Script for simplifying the process of translating MineOS Language (.lang) files","archived":false,"fork":false,"pushed_at":"2025-04-07T21:17:44.000Z","size":425,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T22:26:47.134Z","etag":null,"topics":["coolcat467","json","language","language-resources","mineos","opencomputers","python3","translate","translation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CoolCat467.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-19T19:07:37.000Z","updated_at":"2025-03-01T23:09:47.000Z","dependencies_parsed_at":"2024-01-02T00:59:09.436Z","dependency_job_id":"7898f5d8-4798-47b0-bd49-0624fdf144de","html_url":"https://github.com/CoolCat467/Localization-Translation-Utility","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoolCat467%2FLocalization-Translation-Utility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoolCat467%2FLocalization-Translation-Utility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoolCat467%2FLocalization-Translation-Utility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoolCat467%2FLocalization-Translation-Utility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoolCat467","download_url":"https://codeload.github.com/CoolCat467/Localization-Translation-Utility/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248384101,"owners_count":21094672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coolcat467","json","language","language-resources","mineos","opencomputers","python3","translate","translation"],"created_at":"2024-10-13T15:38:49.231Z","updated_at":"2025-10-24T14:03:14.269Z","avatar_url":"https://github.com/CoolCat467.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Localization-Translation-Utility\nScript for simplifying the process of translating Language (.lang) files\n\n\u003c!-- BADGIE TIME --\u003e\n\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/CoolCat467/Localization-Translation-Utility/main.svg)](https://results.pre-commit.ci/latest/github/CoolCat467/Localization-Translation-Utility/main)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n\n\u003c!-- END BADGIE TIME --\u003e\n\nSupports MineOS lang files, which is the main purpose of this project's existence\n\n## Installation\n```console\npip install git+https://github.com/CoolCat467/Localization-Translation-Utility.git\n```\n\n## Usage\nWARNING: Creating hundreds of new files takes up a lot of space on your computer!\nThis program may require more than 3.5 MB to store the new localizations alone!\n\n```console\n\u003e mineos_translate\nusage: mineos_translate [-h] [-V] [-u | -b | -l] [-f FILENAME] [-k KEY]\n\noptions:\n  -h, --help            show this help message and exit\n  -V, --version         show program's version number and exit\n  -u, --unhandled       Translate unhandled languages\n  -b, --broken          Translate broken values\n  -l, --lolcat          Translate to lolcat\n\n  -f FILENAME, --filename FILENAME\n  -k KEY, --key KEY\n```\n\nWhen run with any valid option, program will download `Installer/Files.cfg` from\nMineOS repo, save downloaded files to `mineos_cache` folder it creates in the current working directory,\nand save translated results in `mineos_upload` folder it creates in the current working directory.\n\n### Unhandled mode\nFor every language code in `languages.py` (from https://github.com/ssut/py-googletrans/blob/master/googletrans/constants.py)\nit will use google translate with different user agents from `agents.py` (from\nhttps://github.com/Animenosekai/useragents/blob/main/pyuseragents/data/list.py) to translate\nthe English localization to that language and save the new file in the `mineos_upload` folder\nit creates.\n\n### Broken mode\nFor all existing localization files, if the value is identical to the value the English localization uses,\ntranslate the value from the English localization to that language using google translate and save new file\nin the `mineos_upload` folder it creates.\n\n### Lolcat mode\nFor all localization directories, if an English localization exists and there is not a Lolcat translation,\nuse web scraper to talk to `funtranslations.com/lolcat` and translate the English localization to Lolcat\nand save new file in the `mineos_upload` folder the program creates.\n\n### Translating a new key for a specific program\nPass the filename and key parameters and the program will get the English localization of the program specified\nby the folder given as the `filename` input and will use google translate to translate the localization\nkey specified by the `key` parameter. New files saved in the `mineos_upload` folder the program creates.\n\n\nGeneral code layout:\n\n`cli.py` is the command line interface handler.\n\n`mineos_auto_trans.py` is the glue holding everything together.\n\n`convert.py` handles making MineOS `.lang` and `.cfg` files json-parsable and translating\nentire files at once.\n\n`translate.py` handles talking to Google Translate\n\n`extricate.py` (name means taking apart and putting back together) is used by the translation\nmodule to split dictionaries into a keys list and a values list so it can translate all the\nvalues and then rebuild the dictionary by re-combining the keys list and the new translated\nvalues list.\n\n`agents.py` from https://github.com/Animenosekai/useragents/blob/main/pyuseragents/data/list.py\nis by Anime no Sekai and has a ton of random user agents to use so Google Translate\ndoesn't get suspicious of us sending tens of thousands of requests without an API key\n\n`languages.py` from https://github.com/ssut/py-googletrans/blob/master/googletrans/constants.py\nis by ssut and has a giant dictionary of language names matched with ISO 639-1:2002 language codes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolcat467%2Flocalization-translation-utility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolcat467%2Flocalization-translation-utility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolcat467%2Flocalization-translation-utility/lists"}