INNER CODE UNIT · Python

main

OpenChemistry/avogadrolibs · scripts/copy-default.py:386

def main():
    parser = argparse.ArgumentParser(
        description='Fill empty msgstr entries in en_GB/en_AU/en_CA/en_US PO '
                    'files with the msgid, using local spelling.')
    parser.add_argument('po_files', nargs='+', metavar='po-file',
                        help='PO file(s) to process')
    parser.add_argument('--locale',
                        help='locale (en_GB, en_AU, en_CA, en_US); default is '
                             'taken from the file name or PO header')
    parser.add_argument('--dry-run', action='store_true',
                        help="don't save; print each changed entry as "
                             "'old -> new'")
    args = parser.parse_args()

    success = True
    for po_file in args.po_files:
        if not process_file(po_file, args.locale, args.dry_run):
            success = False

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…