2 Commits 1978bd724c ... 52e09d50ea

Author SHA1 Message Date
  liutian 52e09d50ea add: 语系新增葡萄牙语及意大利语 3 months ago
  liutian 1978bd724c add: 语系新增葡萄牙语及意大利语 3 months ago

packages/webview/locales/pt.json → packages/webview/locales/br.json


+ 1 - 1
packages/webview/src/apis/setLanguage.js

@@ -13,7 +13,7 @@ import i18n from '../i18n'
 const { locale } = i18n.global
 
 export default (store) => (language) => {
-  if (!['en', 'zh-CN', 'es', 'de', 'fr', 'it', 'pt'].includes(language)) {
+  if (!['en', 'zh-CN', 'es', 'de', 'fr', 'it', 'br'].includes(language)) {
     language = 'en'
   }
   locale.value = language

+ 2 - 2
packages/webview/src/components/Dialogs/LanguageDialog.vue

@@ -32,8 +32,8 @@
           <Circle v-else />
           Deutschland
         </div>
-        <div class="item" @click="selectLanguage('pt')">
-          <Circled v-if="currentLanguage === 'pt'" />
+        <div class="item" @click="selectLanguage('br')">
+          <Circled v-if="currentLanguage === 'br'" />
           <Circle v-else />
           Portuguese (for Brasil) 
         </div>

+ 3 - 3
packages/webview/src/i18n.js

@@ -5,10 +5,10 @@ import es from '../locales/es.json'
 import de from '../locales/de.json'
 import fr from '../locales/fr.json'
 import it from '../locales/it.json'
-import pt from '../locales/pt.json'
+import br from '../locales/br.json'
 
 let language = window.localStorage.getItem('currentLanguage') || 'en'
-if (!['en', 'zh-CN', 'es', 'de', 'fr', 'it', 'pt'].includes(language)) {
+if (!['en', 'zh-CN', 'es', 'de', 'fr', 'it', 'br'].includes(language)) {
   language = 'en'
 }
 
@@ -25,7 +25,7 @@ const i18n = createI18n({
     de,
     fr,
     it,
-    pt,
+    br,
   }
 })