Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NormanTUD committed Dec 17, 2024
1 parent 02c8fe9 commit bbece9b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion initializing.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function hasWebGL() {
}

if (!supported) {
l("WebGL is not supported");
l(language[lang]["webgl_not_supported"]);
}

canvas = undefined;
Expand Down
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async function has_front_back_camera() {
let devices = await navigator.mediaDevices.enumerateDevices();
const videoDevices = devices.filter(device => {
if (device.kind === "videoinput") {
l("Found camera: " + device.label);
l(language[lang]["found_camera"] ": " + device.label);
if (device.label && device.label.length > 0) {
if (
device.label.toLowerCase().indexOf("back") >= 0 ||
Expand Down Expand Up @@ -137,7 +137,7 @@ async function has_front_back_camera() {
} catch (e) {
/* log and swallow exception, this is a probe only */
if(("" + e).includes("NotAllowedError")) {
info("[has_front_back_camera] Webcam access was denied");
info("[has_front_back_camera] " + language[lang]["webcam_access_denied"]);
} else {
err("[has_front_back_camera] " + e);
}
Expand Down
12 changes: 9 additions & 3 deletions translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,10 @@
"inverted_image" => "Inverted image",
"starting_webcam" => "Starting webcam",
"stopping_webcam" => "Stopping webcam",
"rotating_image" => "Rotating image"
"rotating_image" => "Rotating image",
"webgl_not_supported" => "WebGL is not supported",
"found_camera" => "Found camera",
"webcam_access_denied" => "Webcam access was denied"
),

'de' => array(
Expand Down Expand Up @@ -748,10 +751,13 @@
"getting_data" => "Hole Daten",
"started_training" => "Training gestartet",
"prediction_done" => "Prediction fertig",
"inverted_image" => "Bild invertiert"
"inverted_image" => "Bild invertiert",
"starting_webcam" => "Starte Webcam",
"stopping_webcam" => "Stoppe Webcam",
"rotating_image" => "Rotiere bild"
"rotating_image" => "Rotiere bild",
"webgl_not_supported" => "WebGL wird nicht unterstützt",
"found_camera" => "Kamera gefunden",
"webcam_access_denied" => "Webcamzugriff wurde verweigert"
)
);

Expand Down

0 comments on commit bbece9b

Please sign in to comment.