Skip to content

Commit

Permalink
feat: integrate simplelocalize
Browse files Browse the repository at this point in the history
  • Loading branch information
GalvinGao committed Feb 18, 2023
1 parent fd5b19d commit 6ed8564
Show file tree
Hide file tree
Showing 10 changed files with 4,110 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/simplelocalize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Update SimpleLocalize Translations

# api key is available at secrets SIMPLELOCALIZE_API_KEY

on:
schedule:
- cron: '0 0 * * *'

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3

- 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"

- name: "Commit translations"
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "chore: update translations from SimpleLocalize"
add: "src/locales"
push: true
8 changes: 4 additions & 4 deletions src/i18n.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'

import enMessages from '@/locales/en.json'
import zhMessages from '@/locales/zh.json'
import jaMessages from '@/locales/ja.json'
import koMessages from '@/locales/ko.json'
import enMessages from '@/locales/en_US.json'
import zhMessages from '@/locales/zh_CN.json'
import jaMessages from '@/locales/ja_JP.json'
import koMessages from '@/locales/ko_KR.json'

Vue.use(VueI18n)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6ed8564

Please sign in to comment.