Skip to content

Commit

Permalink
fix format string (translate mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
Furtif committed Mar 4, 2024
1 parent 20646e8 commit 3e21dc7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ecu.py
Original file line number Diff line number Diff line change
Expand Up @@ -1731,16 +1731,20 @@ def check_ecu2(self, diagversion, supplier, soft, version, label, addr, protocol
if label is not None:
label.setText("Found %i ecu" % self.num_ecu_found)

line = "<font color='red'>" + _("Found ECU") + " [%s] " + _("(not perfect match)") + " :" \
text = _("Found ECU")
text1 = _("(not perfect match)")
line = f"<font color='red'>{text} {ecu_type} {text1} :" \
"%s DIAGVERSION [%s] SUPPLIER [%s] SOFT [%s] VERSION [%s instead %s]</font>" \
% (ecu_type, kept_ecu.name, diagversion, supplier, soft, version, tgt.version)
% (kept_ecu.name, diagversion, supplier, soft, version, tgt.version)

options.main_window.logview.append(line)

if not found_exact and not found_approximate:
line = "<font color='red'>" + _("Found ECU") + " [%s] " + _("(no relevant ECU file found)") + " :" \
text = _("Found ECU")
text1 = _("(no relevant ECU file found)")
line = f"<font color='red'>{text} {ecu_type} {text1} :" \
"DIAGVERSION [%s] SUPPLIER [%s] SOFT [%s] VERSION [%s]</font>" \
% (ecu_type, diagversion, supplier, soft, version)
% (diagversion, supplier, soft, version)

options.main_window.logview.append(line)

Expand Down

0 comments on commit 3e21dc7

Please sign in to comment.