[Bugfix][R306][bug-view-1995][psw] fix password language error
Change-Id: Ia1b00986b8d07090f0c288f8561652a6eaf5f4c3
diff --git a/lynq/R307L/ap/app/zte_webui/js/com.js b/lynq/R307L/ap/app/zte_webui/js/com.js
index e71609a..6e0dc7d 100755
--- a/lynq/R307L/ap/app/zte_webui/js/com.js
+++ b/lynq/R307L/ap/app/zte_webui/js/com.js
@@ -6601,11 +6601,10 @@
var fwVm = new manageViewModel();
ko.applyBindings(fwVm, container[0]);
- const userLanguage = navigator.language || navigator.userLanguage;
- // Extract language code,"en", "zh"
- const langCode = userLanguage.split('-')[0];
- // If there is no matching language, English is used by default
- const messages = errorMessages[langCode] || errorMessages["en"];
+ const langObj = service.getLanguage();
+ const langCode = (langObj && langObj.Language || 'en').split('-')[0];
+ const messages = errorMessages[langCode] || errorMessages['en'];
+ console.log('langCode =', langCode);
$('#frmPassword').validate({
submitHandler:function () {