diff --git a/release_scripts/localization_scripts/README.md b/release_scripts/localization_scripts/README.md index 408e868cf6..8d6ef1e5c2 100644 --- a/release_scripts/localization_scripts/README.md +++ b/release_scripts/localization_scripts/README.md @@ -9,12 +9,12 @@ All of these scripts provide more details on usage by calling the script with `- ## Basic Localization Update Workflow -1. Call `python3 diffscript.py -l ` to generate a csv file containing differences in properties file values from the language's previous commit to the `HEAD` commit. The language identifier should be the abbreviated identifier used for the bundle (i.e. 'ja' for Japanese). +1. Call `python3 diffscript.py -l ` to generate a csv file containing differences in properties file values from the language's previous commit to the `HEAD` commit. The language identifier should be the abbreviated identifier used for the bundle (i.e. 'ja' for Japanese). The output path should be specified as a relative path with the dot slash notation (i.e. `./outputpath.csv`) or an absolute path. 2. Update csv file with translations -3. Call `python3 updatepropsscript.py -l ` to update properties files based on the newly generated csv file. The csv file should be formatted such that the columns are bundle relative path, property files key, translated value and commit id for the latest commit id for which these changes represent. The commit id only needs to be in the header row. +3. Call `python3 updatepropsscript.py -l ` to update properties files based on the newly generated csv file. The csv file should be formatted such that the columns are bundle relative path, property files key, translated value and commit id for the latest commit id for which these changes represent. The commit id only needs to be in the header row. The output path should be specified as a relative path with the dot slash notation (i.e. `./outputpath.csv`) or an absolute path. ## Localization Generation for the First Time -First-time updates should follow a similar procedure except that instead of calling `diffscript.py`, call `python3 allbundlesscript ` to generate a csv file with relative paths of bundle files, property file keys, property file values. +First-time updates should follow a similar procedure except that instead of calling `diffscript.py`, call `python3 allbundlesscript ` to generate a csv file with relative paths of bundle files, property file keys, property file values. The output path should be specified as a relative path with the dot slash notation (i.e. `./inputpath.csv`) or an absolute path. ##Unit Tests Unit tests can be run from this directory using `python3 -m unittest`. \ No newline at end of file diff --git a/release_scripts/localization_scripts/allbundlesscript.py b/release_scripts/localization_scripts/allbundlesscript.py index 38426d824a..139dec15a5 100644 --- a/release_scripts/localization_scripts/allbundlesscript.py +++ b/release_scripts/localization_scripts/allbundlesscript.py @@ -51,7 +51,9 @@ def main(): parser = argparse.ArgumentParser(description='Gathers all key-value pairs within .properties-MERGED files into ' 'one csv file.', formatter_class=argparse.ArgumentDefaultsHelpFormatter) - parser.add_argument(dest='output_path', type=str, help='The path to the output csv file.') + parser.add_argument(dest='output_path', type=str, help='The path to the output csv file. The output path should be' + ' specified as a relative path with the dot slash notation ' + '(i.e. \'./outputpath.csv\') or an absolute path.') parser.add_argument('-r', '--repo', dest='repo_path', type=str, required=False, help='The path to the repo. If not specified, path of script is used.') parser.add_argument('-nc', '--no_commit', dest='no_commit', action='store_true', default=False, diff --git a/release_scripts/localization_scripts/diffscript.py b/release_scripts/localization_scripts/diffscript.py index 259191292e..2713fef518 100644 --- a/release_scripts/localization_scripts/diffscript.py +++ b/release_scripts/localization_scripts/diffscript.py @@ -54,7 +54,9 @@ def main(): "'.properties-MERGED' files and generates a csv file containing " "the items changed.", formatter_class=argparse.ArgumentDefaultsHelpFormatter) - parser.add_argument(dest='output_path', type=str, help='The path to the output csv file.') + parser.add_argument(dest='output_path', type=str, help='The path to the output csv file. The output path should ' + 'be specified as a relative path with the dot slash notation' + ' (i.e. \'./outputpath.csv\') or an absolute path.') parser.add_argument('-r', '--repo', dest='repo_path', type=str, required=False, help='The path to the repo. If not specified, path of script is used.') diff --git a/release_scripts/localization_scripts/updatepropsscript.py b/release_scripts/localization_scripts/updatepropsscript.py index 2663ee330a..3d8489af82 100644 --- a/release_scripts/localization_scripts/updatepropsscript.py +++ b/release_scripts/localization_scripts/updatepropsscript.py @@ -178,7 +178,10 @@ def main(): 'deleted, and commit id for how recent these updates are. ' 'If the key should be deleted, the deletion row should be ' '\'DELETION.\' A header row is expected by default and the ' - 'commit id, if specified, should only be in the first row.') + 'commit id, if specified, should only be in the first row. The' + ' input path should be specified as a relative path with the ' + 'dot slash notation (i.e. `./inputpath.csv`) or an absolute ' + 'path.') parser.add_argument('-r', '--repo', dest='repo_path', type=str, required=False, help='The path to the repo. If not specified, parent repo of path of script is used.')