Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 string

This 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)!