Skip to content

Commit e4f1dc3

Browse files
committed
Add localization support to installation and update scripts
- even though you not always clone but update, always say 'cloning repository' - installation script should accept a language flag and show the user translated progress (defaulting to EN when run without flag said) ├── apps │ └── editor │ ├── package.json │ └── src │ ├── commands │ │ └── check-for-updates-command.ts │ ├── i18n │ │ └── translations │ │ └── commands │ │ └── check-for-updates-command.ts │ ├── utils │ │ └── update-extension.ts │ └── views │ └── prompt │ └── backend │ └── message-handlers │ └── handle-update-extension.ts ├── install.ps1 └── install.sh
1 parent 7888640 commit e4f1dc3

3 files changed

Lines changed: 743 additions & 48 deletions

File tree

‎apps/editor/src/utils/update-extension.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ export const update_extension = () => {
66
terminal.show()
77

88
const uriScheme = vscode.env.uriScheme
9+
const lang = vscode.env.language
910

1011
if (os.platform() === 'win32') {
1112
terminal.sendText(
12-
`powershell -c "& ([scriptblock]::Create((irm https://raw.githubusercontent.com/CodeWebChat/CWC/main/install.ps1))) '${uriScheme}'"`
13+
`powershell -c "& ([scriptblock]::Create((irm https://raw.githubusercontent.com/CodeWebChat/CWC/main/install.ps1))) '${uriScheme}' '${lang}'"`
1314
)
1415
} else {
1516
terminal.sendText(
16-
`curl -fsSL https://raw.githubusercontent.com/CodeWebChat/CWC/main/install.sh | bash -s -- "${uriScheme}"`
17+
`curl -fsSL https://raw.githubusercontent.com/CodeWebChat/CWC/main/install.sh | bash -s -- "${uriScheme}" "${lang}"`
1718
)
1819
}
1920
}

0 commit comments

Comments
 (0)