Skip to content

Commit

Permalink
Exclude numeric values from translation files
Browse files Browse the repository at this point in the history
  • Loading branch information
fnoks committed Sep 25, 2024
1 parent 5ad05be commit 3e3c912
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/utils/h5p.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3e3c912

Please sign in to comment.