Skip to content

Commit

Permalink
Merge pull request #285 from shivam71/Fix_Typos
Browse files Browse the repository at this point in the history
Fixed typos in using l10n for localisation is typescript code  and removed unused labels from bundles
  • Loading branch information
sid-srini authored Sep 30, 2024
2 parents c3a5440 + 08f6385 commit c14459a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 58 deletions.
35 changes: 13 additions & 22 deletions vscode/l10n/bundle.l10n.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"jdk.downloader.message.completedInstallingJdk": "Completed installing JDK. Please reload Visual Studio Code to enable it.",
"jdk.downloader.message.addedJdkPath": "Added JDK Path to the configuration settings. Please reload Visual Studio Code to enable it.",
"jdk.downloader.message.reload": "Reload now",
"jdk.explorer.error_message":"Cannot delete node {label}",
"jdk.explorer.error_message.cannotDeleteNode":"Cannot delete node {label}",
"jdk.extension.label.openInNewWindow": "Open in new window",
"jdk.extension.label.addToWorkSpace": "Add to current workspace",
"jdk.extension.message.newProjectCreated": "New project created",
Expand Down Expand Up @@ -81,27 +81,18 @@
"jdk.extension.runConfig.env.prompt": "Customize environment variables",
"jdk.extension.runConfig.wrkdir.label": "Working Dir:",
"jdk.extension.runConfig.wrkdir.prompt": "Customize working directory",
"jdk.extenstion.notInstalled.label":"Extension not installed.",
"jdk.extenstion.error_msg.clientNotAvailable":"Client not available",
"jdk.extenstion.progressBar.error_msg.cannotRun":"cannot run {lsCommand}; client is {client}",
"jdk.extenstion.error_msg.doesntSupportNewTeamplate":"Client {client} doesn't support new from template",
"jdk.extenstion.error_msg.doesntSupportNewProject":"Client {client} doesn't support new project",
"jdk.extenstion.error_msg.doesntSupportGoToTest":"Client {client} doesn't support go to test",
"jdk.extenstion.error_msg.noSuperImpl":"No super implementation found",
"jdk.extenstion.error_msg.cacheDeletionError":"Error deleting the cache",
"jdk.extenstion.message.cacheDeleted":"Cache deleted successfully",
"jdk.extenstion.cache.error_msg.cannotFindWrkSpacePath":"Cannot find workspace path",
"jdk.extenstion.debugger.error_msg.debugAdapterNotInitialized":"Oracle Java SE Debug Server Adapter not yet initialized. Please wait for a while and try again.",
"jdk.extension.notInstalled.label":"Extension not installed.",
"jdk.extension.error_msg.clientNotAvailable":"Client not available",
"jdk.extension.progressBar.error_msg.cannotRun":"cannot run {lsCommand}; client is {client}",
"jdk.extension.error_msg.doesntSupportNewTeamplate":"Client {client} doesn't support new from template",
"jdk.extension.error_msg.doesntSupportNewProject":"Client {client} doesn't support new project",
"jdk.extension.error_msg.doesntSupportGoToTest":"Client {client} doesn't support go to test",
"jdk.extension.error_msg.noSuperImpl":"No super implementation found",
"jdk.extension.error_msg.cacheDeletionError":"Error deleting the cache",
"jdk.extension.message.cacheDeleted":"Cache deleted successfully",
"jdk.extension.cache.error_msg.cannotFindWrkSpacePath":"Cannot find workspace path",
"jdk.extension.debugger.error_msg.debugAdapterNotInitialized":"Oracle Java SE Debug Server Adapter not yet initialized. Please wait for a while and try again.",
"jdk.workspace.new.prompt": "Input the directory path where the new file will be generated",
"jdk.extension.utils.error_message.failedHttpsRequest": "Failed to get {url} ({statusCode})",
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME} not enabled",
"LBL_Run": "Run {methodName}",
"LBL_Debug": "Debug {methodName}",
"LBL_RunWith": "Run {methodName} with {config}",
"LBL_DebugWith": "Debug {methodName} with {config}",
"LBL_TestMethod":"Test {methodName}",
"LBL_ProfileMethod":"Profile {methodName}",
"LBL_Clean":"Clean",
"LBL_Build":"Build",
"LBL_ContinuousMode":"Continuous Mode"
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME} not enabled"
}
24 changes: 12 additions & 12 deletions vscode/l10n/bundle.l10n.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"jdk.downloader.message.completedInstallingJdk": "JDKのインストールが完了しました。有効にするには、Visual Studio Codeをリロードしてください。",
"jdk.downloader.message.addedJdkPath": "構成設定にJDKパスを追加しました。有効にするには、Visual Studio Codeをリロードしてください。",
"jdk.downloader.message.reload": "すぐにリロード",
"jdk.explorer.error_message":"ノード{label}を削除できません",
"jdk.explorer.error_message.cannotDeleteNode":"ノード{label}を削除できません",
"jdk.extension.label.openInNewWindow": "新規ウィンドウで開く",
"jdk.extension.label.addToWorkSpace": "現在のワークスペースに追加",
"jdk.extension.message.newProjectCreated": "作成された新規プロジェクト",
Expand Down Expand Up @@ -81,17 +81,17 @@
"jdk.extension.runConfig.env.prompt": "環境変数のカスタマイズ",
"jdk.extension.runConfig.wrkdir.label": "作業ディレクトリ:",
"jdk.extension.runConfig.wrkdir.prompt": "作業ディレクトリのカスタマイズ",
"jdk.extenstion.notInstalled.label":"拡張機能がインストールされませんでした。",
"jdk.extenstion.error_msg.clientNotAvailable":"クライアントを使用できません",
"jdk.extenstion.progressBar.error_msg.cannotRun":"{lsCommand}を実行できません。クライアントは{client}です",
"jdk.extenstion.error_msg.doesntSupportNewTeamplate":"クライアント{client}では、「テンプレートから新規作成」はサポートされていません",
"jdk.extenstion.error_msg.doesntSupportNewProject":"クライアント{client}では、新規プロジェクトはサポートされていません",
"jdk.extenstion.error_msg.doesntSupportGoToTest":"クライアント{client}では、「テストへ移動」はサポートされていません",
"jdk.extenstion.error_msg.noSuperImpl":"スーパークラスの実装が見つかりません",
"jdk.extenstion.error_msg.cacheDeletionError":"キャッシュの削除中にエラーが発生しました",
"jdk.extenstion.message.cacheDeleted":"キャッシュが正常に削除されました",
"jdk.extenstion.cache.error_msg.cannotFindWrkSpacePath":"ワークスペース・パスが見つかりません",
"jdk.extenstion.debugger.error_msg.debugAdapterNotInitialized":"Oracle Java SEのデバッグ・サーバー・アダプタが、まだ初期化されていません。しばらく待ってから再試行してください。",
"jdk.extension.notInstalled.label":"拡張機能がインストールされませんでした。",
"jdk.extension.error_msg.clientNotAvailable":"クライアントを使用できません",
"jdk.extension.progressBar.error_msg.cannotRun":"{lsCommand}を実行できません。クライアントは{client}です",
"jdk.extension.error_msg.doesntSupportNewTeamplate":"クライアント{client}では、「テンプレートから新規作成」はサポートされていません",
"jdk.extension.error_msg.doesntSupportNewProject":"クライアント{client}では、新規プロジェクトはサポートされていません",
"jdk.extension.error_msg.doesntSupportGoToTest":"クライアント{client}では、「テストへ移動」はサポートされていません",
"jdk.extension.error_msg.noSuperImpl":"スーパークラスの実装が見つかりません",
"jdk.extension.error_msg.cacheDeletionError":"キャッシュの削除中にエラーが発生しました",
"jdk.extension.message.cacheDeleted":"キャッシュが正常に削除されました",
"jdk.extension.cache.error_msg.cannotFindWrkSpacePath":"ワークスペース・パスが見つかりません",
"jdk.extension.debugger.error_msg.debugAdapterNotInitialized":"Oracle Java SEのデバッグ・サーバー・アダプタが、まだ初期化されていません。しばらく待ってから再試行してください。",
"jdk.workspace.new.prompt": "新しいファイルを生成するディレクトリのパスを入力してください",
"jdk.extension.utils.error_message.failedHttpsRequest": "{url}の取得に失敗しました({statusCode})",
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME}が有効化されていません"
Expand Down
24 changes: 12 additions & 12 deletions vscode/l10n/bundle.l10n.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"jdk.downloader.message.completedInstallingJdk": "已完成 JDK 安装。请重新加载 Visual Studio Code 来启用它。",
"jdk.downloader.message.addedJdkPath": "已将 JDK 路径添加到配置设置。请重新加载 Visual Studio Code 来启用它。",
"jdk.downloader.message.reload": "立即重新加载",
"jdk.explorer.error_message":"无法删除节点 {label}",
"jdk.explorer.error_message.cannotDeleteNode":"无法删除节点 {label}",
"jdk.extension.label.openInNewWindow": "在新窗口中打开",
"jdk.extension.label.addToWorkSpace": "添加到当前工作区",
"jdk.extension.message.newProjectCreated": "已创建新项目",
Expand Down Expand Up @@ -81,17 +81,17 @@
"jdk.extension.runConfig.env.prompt": "定制环境变量",
"jdk.extension.runConfig.wrkdir.label": "工作目录:",
"jdk.extension.runConfig.wrkdir.prompt": "定制工作目录",
"jdk.extenstion.notInstalled.label":"未安装扩展。",
"jdk.extenstion.error_msg.clientNotAvailable":"客户端不可用",
"jdk.extenstion.progressBar.error_msg.cannotRun":"无法运行 {lsCommand};客户端为 {client}",
"jdk.extenstion.error_msg.doesntSupportNewTeamplate":"客户端 {client} 不支持从模板新建",
"jdk.extenstion.error_msg.doesntSupportNewProject":"客户端 {client} 不支持新项目",
"jdk.extenstion.error_msg.doesntSupportGoToTest":"客户端 {client} 不支持转至测试",
"jdk.extenstion.error_msg.noSuperImpl":"未找到超级实现",
"jdk.extenstion.error_msg.cacheDeletionError":"删除高速缓存时出错",
"jdk.extenstion.message.cacheDeleted":"已成功删除高速缓存",
"jdk.extenstion.cache.error_msg.cannotFindWrkSpacePath":"找不到工作区路径",
"jdk.extenstion.debugger.error_msg.debugAdapterNotInitialized":"Oracle Java SE 调试服务器适配器尚未初始化。请稍候,然后重试。",
"jdk.extension.notInstalled.label":"未安装扩展。",
"jdk.extension.error_msg.clientNotAvailable":"客户端不可用",
"jdk.extension.progressBar.error_msg.cannotRun":"无法运行 {lsCommand};客户端为 {client}",
"jdk.extension.error_msg.doesntSupportNewTeamplate":"客户端 {client} 不支持从模板新建",
"jdk.extension.error_msg.doesntSupportNewProject":"客户端 {client} 不支持新项目",
"jdk.extension.error_msg.doesntSupportGoToTest":"客户端 {client} 不支持转至测试",
"jdk.extension.error_msg.noSuperImpl":"未找到超级实现",
"jdk.extension.error_msg.cacheDeletionError":"删除高速缓存时出错",
"jdk.extension.message.cacheDeleted":"已成功删除高速缓存",
"jdk.extension.cache.error_msg.cannotFindWrkSpacePath":"找不到工作区路径",
"jdk.extension.debugger.error_msg.debugAdapterNotInitialized":"Oracle Java SE 调试服务器适配器尚未初始化。请稍候,然后重试。",
"jdk.workspace.new.prompt": "输入生成新文件的目录路径",
"jdk.extension.utils.error_message.failedHttpsRequest": "无法获取 {url} ({statusCode})",
"jdk.extension.error_msg.notEnabled": "{SERVER_NAME} 未启用"
Expand Down
1 change: 0 additions & 1 deletion vscode/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@
"jdk.configurationSnippets.name": "Launch Java App",
"jdk.configurationSnippets.label": "Java+: Launch Java Application",
"jdk.configurationSnippets.description": "Launch a Java Application in debug mode"

}
22 changes: 11 additions & 11 deletions vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ export function awaitClient() : Promise<NbLanguageClient> {
}
let nbcode = vscode.extensions.getExtension(ORACLE_VSCODE_EXTENSION_ID);
if (!nbcode) {
return Promise.reject(new Error(l10n.value("jdk.extenstion.notInstalled.label")));
return Promise.reject(new Error(l10n.value("jdk.extension.notInstalled.label")));
}
const t : Thenable<NbLanguageClient> = nbcode.activate().then(nc => {
if (client === undefined || client instanceof InitialPromise) {
throw new Error(l10n.value("jdk.extenstion.error_msg.clientNotAvailable"));
throw new Error(l10n.value("jdk.extension.error_msg.clientNotAvailable"));
} else {
return client;
}
Expand Down Expand Up @@ -312,7 +312,7 @@ function wrapCommandWithProgress(lsCommand : string, title : string, log? : vsco
}
}
} else {
reject(l10n.value("jdk.extenstion.progressBar.error_msg.cannotRun",{lsCommand:lsCommand,client:c}));
reject(l10n.value("jdk.extension.progressBar.error_msg.cannotRun",{lsCommand:lsCommand,client:c}));
}
});
});
Expand Down Expand Up @@ -435,7 +435,7 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
}
}
} else {
throw l10n.value("jdk.extenstion.error_msg.doesntSupportNewTeamplate",{client:c});
throw l10n.value("jdk.extension.error_msg.doesntSupportNewTeamplate",{client:c});
}
}));
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.workspace.newproject', async (ctx) => {
Expand All @@ -457,7 +457,7 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
}
}
} else {
throw l10n.value("jdk.extenstion.error_msg.doesntSupportNewProject",{client,c});
throw l10n.value("jdk.extension.error_msg.doesntSupportNewProject",{client:c});
}
}));

