Skip to content

Commit

Permalink
refactor: enhance i18n type annotations for better developer experien…
Browse files Browse the repository at this point in the history
…ce (labring#4878)

* refactor: enhance i18n type annotations for better developer experience

* desktop done

* fix build

* delete script

* fix launchpad ci

* delete file

* update

* delete appname as I18nCommonKey

* update
  • Loading branch information
zjy365 authored Jul 16, 2024
1 parent 26604f9 commit d2ea1ed
Show file tree
Hide file tree
Showing 77 changed files with 1,023 additions and 890 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ tmp
**/.DS_Store
node_modules
vendor
.vscode/
pkg/registry/save/testdata/registry
.dummy.report.md
deploy/cloud/tars
20 changes: 20 additions & 0 deletions frontend/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"i18n-ally.localesPaths": [
"providers/**/public/locales",
"desktop/public/locales"
],
"i18n-ally.enabledParsers": [
"json",
"yaml",
"js",
"ts"
],
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.keepFulfilled": false,
"i18n-ally.sourceLanguage": "zh",
"i18n-ally.displayLanguage": "zh",
"i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.json",
"i18n-ally.extract.targetPickingStrategy": "most-similar-by-key"
}
19 changes: 19 additions & 0 deletions frontend/desktop/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"i18n-ally.localesPaths": [
"public/locales"
],
"i18n-ally.enabledParsers": [
"json",
"yaml",
"js",
"ts"
],
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.keepFulfilled": false,
"i18n-ally.sourceLanguage": "zh",
"i18n-ally.displayLanguage": "zh",
"i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.json",
"i18n-ally.extract.targetPickingStrategy": "most-similar-by-key"
}
6 changes: 3 additions & 3 deletions frontend/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"eslint": "8.38.0",
"eslint-config-next": "13.3.0",
"framer-motion": "^10.16.4",
"i18next": "^22.5.1",
"i18next": "^23.11.5",
"immer": "^10.0.2",
"js-cookie": "^3.0.5",
"js-yaml": "^4.1.0",
Expand All @@ -53,7 +53,7 @@
"mongodb": "^5.9.0",
"nanoid": "^4.0.2",
"next": "13.3.0",
"next-i18next": "^13.3.0",
"next-i18next": "^15.3.0",
"next-pwa": "^5.6.0",
"nodemailer": "^6.9.13",
"nprogress": "^0.2.0",
Expand All @@ -65,7 +65,7 @@
"react-dom": "18.2.0",
"react-draggable": "^4.4.6",
"react-hook-form": "^7.46.2",
"react-i18next": "^12.3.1",
"react-i18next": "^14.1.2",
"sass": "^1.68.0",
"sealos-desktop-sdk": "workspace:*",
"sharp": "^0.32.6",
Expand Down
20 changes: 10 additions & 10 deletions frontend/desktop/public/locales/en/cloudProviders.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Volcano Engine": "Volcano Engine",
"Alibaba Cloud": "Alibaba Cloud",
"Tencent Cloud": "Tencent Cloud",
"Google Cloud": "Google Cloud",
"Provider": "Provider",
"Beijing": "Beijing",
"Singapore": "Singapore",
"Guangzhou": "Guangzhou",
"Hangzhou": "Hangzhou"
}
"volcano_engine": "Volcano Engine",
"alibaba_cloud": "Alibaba Cloud",
"tencent_cloud": "Tencent Cloud",
"google_cloud": "Google Cloud",
"provider": "Provider",
"beijing": "Beijing",
"singapore": "Singapore",
"guangzhou": "Guangzhou",
"hangzhou": "Hangzhou"
}
Loading

0 comments on commit d2ea1ed

Please sign in to comment.