From 383b3b6a78dc3c1a8c8144963c4a42d714e251d0 Mon Sep 17 00:00:00 2001
From: Thomas Citharel <tcit@tcit.fr>
Date: Mon, 2 Aug 2021 19:26:44 +0200
Subject: [PATCH] Remove use of String.replaceAll for unit tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
---
 js/src/utils/i18n.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/src/utils/i18n.ts b/js/src/utils/i18n.ts
index c772484d7..ba6066a04 100644
--- a/js/src/utils/i18n.ts
+++ b/js/src/utils/i18n.ts
@@ -44,7 +44,7 @@ function setI18nLanguage(lang: string): string {
 }
 
 function setLanguageInDOM(lang: string): void {
-  const fixedLang = lang.replaceAll("_", "-");
+  const fixedLang = lang.replace(/_/g, "-");
   const html = document.documentElement;
   const documentLang = html.getAttribute("lang");
   if (documentLang !== fixedLang) {