carlos 10 сар өмнө
parent
commit
1d2c9483d4

+ 6 - 1
app/src/main/java/com/sikey/veryfit/component/network/http/HttpHeaderInterceptor.kt

@@ -26,9 +26,14 @@ class HttpHeaderInterceptor {
         val noncestr = md5(Build.FINGERPRINT)
         val timestamp = System.currentTimeMillis().toString()
 
+        val languageTag = Locale.getDefault().toLanguageTag()
+        val language = languageTag.let { tag ->
+            if (tag == "zh-HK" || tag == "zh-TW" || tag == "zh-MO" || tag.contains("zh-Hant")) "zh-Hant"
+            else tag
+        }
         resultHeaderMap["Content-Type"] = contentType
         resultHeaderMap["Accept-Version"] = "1.0.0"
-        resultHeaderMap["Localization"] = Locale.getDefault().toLanguageTag()
+        resultHeaderMap["Localization"] = language
         resultHeaderMap["X-Device-System"] = "Android"
         resultHeaderMap["X-Device-System-Version"] = Build.VERSION.RELEASE
         resultHeaderMap["device-model"] = Build.MODEL

+ 1 - 1
app/src/main/java/com/sikey/veryfit/k2/ui/settings/RemoteCtrlActivity.kt

@@ -85,7 +85,7 @@ class RemoteCtrlActivity : BaseNoActionBarActivity() {
                     return@launch
                 }
                 hideProgressDialog()
-                ToastUtils.showShortToast(this.message)
+                ToastUtils.showShortToast(R.string.cmd_sent)
             }
         }
     }

+ 1 - 0
app/src/main/res/values-de/strings.xml

@@ -744,4 +744,5 @@
     <string name="email">E-Mail</string>
     <string name="wrong_verification_code">Falscher Verifizierungscode</string>
     <string name="phone_number_not_match">Telefonnummer stimmt nicht überein</string>
+    <string name="cmd_sent">Befehl erfolgreich gesendet.</string>
 </resources>

+ 1 - 0
app/src/main/res/values-es/strings.xml

@@ -745,4 +745,5 @@
     <string name="email">Correo electrónico</string>
     <string name="wrong_verification_code">Error en el Código de verificación</string>
     <string name="phone_number_not_match">El número de teléfono no coincide</string>
+    <string name="cmd_sent">La orden fue enviada con éxito.</string>
 </resources>

+ 1 - 0
app/src/main/res/values-fr/strings.xml

@@ -733,4 +733,5 @@
     <string name="email">E - mail</string>
     <string name="wrong_verification_code">Erreur de code de vérification</string>
     <string name="phone_number_not_match">Les numéros de téléphone ne correspondent pas</string>
+    <string name="cmd_sent">La commande a été envoyée avec succès.</string>
 </resources>

+ 1 - 0
app/src/main/res/values-it/strings.xml

@@ -788,4 +788,5 @@
     <string name="no_overlay_permission">Consenti la visualizzazione su altre app</string>
     <string name="wrong_verification_code">Codice di verifica errato</string>
     <string name="phone_number_not_match">Numero di telefono non corrisponde</string>
+    <string name="cmd_sent">Comando inviato correttamente.</string>
 </resources>

+ 1 - 0
app/src/main/res/values-zh-rCN/strings.xml

@@ -1018,5 +1018,6 @@
     <string name="permission_rationale_location">需要访问位置服务来演示“我的位置”功能,该功能在地图上显示您的当前位置。</string>
     <string name="wrong_verification_code">验证码错误</string>
     <string name="phone_number_not_match">电话号码不匹配</string>
+    <string name="cmd_sent">指令发送成功。</string>
 </resources>
 

+ 1 - 0
app/src/main/res/values-zh-rHK/strings.xml

@@ -1011,6 +1011,7 @@
     <string name="permission_rationale_location">需要訪問位置服務來演示“我的位置”功能,該功能在地圖上顯示您的當前位置。</string>
     <string name="wrong_verification_code">驗證碼錯誤</string>
     <string name="phone_number_not_match">電話號碼不匹配</string>
+    <string name="cmd_sent">指令發送成功。</string>
 </resources>
 
 

+ 1 - 0
app/src/main/res/values-zh-rTW/strings.xml

@@ -1009,5 +1009,6 @@
     <string name="permission_rationale_location">需要訪問位置服務來演示“我的位置”功能,該功能在地圖上顯示您的當前位置。</string>
     <string name="wrong_verification_code">驗證碼錯誤</string>
     <string name="phone_number_not_match">電話號碼不匹配</string>
+    <string name="cmd_sent">指令發送成功。</string>
 </resources>
 

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -1073,4 +1073,5 @@
 
     <string name="wrong_verification_code">Wrong verification code</string>
     <string name="phone_number_not_match">Phone number not match</string>
+    <string name="cmd_sent">Command sent successfully.</string>
 </resources>