diff --git a/tools/python/fix_regional_names.py b/tools/python/fix_regional_names.py index 430f773c..fa1ed295 100755 --- a/tools/python/fix_regional_names.py +++ b/tools/python/fix_regional_names.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 import argparse +import json import re import os @@ -14,12 +15,10 @@ TERMINAL_COLOR_GREEN = "\033[32m" TERMINAL_COLOR_YELLOW = "\033[33m" TERMINAL_COLOR_RESET = "\033[0m" +REGIONAL_NAMES_JSON_PATH = 'tools/python/regional_names.json' + # Note: All names MUST be lowercase -diffMap = [ - { "us": "color", "uk": "colour" }, - { "us": "gray", "uk": "grey" }, - { "us": "dialog", "uk": "dialogue" }, -] +diffMap = json.loads(FileUtil.readAllText(REGIONAL_NAMES_JSON_PATH)) def precheckForErrors(version): versionBuildPath = 'build/' + version diff --git a/tools/python/regional_names.json b/tools/python/regional_names.json new file mode 100644 index 00000000..f4320b2d --- /dev/null +++ b/tools/python/regional_names.json @@ -0,0 +1,5 @@ +[ + { "us": "color", "uk": "colour" }, + { "us": "gray", "uk": "grey" }, + { "us": "dialog", "uk": "dialogue" } +]