From c25305605897222892b419c7d6c5843ef67f69ca Mon Sep 17 00:00:00 2001 From: Kyler Li <46853114+loukylor@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:07:00 -0700 Subject: [PATCH] fix search not working for zh languages (#948) --- html/src/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/html/src/app.js b/html/src/app.js index 4a919854..e6ca85ae 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -10133,7 +10133,10 @@ speechSynthesis.getVoices(); $app.data._stringComparer = undefined; $app.computed.stringComparer = function () { if (typeof this._stringComparer === 'undefined') { - this._stringComparer = Intl.Collator(this.appLanguage, { usage: "search", sensitivity: "base" }); + this._stringComparer = Intl.Collator( + this.appLanguage.replace("_", "-"), + { usage: "search", sensitivity: "base" } + ); } return this._stringComparer; } @@ -32331,6 +32334,7 @@ speechSynthesis.getVoices(); configRepository.setString('VRCX_appLanguage', language); this.applyLanguageStrings(); this.updateVRConfigVars(); + this._stringComparer = undefined; }; // #endregion