Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve i18n in dbprovider for better developer experience #4919

Merged
merged 6 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/providers/dbprovider/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
/public/trainData/
/.vscode/
/local/
platform.json
.yalc/
yalc.lock
19 changes: 19 additions & 0 deletions frontend/providers/dbprovider/.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"
}
5 changes: 3 additions & 2 deletions frontend/providers/dbprovider/next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ module.exports = {
defaultLocale: 'zh',
locales: ['en', 'zh'],
localeDetection: false
}
};
},
reloadOnPrerender: process.env.NODE_ENV === 'development'
}
440 changes: 213 additions & 227 deletions frontend/providers/dbprovider/public/locales/en/common.json

Large diffs are not rendered by default.

Loading
Loading