Expand Down Expand Up @@ -512,14 +512,14 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
vscode.window.showInformationMessage(err?.message || l10n.value("jdk.extension.fileSelector.label.noTestFound"));
}
} else {
throw l10n.value("jdk.extenstion.error_msg.doesntSupportGoToTest",{client:c});
throw l10n.value("jdk.extension.error_msg.doesntSupportGoToTest",{client:c});
}
}));

context.subscriptions.push(vscode.commands.registerCommand(COMMAND_PREFIX + ".delete.cache", async () => {
const storagePath = context.storageUri?.fsPath;
if (!storagePath) {
vscode.window.showErrorMessage(l10n.value("jdk.extenstion.cache.error_msg.cannotFindWrkSpacePath"));
vscode.window.showErrorMessage(l10n.value("jdk.extension.cache.error_msg.cannotFindWrkSpacePath"));
return;
}

Expand All @@ -536,9 +536,9 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
deactivated = true;
await killNbProcess(false, log);
await fs.promises.rmdir(userDir, { recursive: true });
await vscode.window.showInformationMessage(l10n.value("jdk.extenstion.message.cacheDeleted"), reloadWindowActionLabel);
await vscode.window.showInformationMessage(l10n.value("jdk.extension.message.cacheDeleted"), reloadWindowActionLabel);
} catch (err) {
await vscode.window.showErrorMessage(l10n.value("jdk.extenstion.error_msg.cacheDeletionError"), reloadWindowActionLabel);
await vscode.window.showErrorMessage(l10n.value("jdk.extension.error_msg.cacheDeletionError"), reloadWindowActionLabel);
} finally {
vscode.commands.executeCommand("workbench.action.reloadWindow");
}
Expand Down Expand Up @@ -579,7 +579,7 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
const locations: any[] = await vscode.commands.executeCommand(COMMAND_PREFIX + '.java.super.implementation', uri.toString(), position) || [];
return vscode.commands.executeCommand('editor.action.goToLocations', window.activeTextEditor.document.uri, position,
locations.map(location => new vscode.Location(vscode.Uri.parse(location.uri), new vscode.Range(location.range.start.line, location.range.start.character, location.range.end.line, location.range.end.character))),
'peek', l10n.value('jdk.extenstion.error_msg.noSuperImpl'));
'peek', l10n.value('jdk.extension.error_msg.noSuperImpl'));
}));
context.subscriptions.push(commands.registerCommand(COMMAND_PREFIX + '.rename.element.at', async (offset) => {
const editor = window.activeTextEditor;
Expand Down Expand Up @@ -1525,7 +1525,7 @@ class NetBeansDebugAdapterDescriptionFactory implements vscode.DebugAdapterDescr
if (cnt-- > 0) {
setTimeout(fnc, 1000);
} else {
reject(new Error(l10n.value('jdk.extenstion.debugger.error_msg.debugAdapterNotInitialized')));
reject(new Error(l10n.value('jdk.extension.debugger.error_msg.debugAdapterNotInitialized')));
}
} else {
// resolve(new vscode.DebugAdapterServer(debugPort));
Expand Down

0 comments on commit c14459a

Please sign in to comment.