From 49c3cf6924f30c959ecfa7ad14e6bff2c6e99675 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 27 Feb 2024 11:34:38 +0100 Subject: [PATCH] fix label && alert --- apps/remix-ide/src/app/tabs/locales/es/filePanel.json | 2 +- apps/remix-ide/src/app/tabs/locales/fr/filePanel.json | 2 +- apps/remix-ide/src/app/tabs/locales/it/filePanel.json | 2 +- apps/remix-ide/src/app/tabs/locales/zh/filePanel.json | 2 +- libs/remix-core-plugin/src/lib/gist-handler.ts | 7 +++++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/locales/es/filePanel.json b/apps/remix-ide/src/app/tabs/locales/es/filePanel.json index 7e4c76a90c..ca6da409aa 100644 --- a/apps/remix-ide/src/app/tabs/locales/es/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/es/filePanel.json @@ -86,7 +86,7 @@ "filePanel.copyFolderFailed": "Copia de Carpeta Fallida", "filePanel.copyFolderFailedMsg": "Error inesperado al copiar la carpeta: {src}", "filePanel.runScriptFailed": "Error al ejecutar el script", - "filePanel.createPublicGist": "Crear una lista pública", + "filePanel.createPublicGist": "Publicar una lista pública", "filePanel.createPublicGistMsg1": "¿Está seguro que desea empujar cambios al archivo gist remoto en github.com?", "filePanel.createPublicGistMsg2": "¿Estás seguro que quieres publicar todos tus archivos de forma anónima en la carpeta {path} como un gist público en github.com?", "filePanel.createPublicGistMsg3": "¿Estás seguro de que quieres publicar de forma anónima el archivo {path} como una gist público en github.com?", diff --git a/apps/remix-ide/src/app/tabs/locales/fr/filePanel.json b/apps/remix-ide/src/app/tabs/locales/fr/filePanel.json index 1a72cc82cd..b38d0682b9 100644 --- a/apps/remix-ide/src/app/tabs/locales/fr/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/fr/filePanel.json @@ -86,7 +86,7 @@ "filePanel.copyFolderFailed": "Échec de la copie du dossier", "filePanel.copyFolderFailedMsg": "Erreur inattendue lors de la copie du fichier : {src}", "filePanel.runScriptFailed": "Échec de l'exécution du script", - "filePanel.createPublicGist": "Créer un gist public", + "filePanel.createPublicGist": "Publier un gist public", "filePanel.createPublicGistMsg1": "Êtes-vous sûr de vouloir envoyer les changements dans le fichier gist distant sur github.com?", "filePanel.createPublicGistMsg2": "Êtes-vous sûr de vouloir publier anonymement tous vos fichiers dans le dossier {path} en tant que gist public sur github.com?", "filePanel.createPublicGistMsg3": "Êtes-vous sûr de vouloir publier anonymement tous vos fichiers dans le dossier {path} en tant que gist public sur github.com?", diff --git a/apps/remix-ide/src/app/tabs/locales/it/filePanel.json b/apps/remix-ide/src/app/tabs/locales/it/filePanel.json index 994dedf5c6..fa8728fa68 100644 --- a/apps/remix-ide/src/app/tabs/locales/it/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/it/filePanel.json @@ -86,7 +86,7 @@ "filePanel.copyFolderFailed": "Copia Cartella Non Riuscita", "filePanel.copyFolderFailedMsg": "Errore inatteso durante la copia della cartella: {src}", "filePanel.runScriptFailed": "Esecuzione dello script non riuscita", - "filePanel.createPublicGist": "Crea Gist Pubblico", + "filePanel.createPublicGist": "Pubblicare Gist Pubblico", "filePanel.createPublicGistMsg1": "Sei sicuro di voler inviare le modifiche al file gist remoto su github.com?", "filePanel.createPublicGistMsg2": "Sei sicuro di voler pubblicare in modo anonimo tutti i tuoi file nella cartella {path} come gist pubblico su github.com?", "filePanel.createPublicGistMsg3": "Sei sicuro di voler pubblicare in modo anonimo tutti i tuoi file nella cartella {path} come gist pubblico su github.com?", diff --git a/apps/remix-ide/src/app/tabs/locales/zh/filePanel.json b/apps/remix-ide/src/app/tabs/locales/zh/filePanel.json index 4d1ea78fa7..6f74fdae19 100644 --- a/apps/remix-ide/src/app/tabs/locales/zh/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/zh/filePanel.json @@ -86,7 +86,7 @@ "filePanel.copyFolderFailed": "复制文件夹失败", "filePanel.copyFolderFailedMsg": "复制文件夹时出现意外错误:{src}", "filePanel.runScriptFailed": "执行脚本失败", - "filePanel.createPublicGist": "创建一个公开的 gist", + "filePanel.createPublicGist": "发布到公共 gist", "filePanel.createPublicGistMsg1": "您确定要将更改推送到 github.com 上的远程 gist 文件吗?", "filePanel.createPublicGistMsg2": "您确定要在 github.com 上以匿名方式将 {path} 文件夹中的所有文件发布为公开的 gist?", "filePanel.createPublicGistMsg3": "您确定要将 {path} 文件匿名发布为 github.com 上的公开 gist?", diff --git a/libs/remix-core-plugin/src/lib/gist-handler.ts b/libs/remix-core-plugin/src/lib/gist-handler.ts index c3a53a75f1..f2f4b3d7fc 100644 --- a/libs/remix-core-plugin/src/lib/gist-handler.ts +++ b/libs/remix-core-plugin/src/lib/gist-handler.ts @@ -117,8 +117,11 @@ export class GistHandler extends Plugin { const gistIdWorkspace = 'gist ' + gistId const workspaces = await this.call('filePanel', 'getWorkspaces') const found = workspaces.find((workspace) => workspace.name === gistIdWorkspace) - if (found) { - await this.call('notification', 'alert', `workspace "${gistIdWorkspace}" already exist`) + if (found) { + await this.call('notification', 'alert', { + id: 'gistAlert', + message: `workspace "${gistIdWorkspace}" already exist`, + }) return } await this.call('filePanel', 'createWorkspace', 'gist ' + gistId, '', true)