Skip to content

Commit

Permalink
feat(i18n): uninstall typesafe-i18n, use intlify (#7)
Browse files Browse the repository at this point in the history
* feat(i18n): uninstall typesafe-i18n, use intlify

* fix(todo): delete unused deps

* fix: lint
  • Loading branch information
rifandani authored Mar 7, 2024
1 parent 319736d commit a57e0e1
Show file tree
Hide file tree
Showing 42 changed files with 382 additions and 1,086 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.1

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3

- name: Set node
uses: actions/setup-node@v4
uses: actions/setup-node@v4.0.2
with:
node-version: lts/*
cache: pnpm
Expand All @@ -36,13 +36,13 @@ jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.1

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3

- name: Set node
uses: actions/setup-node@v4
uses: actions/setup-node@v4.0.2
with:
node-version: lts/*
cache: pnpm
Expand All @@ -66,13 +66,13 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.1

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3

- name: Set node version to ${{ matrix.node }}
uses: actions/setup-node@v4
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ matrix.node }}
cache: pnpm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0

- uses: actions/setup-node@v4
- uses: actions/setup-node@v4.0.2
with:
node-version: lts/*

Expand Down
4 changes: 0 additions & 4 deletions .typesafe-i18n.json

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
"recommendations": ["Vue.volar", "lokalise.i18n-ally"]
}
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,10 @@
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"veco.packager.versionTarget": "latest"
"i18n-ally.keystyle": "flat",
"i18n-ally.sourceLanguage": "en-US",
"i18n-ally.regex.key": ".*?",
"i18n-ally.localesPaths": "./src/i18n",
"i18n-ally.enabledFrameworks": ["vue"],
"veco.packager.versionTarget": "latest",
}
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"i18n": "typesafe-i18n",
"test": "vitest",
"test:ui": "vitest --ui",
"test:coverage": "vitest run --coverage",
Expand All @@ -24,8 +23,7 @@
"regression": "run-p lint typecheck test",
"msw:init": "msw init public/ --save",
"msw:delete": "rm -rf public/mockServiceWorker.js",
"dev-only": "rimraf dev-dist && DEBUG=vite-plugin-pwa SW_DEV=true vite",
"dev": "run-p dev-only i18n",
"dev": "rimraf dev-dist && DEBUG=vite-plugin-pwa SW_DEV=true vite",
"dev:claims": "rimraf dev-dist && DEBUG=vite-plugin-pwa SW_DEV=true CLAIMS=true SW=true vite --force",
"dev:destroy": "rimraf dev-dist && DEBUG=vite-plugin-pwa SW_DEV=true SW_DESTROY=true vite --force",
"dev:claims-destroy": "rimraf dev-dist && DEBUG=vite-plugin-pwa SW_DEV=true CLAIMS=true SW_DESTROY=true SW=true vite --force",
Expand Down Expand Up @@ -62,9 +60,9 @@
"primevue": "^3.47.2",
"tailwind-merge": "^2.2.1",
"type-fest": "^4.10.2",
"typesafe-i18n": "^5.26.2",
"vee-validate": "^4.12.5",
"vue": "^3.4.15",
"vue-i18n": "^9.9.1",
"vue-router": "^4.2.5",
"zod": "^3.22.4",
"zod-validation-error": "^3.0.0"
Expand Down
48 changes: 36 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions src/i18n/en-US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"auth": {
"welcome": "Welcome back",
"logout": "Logout",
"dontHaveAccount": "Don't have an account? ",
"registerHere": "Register here",
"404": "404: Not Found",
"gone": "It's gone",
"backTo": "Go back to {path}"
},
"home": {
"sortBtn": "Sort Buttons",
"clock": "Clock",
"toggleClock": "Toggle Clock",
"clickToggleClock": "Click toggle clock to restart the clock",
"getStarted": "Get Started"
},
"todo": {
"todoPlaceholder": "What should you do next...",
"backTo": "Go back to {target}"
},
"common": {
"username": "Username",
"usernamePlaceholder": "Your username...",
"password": "Password",
"passwordPlaceholder": "Your password...",
"error": "Error",
"loginLoading": "Logging in...",
"login": "Login",
"register": "Register",
"add": "Add",
"update": "Update",
"remove": "Remove",
"limit": "Limit",
"loading": "Loading...",
"list": "{feature} List",
"xDetail": "{feature} Detail",
"xCreateSuccess": "{feature} successfully created",
"xCreateError": "{feature} failed to create",
"xUpdateSuccess": "{feature} successfully updated",
"xUpdateError": "{feature} failed to update",
"xDeleteSuccess": "{feature} successfully deleted",
"xDeleteError": "{feature} failed to delete",
"xError": "{feature} error",
"noPageContent": "No Page Content",
"appName": "Vue 3 Template",
"theme": "Theme",
"empty": "Empty Data",
"unauthorized": "Unauthorized. Please login first",
"authorized": "Already authorized",
"unsavedChanges": "Discard unsaved changes - are you sure?",
"system": "System",
"light": "Light",
"dark": "Dark",
"create": "Create",
"settings": "Settings",
"account": "Account",
"language": "Language",
"english": "English",
"errorMinLength": "{field} must contain at least {length} characters",
"action": "{module} failed to {action}"
},
"user": {
"preferences": "Preferences",
"likedTodos": "Liked todos",
"savedTodos": "saved todos",
"yourComments": "Your comments"
}
}
83 changes: 0 additions & 83 deletions src/i18n/en/index.ts

This file was deleted.

20 changes: 0 additions & 20 deletions src/i18n/formatters.ts

This file was deleted.

Loading

0 comments on commit a57e0e1

Please sign in to comment.