Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexcg1/i18n_string_remover
Remove strings from JSON if they have been modified in a diff
https://github.com/alexcg1/i18n_string_remover
Last synced: 16 days ago
JSON representation
Remove strings from JSON if they have been modified in a diff
- Host: GitHub
- URL: https://github.com/alexcg1/i18n_string_remover
- Owner: alexcg1
- Created: 2023-08-03T11:49:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-14T12:51:30.000Z (over 1 year ago)
- Last Synced: 2024-10-17T08:08:43.641Z (about 1 month ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This script aims to simplify automatic translation of i18n strings:
- Looks at a commit (based on a hash)
- For each JSON file in the commit, examines all the changed keys, and stores them in the list `keys`
- For each language (from a list of strings), change the language's JSON file and set the value of each key in `keys` to an empty stringThis then lets the CI auto-rebuild translations without interfering with existing manually edited translations
## Install
```
pip install -r requirements
```## Usage
1. Enter the directory of this repo
2. `ln -s .`
3. Run `python app.py `For safety's sake, this repo doesn't make commits or push anything to git. That's for you to do (and get the blame for if anything goes wrong)!