1
0

Consistently use translated strings for UserFacingException raises

This commit is contained in:
Sander van Grieken
2024-01-16 16:25:33 +01:00
parent 291f0ce235
commit d8f579ccfc
4 changed files with 18 additions and 23 deletions

View File

@@ -59,7 +59,7 @@ except BaseException as e1:
def scan_barcode(device='', timeout=-1, display=True, threaded=False) -> Optional[str]:
if libzbar is None:
raise UserFacingException("Cannot start QR scanner: zbar not available.")
raise UserFacingException(_('Cannot start QR scanner: zbar not available.'))
libzbar.zbar_symbol_get_data.restype = ctypes.c_char_p
libzbar.zbar_processor_create.restype = ctypes.POINTER(ctypes.c_int)
libzbar.zbar_processor_get_results.restype = ctypes.POINTER(ctypes.c_int)