diff --git a/lib/ui/qr_manager_mobile.dart b/lib/ui/qr_manager_mobile.dart index 05f5ef799d6214bb6332524f0daa95666960069c..161016366e2fc076f4b67dd22fee7a951c7bac5d 100644 --- a/lib/ui/qr_manager_mobile.dart +++ b/lib/ui/qr_manager_mobile.dart @@ -1,5 +1,6 @@ // Import only for Android import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -17,11 +18,11 @@ class QrManager { static Future<String?> _mobileQrScan() async { final ScanResult result = await BarcodeScanner.scan( - options: const ScanOptions( + options: ScanOptions( strings: <String, String>{ - 'cancel': 'CANCEL', - 'flash_on': 'FLASH ON', - 'flash_off': 'FLASH OFF', + 'cancel': tr('qr_scanner_cancel'), + 'flash_on': tr('qr_scanner_flash_on'), + 'flash_off': tr('qr_scanner_flash_off'), }, restrictFormat: <BarcodeFormat>[BarcodeFormat.qr], // useCamera: -1, diff --git a/lib/ui/qr_manager_web.dart b/lib/ui/qr_manager_web.dart index 025c3f03b4c5e71a74e412e9537fa3a32b3338fb..5be67b48c24881f67b822d0124a9045517253e45 100644 --- a/lib/ui/qr_manager_web.dart +++ b/lib/ui/qr_manager_web.dart @@ -37,7 +37,7 @@ class QrManager { insetPadding: const EdgeInsets.all(5), shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(10.0))), - title: const Text('Scan QR Code'), + title: Text(tr('qr_scanner_title')), content: SizedBox(height: height, width: width, child: sc), ); });