|
|
|
@ -8,19 +8,13 @@ The Python scripts are located in the `tools` directory. To run a script, use th
|
|
|
|
|
python3 ./tools/<script>.py
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If using macOS always run the script with the `--disable-concurrency` flag.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
python3 ./tools/<script>.py --disable-concurrency
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Most of these scripts can take arguments. To see the arguments for a script, use the following command:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
python3 ./tools/<script>.py --help
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Utiltiy
|
|
|
|
|
## Utility
|
|
|
|
|
|
|
|
|
|
### Sort JSON
|
|
|
|
|
|
|
|
|
@ -69,7 +63,7 @@ files by running the following script:
|
|
|
|
|
definitions [locales.ts](../ts/localization/locales.ts). This script also validates the dynamic variables in each
|
|
|
|
|
locale file and flags any errors.
|
|
|
|
|
|
|
|
|
|
The generated type file is not commited to the repository and is generated at build time. It is generated here to ensure
|
|
|
|
|
The generated type file is not committed to the repository and is generated at build time. It is generated here to ensure
|
|
|
|
|
that changes to any type definitions are not problematic.
|
|
|
|
|
|
|
|
|
|
## [Generate Localized Strings Analysis](./localization/generateLocalizedStringsAnalysis.sh)
|
|
|
|
@ -79,7 +73,7 @@ are used but not known about. Without any input files this script outputs:
|
|
|
|
|
|
|
|
|
|
- [found_strings.csv] - A list of all strings found in the codebase.
|
|
|
|
|
- [not_found_strings.csv] - A list of all strings not found in the codebase.
|
|
|
|
|
- [potental_matches.csv] - A list of all not found strings in the codebase that have a potential match using a fuzzy
|
|
|
|
|
- [potential_matches.csv] - A list of all not found strings in the codebase that have a potential match using a fuzzy
|
|
|
|
|
search.
|
|
|
|
|
|
|
|
|
|
The script can be run with:
|
|
|
|
@ -88,12 +82,19 @@ The script can be run with:
|
|
|
|
|
python3 ./tools/localization/generateLocalizedStringsAnalysis.py
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If using macOS always run this script with the `--disable-concurrency` flag.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
python3 ./tools/<script>.py --disable-concurrency
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The script can also take the following arguments:
|
|
|
|
|
|
|
|
|
|
- `--output-dir` - The directory to output the files to. Default is `./tools/localization/analysis/`.
|
|
|
|
|
- `--master-strings` - A file containging a master list of strings to compare against. This list specifies the list of
|
|
|
|
|
- `--master-strings` - A file containing a master list of strings to compare against. This list specifies the list of
|
|
|
|
|
known strings. When this is provided a `missing_strings.csv` file is generated. This file contains all strings in the
|
|
|
|
|
codebase that are not in the master list.
|
|
|
|
|
- `--to-be-removed` - A file containging a list of strings that are to be removed from the codebase. This list specifies
|
|
|
|
|
- `--to-be-removed` - A file containing a list of strings that are to be removed from the codebase. This list specifies
|
|
|
|
|
the list of strings that are to be removed and so won't be flagged as missing from the master lists. Any strings in
|
|
|
|
|
this list will not appear in the `missing_strings.csv` file.
|
|
|
|
|
- `--disable-concurrency` - Disables the use of concurrency in the script. This is required on macOS due to a bug in the `concurrent.futures` module.
|
|
|
|
|