diff --git a/client/public/locales/en/common.json b/client/public/locales/en/common.json index 8c86887..0bceaad 100644 --- a/client/public/locales/en/common.json +++ b/client/public/locales/en/common.json @@ -95,6 +95,8 @@ } }, "scanner": { + "title": "QR Code Scanner", + "description": "Scan a Spoolman QR code to view details about the spool.", "error": { "notAllowed": "You have not allowed access to the camera.", "insecureContext": "The page is not served over HTTPS.", diff --git a/client/public/locales/sv/common.json b/client/public/locales/sv/common.json index 28ee75d..e9de4a4 100644 --- a/client/public/locales/sv/common.json +++ b/client/public/locales/sv/common.json @@ -94,6 +94,17 @@ "selectedTotal_other": "{{count}} spolar valda" } }, + "scanner": { + "title": "Skanna QR-kod", + "description": "Skanna en QR-kod för att visa information om en spole.", + "error": { + "notAllowed": "Du har inte tillåtit åtkomst till kameran.", + "insecureContext": "Sidan måste använda sig av HTTPS.", + "streamApiNotSupported": "Webbläsaren stödjer inte MediaStream API.", + "notReadable": "Kameran är inte läsbar.", + "unknown": "Ett okänt fel inträffade. ({{error}})" + } + }, "spool": { "spool": "Spolar", "fields": { diff --git a/client/src/components/qrCodeScanner.tsx b/client/src/components/qrCodeScanner.tsx index 0b4bf87..aa80e80 100644 --- a/client/src/components/qrCodeScanner.tsx +++ b/client/src/components/qrCodeScanner.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React, { useState } from "react"; import { FloatButton, Modal, Space } from "antd"; import { QrScanner } from "@yudiel/react-qr-scanner"; import { useNavigate } from "react-router-dom"; @@ -32,10 +32,10 @@ const QRCodeScannerModal: React.FC = () => { open={visible} onCancel={() => setVisible(false)} footer={null} - title="QR Code Scanner" + title={t("scanner.title")} > -

Scan a Spoolman QR code to view details about the spool.

+

{t("scanner.description")}