Skip to content

Commit

Permalink
add wrapwidth option
Browse files Browse the repository at this point in the history
  • Loading branch information
TimidRobot committed Nov 29, 2023
1 parent 1c832e3 commit 49c7cb4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion i18n/management/commands/format_pofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ def add_arguments(self, parser: ArgumentParser):
action="store_true",
help="dry run: do not make any changes",
)
parser.add_argument(
"-w",
"--wrapwidth",
default=78,
type=int,
help="wrap width (default: 78)",
)
parser.add_argument(
"path",
action="store",
Expand Down Expand Up @@ -68,7 +75,7 @@ def main(self, **options):
print(pofile_path)
pofile_obj = polib.pofile(
pofile_path,
wrapwidth=78, # Default: 78
wrapwidth=options["wrapwidth"], # Default: 78
check_for_duplicates=True, # Default: False
)
pofile_obj.save(pofile_path)
Expand Down

0 comments on commit 49c7cb4

Please sign in to comment.