mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
* feat(i18n): add localization support for Chinese and update description in package.json * feat: add internationalization support to various components and views - Integrated translation functionality using `useT` from `I18nProvider` across multiple components including CustomProviderManager, EnvSetupGuide, FileList, LogViewer, PasswordInput, Select, and various views (CancelledView, ConfigView, DoneView, EmptyView, FailedView, IdleView, RunningView). - Replaced hardcoded strings with localized strings to enhance user experience for different languages. - Updated button labels, titles, and hints to reflect the new translation implementation. * fix: correct regex for validating command names in resolveBin function(预存代码,非本次 PR 引入,阻塞了 lint,这里进行修复) * chore: update open-code-review-vscode-0.1.0.vsix binary file * fix: address OpenCodeReview bot findings for i18n PR - Fix singular '1 hour ago' / '1 小时前' in GitService.formatRelative - Replace hardcoded 'en' locale with dynamic resolveLocale in CliService.install - Move hardcoded full-width colon into i18n translation strings - Narrow locale type from string to SupportedLocale in messages, stores - Extract toHtmlLang() helper to deduplicate locale→HTML lang mapping - Replace nested ternary with mapping object in ConfigView - Add missing trailing newlines to 7 files - Add jest __mocks__/vscode.js for CliService test
119 lines
2.9 KiB
JSON
119 lines
2.9 KiB
JSON
{
|
|
"name": "open-code-review-vscode",
|
|
"displayName": "Open Code Review",
|
|
"description": "%ocr.description%",
|
|
"version": "0.1.0",
|
|
"publisher": "open-code-review",
|
|
"license": "Apache-2.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/nigulasikk/open-code-review.git",
|
|
"directory": "extensions/vscode"
|
|
},
|
|
"engines": {
|
|
"vscode": "^1.74.0"
|
|
},
|
|
"categories": [
|
|
"Other"
|
|
],
|
|
"main": "./out/extension.js",
|
|
"activationEvents": [
|
|
"onStartupFinished"
|
|
],
|
|
"contributes": {
|
|
"viewsContainers": {
|
|
"activitybar": [
|
|
{
|
|
"id": "ocr-container",
|
|
"title": "%ocr.activitybar.title%",
|
|
"icon": "resources/icon.svg"
|
|
}
|
|
]
|
|
},
|
|
"views": {
|
|
"ocr-container": [
|
|
{
|
|
"id": "ocr.sidebar",
|
|
"type": "webview",
|
|
"name": "%ocr.sidebar.name%"
|
|
}
|
|
]
|
|
},
|
|
"commands": [
|
|
{
|
|
"command": "ocr.review.start",
|
|
"title": "%ocr.review.start%"
|
|
},
|
|
{
|
|
"command": "ocr.review.cancel",
|
|
"title": "%ocr.review.cancel%"
|
|
},
|
|
{
|
|
"command": "ocr.config.open",
|
|
"title": "%ocr.config.open%"
|
|
},
|
|
{
|
|
"command": "ocr.comment.apply",
|
|
"title": "%ocr.comment.apply%"
|
|
},
|
|
{
|
|
"command": "ocr.comment.discard",
|
|
"title": "%ocr.comment.discard%"
|
|
},
|
|
{
|
|
"command": "ocr.comment.falsePositive",
|
|
"title": "%ocr.comment.falsePositive%"
|
|
}
|
|
],
|
|
"menus": {
|
|
"comments/commentThread/title": [
|
|
{
|
|
"command": "ocr.comment.apply",
|
|
"group": "navigation@1",
|
|
"when": "commentController == ocr-review && commentThread == pending"
|
|
},
|
|
{
|
|
"command": "ocr.comment.discard",
|
|
"group": "navigation@2",
|
|
"when": "commentController == ocr-review && commentThread =~ /^pending/"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"scripts": {
|
|
"compile": "webpack --mode development",
|
|
"watch": "webpack --mode development --watch",
|
|
"build": "webpack --mode production",
|
|
"test": "jest",
|
|
"lint": "eslint src --ext ts,tsx",
|
|
"package": "vsce package --no-yarn",
|
|
"vscode:prepublish": "yarn build"
|
|
},
|
|
"devDependencies": {
|
|
"@types/jest": "^29.5.0",
|
|
"@types/node": "^18.0.0",
|
|
"@types/vscode": "^1.74.0",
|
|
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
|
"@typescript-eslint/parser": "^6.18.0",
|
|
"@vscode/vsce": "^3.0.0",
|
|
"css-loader": "^6.8.0",
|
|
"eslint": "^8.56.0",
|
|
"jest": "^29.7.0",
|
|
"style-loader": "^3.3.0",
|
|
"ts-jest": "^29.1.0",
|
|
"ts-loader": "^9.5.0",
|
|
"typescript": "^5.3.0",
|
|
"webpack": "^5.89.0",
|
|
"webpack-cli": "^5.1.0"
|
|
},
|
|
"resolutions": {
|
|
"undici": ">=7.28.0",
|
|
"form-data": ">=4.0.6",
|
|
"js-yaml": "^4.2.0",
|
|
"minimatch": "^9.0.7",
|
|
"@typescript-eslint/typescript-estree/minimatch": "^9.0.7"
|
|
},
|
|
"dependencies": {
|
|
"preact": "^10.19.0"
|
|
}
|
|
}
|