Skip to content

Commit

Permalink
fix: locale
Browse files Browse the repository at this point in the history
  • Loading branch information
GalvinGao committed Feb 20, 2023
1 parent 5695a61 commit 9447ee9
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 520 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/simplelocalize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_FOR_RELEASE_TAGGER }}

- name: "Download translations"
uses: simplelocalize/download@v2.1
with:
apiKey: ${{ secrets.SIMPLELOCALIZE_API_KEY }}
downloadPath: "./src/locales/{lang}.json"
downloadFormat: "single-language-json"
downloadOptions: "WRITE_NESTED"
downloadOptions: "WRITE_NESTED,ONLY_TRANSLATED"

- name: "Commit translations"
uses: EndBug/add-and-commit@v9
with:
Expand Down
10 changes: 6 additions & 4 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import zhMessages from '@/locales/zh_CN.json'
import jaMessages from '@/locales/ja_JP.json'
import koMessages from '@/locales/ko_KR.json'

import {transformMessages} from "@/utils/i18n";

Vue.use(VueI18n)

const i18n = new VueI18n({
Expand All @@ -14,10 +16,10 @@ const i18n = new VueI18n({
silentFallbackWarn: true,
formatFallbackMessages: true,
messages: {
en: enMessages,
zh: zhMessages,
ja: jaMessages,
ko: koMessages
en: transformMessages(enMessages),
zh: transformMessages(zhMessages),
ja: transformMessages(jaMessages),
ko: transformMessages(koMessages)
}
})

Expand Down
85 changes: 24 additions & 61 deletions src/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -394,22 +394,7 @@
"retry": "Failed to submit. Retrying..."
},
"gacha": "Multiple results are allowed in a singular report for this stage.",
"specialSideStory": {
"dialog": {
"cancel": "",
"title": "",
"confirmTimerDone": "",
"confirmTimerPending": ""
}
},
"usage": "Increase drop amount by left click, decrease by right click",
"dossolesHoliday": {
"title": {
"inner": "",
"tmpl": ""
},
"content": ""
},
"alert": {
"causes": {
"limitation": "This report has a significant discrepancy with our current data. Continuing with the submission may result in it being flagged as an outlier and not included in the overall statistical data.",
Expand Down Expand Up @@ -620,52 +605,6 @@
"empty": "This query returned 0 results. Please check your query parameters."
}
},
"settings": {
"push": {
"categories": {
"ImportantTimePoint": {
"subtitle": "",
"title": ""
},
"Maintenance": {
"subtitle": "",
"title": ""
},
"ClientUpgrade": {
"title": "",
"subtitle": ""
},
"_name": "",
"NewStage": {
"subtitle": "",
"title": ""
}
},
"language": ""
},
"data": {
"server": "Local Data includes servers: ",
"size": "Local Data size: ",
"reset": {
"title": "Reset All",
"subtitle": "This operation will delete all local data and settings you have set. After the deletion, all settings will be reset to default, all data needs to be downloaded again, and the web page will be reloaded. Are you sure to continue?"
}
},
"category": {
"data": "Data",
"about": "About",
"appearance": "Appearance"
},
"optimization": {
"lowData": {
"title": "Low Data Mode",
"subtitle": "Low Data Mode will stop fetching nonessential resources, such as the zone backgrounds in stage selector and the website background, to help reduce network data use.",
"active": "Low Data Mode is Active"
}
},
"storageIssue": "Storage issues detected. Application may malfunction. If this warning keeps showing, try to clear local storage by using \"Reset All\" under the \"Settings\" dialog in the menu.",
"iosSystemSettings": "Language & Privacy Settings"
},
"item": {
"choose": {
"name": "Choose Item"
Expand Down Expand Up @@ -820,6 +759,30 @@
"email": "Email"
}
},
"settings": {
"data": {
"server": "Local Data includes servers: ",
"size": "Local Data size: ",
"reset": {
"title": "Reset All",
"subtitle": "This operation will delete all local data and settings you have set. After the deletion, all settings will be reset to default, all data needs to be downloaded again, and the web page will be reloaded. Are you sure to continue?"
}
},
"category": {
"data": "Data",
"about": "About",
"appearance": "Appearance"
},
"optimization": {
"lowData": {
"title": "Low Data Mode",
"subtitle": "Low Data Mode will stop fetching nonessential resources, such as the zone backgrounds in stage selector and the website background, to help reduce network data use.",
"active": "Low Data Mode is Active"
}
},
"storageIssue": "Storage issues detected. Application may malfunction. If this warning keeps showing, try to clear local storage by using \"Reset All\" under the \"Settings\" dialog in the menu.",
"iosSystemSettings": "Language & Privacy Settings"
},
"credits": {
"source": {
"title": "Open Source Licenses"
Expand Down
Loading

0 comments on commit 9447ee9

Please sign in to comment.