Skip to content
Open
Changes from all commits
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
10 changes: 10 additions & 0 deletions usr/bin/mint-check-translations
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ class Main:
if idx > 1 and msgid[idx-1] == " " and msgid[idx-2] in DIGITS:
# ignore this token, it's probably a percentage
continue
if idx == 0 and len(msgid) == 1:
# Handle entries consisting solely of '%' to avoid
# indexing beyond the end of the string while parsing
# formatting placeholders.
continue
if idx > -1 and msgid[idx-1] != "\\":
subidx = 0
if msgid[idx+1] == "(":
Expand Down Expand Up @@ -297,6 +302,11 @@ class Main:
if idx > 1 and msgstr[idx-1] == " " and msgstr[idx-2] in DIGITS:
# ignore this token, it's probably a percentage
continue
if idx == 0 and len(msgstr) == 1:
# Handle entries consisting solely of '%' to avoid
# indexing beyond the end of the string while parsing
# formatting placeholders.
continue
if idx > -1 and msgstr[idx-1] != "\\":
subidx = 0
if msgstr[idx+1] == "(":
Expand Down