Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update scripts/complete_index.py
Co-authored-by: rtobar <rtobarc@gmail.com>
  • Loading branch information
cacrespo and rtobar authored Dec 11, 2023
commit 74e34049b83eee850071d20fd7ed818b5df012d6
5 changes: 4 additions & 1 deletion scripts/complete_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ def complete_index(po_files=None):
po_file = polib.pofile(po_file_path)

# Ask to complete entries out of order with original text
needs_save = False
for entry in out_of_order_entries(po_file):
user_input = input(f"\n{entry}\nIs this a index entry? (y/N):")
if user_input.lower() == "y":
entry.msgstr = entry.msgid
po_file.save() # Save if an entry has been modified
needs_save = True
if needs_save:
po_file.save()

except KeyboardInterrupt:
break
Expand Down