https://github.com/openttd/nile-tools
A tool to import OpenTTD's language files into nile
https://github.com/openttd/nile-tools
Last synced: 3 months ago
JSON representation
A tool to import OpenTTD's language files into nile
- Host: GitHub
- URL: https://github.com/openttd/nile-tools
- Owner: OpenTTD
- License: mit
- Created: 2024-04-13T14:27:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-02T18:57:26.000Z (about 1 year ago)
- Last Synced: 2025-01-04T14:44:34.838Z (5 months ago)
- Language: Rust
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nile tools
This repository contains various of tools to help `nile` with importing/exporting OpenTTD's language files.
## Importing english
For `english`, it simply converts the OpenTTD `.txt` format into `JSON`, by splitting up the string and English text.
Additionally, it uses `git blame` to find the "version" of each string (where "version" here is the hash of the commit that last changed the string).This importing can be done on regular intervals, to always feed `nile` the latest `english`.
## Importing other languages
For other languages, it does the same, except for "version".
Here it uses `git blame` to find which commit changed the translation, then uses `git blame` on the `english.txt` to find the "version" of the base string.
This is a good approximation of what version of the string was translated.This is normally only done once, when a new project is switched over to `nile`.
## Installation
Have Rust [installed](https://www.rust-lang.org/tools/install).
## Development
```bash
cargo run -- -p
```