fix search not working for zh languages (#948)

This commit is contained in:
Kyler Li
2024-10-21 12:07:00 -07:00
committed by GitHub
parent 4f34e2d18a
commit c253056058

View File

@@ -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