From 3e3c9122168afed6105fc18aa65d88367ee194d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20J=C3=B8rgensen?= Date: Wed, 25 Sep 2024 10:14:29 +0200 Subject: [PATCH] Exclude numeric values from translation files --- assets/utils/h5p.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/utils/h5p.js b/assets/utils/h5p.js index af6ceb1b..6cd6a715 100644 --- a/assets/utils/h5p.js +++ b/assets/utils/h5p.js @@ -1012,6 +1012,10 @@ function itemUntranslatable(property, value, parent) { if (value.trim().length === 0) { return true; } + // If this is a number, don't include it + if (!isNaN(value)) { + return true; + } if (!value.replaceAll(new RegExp(/<\/?[a-z][^>]*>/ig), '')) { // empty html tags return true; }