fix: add translation for release (#1305)
This commit is contained in:
parent
43a12a99d9
commit
9bef306878
2 changed files with 52 additions and 18 deletions
3
patch.sh
3
patch.sh
|
@ -13,7 +13,8 @@ fi
|
|||
|
||||
read -p "Press any key when the conflict have been resolved..." -n1 -s
|
||||
|
||||
git diff -U1 > "${FILE}"
|
||||
git add .
|
||||
git diff --staged -U1 > "${FILE}"
|
||||
|
||||
cd ..
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/.vscode/settings.json b/.vscode/settings.json
|
||||
index 184042b..a067194 100644
|
||||
index 3907bc7..1772769 100644
|
||||
--- a/.vscode/settings.json
|
||||
+++ b/.vscode/settings.json
|
||||
@@ -87,3 +87,3 @@
|
||||
@@ -88,3 +88,3 @@
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features",
|
||||
- "editor.formatOnSave": true
|
||||
+ // "editor.formatOnSave": true
|
||||
|
@ -120,16 +120,43 @@ index bceda01..4fe44e2 100644
|
|||
+ release: pkg.release
|
||||
});
|
||||
diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
|
||||
index ec4ff95..36e882f 100644
|
||||
index ec4ff95..2ed2c03 100644
|
||||
--- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
|
||||
+++ b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
|
||||
@@ -146,4 +146,5 @@ export class BrowserDialogHandler implements IDialogHandler {
|
||||
@@ -22,2 +22,3 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { MarkdownRenderer } from 'vs/editor/contrib/markdownRenderer/browser/markdownRenderer';
|
||||
+import { getReleaseString } from 'vs/workbench/common/release';
|
||||
|
||||
@@ -145,2 +146,4 @@ export class BrowserDialogHandler implements IDialogHandler {
|
||||
const detailString = (useAgo: boolean): string => {
|
||||
+ const releaseString = getReleaseString();
|
||||
+
|
||||
return localize('aboutDetail',
|
||||
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
|
||||
+ "Version: {0}\nRelease: {1}\nCommit: {2}\nDate: {3}\nBrowser: {4}",
|
||||
this.productService.version || 'Unknown',
|
||||
+ this.productService.release || 'Unknown',
|
||||
this.productService.commit || 'Unknown',
|
||||
@@ -151,3 +154,3 @@ export class BrowserDialogHandler implements IDialogHandler {
|
||||
navigator.userAgent
|
||||
- );
|
||||
+ ).replace('\n', `\n${releaseString} ${this.productService.release || 'Unknown'}\n`);
|
||||
};
|
||||
diff --git a/src/vs/workbench/common/release.ts b/src/vs/workbench/common/release.ts
|
||||
new file mode 100644
|
||||
index 0000000..2a8ea57
|
||||
--- /dev/null
|
||||
+++ b/src/vs/workbench/common/release.ts
|
||||
@@ -0,0 +1,14 @@
|
||||
+import { language } from 'vs/base/common/platform';
|
||||
+
|
||||
+const DEFAULT_LABEL = 'Release:';
|
||||
+const LABELS: { [key: string]: string } = {
|
||||
+ 'en': DEFAULT_LABEL,
|
||||
+ 'fr': 'Révision :',
|
||||
+ 'ru': 'Релиз:',
|
||||
+ 'zh-hans': '发布版本:',
|
||||
+ 'zh-hant': '發布版本:',
|
||||
+};
|
||||
+
|
||||
+export function getReleaseString(): string {
|
||||
+ return LABELS[language] ?? DEFAULT_LABEL;
|
||||
+}
|
||||
diff --git a/src/vs/workbench/contrib/issue/browser/issueService.ts b/src/vs/workbench/contrib/issue/browser/issueService.ts
|
||||
index dc7430b..23def01 100644
|
||||
--- a/src/vs/workbench/contrib/issue/browser/issueService.ts
|
||||
|
@ -139,13 +166,19 @@ index dc7430b..23def01 100644
|
|||
+Release: ${this.productService.release ?? 'unknown'}
|
||||
Commit: ${this.productService.commit ?? 'unknown'}
|
||||
diff --git a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
|
||||
index f63b75f..8e24c02 100644
|
||||
index f63b75f..2b77c1b 100644
|
||||
--- a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
|
||||
+++ b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
|
||||
@@ -169,4 +169,5 @@ export class NativeDialogHandler implements IDialogHandler {
|
||||
return localize({ key: 'aboutDetail', comment: ['Electron, Chromium, Node.js and V8 are product names that need no translation'] },
|
||||
- "Version: {0}\nCommit: {1}\nDate: {2}\nElectron: {3}\nChromium: {4}\nNode.js: {5}\nV8: {6}\nOS: {7}\nSandboxed: {8}",
|
||||
+ "Version: {0}\nRelease: {1}\nCommit: {2}\nDate: {3}\nElectron: {4}\nChromium: {5}\nNode.js: {6}\nV8: {7}\nOS: {8}\nSandboxed: {9}",
|
||||
version,
|
||||
+ this.productService.release || 'Unknown',
|
||||
this.productService.commit || 'Unknown',
|
||||
@@ -17,2 +17,3 @@ import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { process } from 'vs/base/parts/sandbox/electron-sandbox/globals';
|
||||
+import { getReleaseString } from 'vs/workbench/common/release';
|
||||
|
||||
@@ -166,2 +167,3 @@ export class NativeDialogHandler implements IDialogHandler {
|
||||
const osProps = await this.nativeHostService.getOSProperties();
|
||||
+ const releaseString = getReleaseString();
|
||||
|
||||
@@ -179,3 +181,3 @@ export class NativeDialogHandler implements IDialogHandler {
|
||||
process.sandboxed ? 'Yes' : 'No' // TODO@bpasero remove me once sandbox is final
|
||||
- );
|
||||
+ ).replace('\n', `\n${releaseString} ${this.productService.release || 'Unknown'}\n`);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue