Client: Scanner translations update

This commit is contained in:
Donkie
2023-08-03 22:31:09 +02:00
parent b95443228c
commit f552affa98
3 changed files with 16 additions and 3 deletions

View File

@@ -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.",

View File

@@ -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": {

View File

@@ -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")}
>
<Space direction="vertical" style={{ width: "100%" }}>
<p>Scan a Spoolman QR code to view details about the spool.</p>
<p>{t("scanner.description")}</p>
<QrScanner
viewFinder={
lastError