(self)
| 94 | |
| 95 | |
| 96 | def parse_args(self): |
| 97 | parser = ArgumentParser( |
| 98 | description=""" |
| 99 | A script for parsing strings in the PO format, which is used by our |
| 100 | translation partners. The script can pull strings from .po files into |
| 101 | categories.txt or strings.txt. |
| 102 | """ |
| 103 | ) |
| 104 | |
| 105 | parser.add_argument( |
| 106 | "-f", "--folder", |
| 107 | dest="folder", required=True, |
| 108 | help="""Path to the folder where the PO files are. Required.""" |
| 109 | ) |
| 110 | |
| 111 | parser.add_argument( |
| 112 | "-s", "--strings", |
| 113 | dest="strings_txt", |
| 114 | help="""The path to the strings.txt file. The strings from the po |
| 115 | files will be added to that strings.txt file.""" |
| 116 | ) |
| 117 | |
| 118 | parser.add_argument( |
| 119 | "-c", "--categories", |
| 120 | dest="categories_txt", |
| 121 | help="""The path to the categories.txt file. The strings from the po |
| 122 | files will be added to that categories.txt file.""" |
| 123 | ) |
| 124 | return parser.parse_args() |
| 125 | |
| 126 | |
| 127 | def main(): |
no outgoing calls