diff --git a/release_scripts/localization_scripts/allbundlesscript.py b/release_scripts/localization_scripts/allbundlesscript.py index b699ee5d89..71146ffc91 100644 --- a/release_scripts/localization_scripts/allbundlesscript.py +++ b/release_scripts/localization_scripts/allbundlesscript.py @@ -60,7 +60,8 @@ def main(): help='Specify the regex for the property value where a regex match against the property value ' 'will display the key value pair in csv output (i.e. \'[a-zA-Z]\' or \'\\S\' for removing ' 'just whitespace items). If this option is not specified, all key value pairs will be ' - 'accepted.') + 'accepted. If this option is specified, another csv file will be created in the same ' + 'directory as the original output_path with \'' + OMITTED_ADDITION + ' appended.') args = parser.parse_args() repo_path = args.repo_path if args.repo_path is not None else get_git_root(get_proj_dir()) diff --git a/release_scripts/localization_scripts/diffscript.py b/release_scripts/localization_scripts/diffscript.py index 6db186e2fc..df805d7236 100644 --- a/release_scripts/localization_scripts/diffscript.py +++ b/release_scripts/localization_scripts/diffscript.py @@ -36,8 +36,8 @@ def write_diff_to_csv(repo_path: str, output_path: str, commit_1_id: str, commit omitted = [] for entry in get_property_files_diff(repo_path, commit_1_id, commit_2_id): - new_entry = [entry.rel_path, entry.key, entry.value] - if value_regex is not None and (entry.type == ChangeType.DELETION or (not re.match(value_regex, entry.value))): + new_entry = entry.get_row() + if value_regex is not None and (entry.type == ChangeType.DELETION or not re.match(value_regex, entry.cur_val)): omitted.append(new_entry) else: rows.append(new_entry) @@ -72,7 +72,9 @@ def main(): help='Specify the regex for the property value where a regex match against the property value ' 'will display the key value pair in csv output (i.e. \'[a-zA-Z]\' or \'\\S\' for removing ' 'just whitespace items). If this option is not specified, all key value pairs will be ' - 'accepted.') + 'accepted. If this option is specified, entries marked as \'DELETION\' will also be ' + 'omitted another csv file will be created in the same directory as the original ' + 'output_path with \'' + OMITTED_ADDITION + ' appended.') args = parser.parse_args() repo_path = args.repo_path if args.repo_path is not None else get_git_root(get_proj_dir()) diff --git a/release_scripts/localization_scripts/propentry.py b/release_scripts/localization_scripts/propentry.py index d6930c1c1e..99c00f749e 100644 --- a/release_scripts/localization_scripts/propentry.py +++ b/release_scripts/localization_scripts/propentry.py @@ -2,7 +2,7 @@ class PropEntry: rel_path: str key: str value: str - should_delete: str + should_delete: bool def __init__(self, rel_path: str, key: str, value: str, should_delete: bool = False): """Defines a property file entry to be updated in a property file.