[Bugfix][R306][bug-view-1995][psw] fix password language error

Change-Id: Ia1b00986b8d07090f0c288f8561652a6eaf5f4c3
diff --git a/lynq/CPE_COMMON/ap/app/zte_webui/js/com.js b/lynq/CPE_COMMON/ap/app/zte_webui/js/com.js
index 7047730..5215d9d 100755
--- a/lynq/CPE_COMMON/ap/app/zte_webui/js/com.js
+++ b/lynq/CPE_COMMON/ap/app/zte_webui/js/com.js
@@ -6627,11 +6627,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 () {

diff --git a/lynq/CPE_TELKOMSEL/ap/app/zte_webui/js/com.js b/lynq/CPE_TELKOMSEL/ap/app/zte_webui/js/com.js
index 4845ebc..91020b1 100755
--- a/lynq/CPE_TELKOMSEL/ap/app/zte_webui/js/com.js
+++ b/lynq/CPE_TELKOMSEL/ap/app/zte_webui/js/com.js
@@ -6676,11 +6676,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 () {

diff --git a/lynq/MD310/ap/app/zte_webui/js/com.js b/lynq/MD310/ap/app/zte_webui/js/com.js
index fb439bb..069fe72 100755
--- a/lynq/MD310/ap/app/zte_webui/js/com.js
+++ b/lynq/MD310/ap/app/zte_webui/js/com.js
@@ -6634,11 +6634,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 () {

diff --git a/lynq/MD310EU/ap/app/zte_webui/js/com.js b/lynq/MD310EU/ap/app/zte_webui/js/com.js
index fb439bb..069fe72 100755
--- a/lynq/MD310EU/ap/app/zte_webui/js/com.js
+++ b/lynq/MD310EU/ap/app/zte_webui/js/com.js
@@ -6634,11 +6634,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 () {

diff --git a/lynq/R305/ap/app/zte_webui/js/com.js b/lynq/R305/ap/app/zte_webui/js/com.js
index ee534e8..ae742cf 100755
--- a/lynq/R305/ap/app/zte_webui/js/com.js
+++ b/lynq/R305/ap/app/zte_webui/js/com.js
@@ -6598,11 +6598,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 () {

diff --git a/lynq/R306/ap/app/zte_webui/js/com.js b/lynq/R306/ap/app/zte_webui/js/com.js
index 779d93f..6fe5378 100755
--- a/lynq/R306/ap/app/zte_webui/js/com.js
+++ b/lynq/R306/ap/app/zte_webui/js/com.js
@@ -6606,11 +6606,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 () {

diff --git a/lynq/R306BR/ap/app/zte_webui/js/com.js b/lynq/R306BR/ap/app/zte_webui/js/com.js
index 5c5d8c2..32965f1 100755
--- a/lynq/R306BR/ap/app/zte_webui/js/com.js
+++ b/lynq/R306BR/ap/app/zte_webui/js/com.js
@@ -7566,11 +7566,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 () {

diff --git a/lynq/R306_MTN/ap/app/zte_webui/js/com.js b/lynq/R306_MTN/ap/app/zte_webui/js/com.js
index 7047730..5215d9d 100755
--- a/lynq/R306_MTN/ap/app/zte_webui/js/com.js
+++ b/lynq/R306_MTN/ap/app/zte_webui/js/com.js
@@ -6627,11 +6627,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 () {

diff --git a/lynq/R307/ap/app/zte_webui/js/com.js b/lynq/R307/ap/app/zte_webui/js/com.js
index 49e1371..d7511b3 100755
--- a/lynq/R307/ap/app/zte_webui/js/com.js
+++ b/lynq/R307/ap/app/zte_webui/js/com.js
@@ -6599,11 +6599,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 () {

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 () {

diff --git a/lynq/S300/ap/app/zte_webui/js/com.js b/lynq/S300/ap/app/zte_webui/js/com.js
index f5c3f94..ec598b0 100755
--- a/lynq/S300/ap/app/zte_webui/js/com.js
+++ b/lynq/S300/ap/app/zte_webui/js/com.js
@@ -6627,11 +6627,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 () {

diff --git a/lynq/S300AI/ap/app/zte_webui/js/com.js b/lynq/S300AI/ap/app/zte_webui/js/com.js
index 48992aa..5711272 100755
--- a/lynq/S300AI/ap/app/zte_webui/js/com.js
+++ b/lynq/S300AI/ap/app/zte_webui/js/com.js
@@ -7566,11 +7566,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 () {

diff --git a/lynq/S300_AIC/ap/app/zte_webui/js/com.js b/lynq/S300_AIC/ap/app/zte_webui/js/com.js
index f4ea92e..9dfa550 100755
--- a/lynq/S300_AIC/ap/app/zte_webui/js/com.js
+++ b/lynq/S300_AIC/ap/app/zte_webui/js/com.js
@@ -6628,11 +6628,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 () {

diff --git a/lynq/S300_COMMON/ap/app/zte_webui/js/com.js b/lynq/S300_COMMON/ap/app/zte_webui/js/com.js
index f4ea92e..9dfa550 100755
--- a/lynq/S300_COMMON/ap/app/zte_webui/js/com.js
+++ b/lynq/S300_COMMON/ap/app/zte_webui/js/com.js
@@ -6628,11 +6628,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 () {