From 4e56ec677b7de77b4b5257de9178b435bc3c45c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 7 Sep 2023 22:23:39 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20http(s)=20download=20fr?= =?UTF-8?q?om=20user=20alert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The user alert for failed plugin downloads suggested that it was still possible to download an official plugin over http(s). It was not, that code has already been removed. Now the user alert doesn’t suggest it anymore. --- src/freenet/l10n/freenet.l10n.de.properties | 4 +- src/freenet/l10n/freenet.l10n.en.properties | 4 +- src/freenet/l10n/freenet.l10n.es.properties | 3 -- src/freenet/l10n/freenet.l10n.fi.properties | 1 - src/freenet/l10n/freenet.l10n.fr.properties | 3 -- src/freenet/l10n/freenet.l10n.it.properties | 3 -- src/freenet/l10n/freenet.l10n.ja.properties | 3 -- .../l10n/freenet.l10n.nb-no.properties | 3 -- src/freenet/l10n/freenet.l10n.nl.properties | 3 -- .../l10n/freenet.l10n.pt-br.properties | 3 -- src/freenet/l10n/freenet.l10n.ru.properties | 3 -- .../l10n/freenet.l10n.zh-cn.properties | 3 -- .../l10n/freenet.l10n.zh-tw.properties | 3 -- src/freenet/pluginmanager/PluginManager.java | 39 +++++++------------ 14 files changed, 15 insertions(+), 63 deletions(-) diff --git a/src/freenet/l10n/freenet.l10n.de.properties b/src/freenet/l10n/freenet.l10n.de.properties index 423a5a0e60..c156a876c9 100644 --- a/src/freenet/l10n/freenet.l10n.de.properties +++ b/src/freenet/l10n/freenet.l10n.de.properties @@ -1360,10 +1360,8 @@ PluginManager.pluginLoadingFailedShort=Das Plugin ${name} konnte nicht geladen w PluginManager.pluginLoadingFailed=Das Plugin (Erweiterung) ${name} konnte nicht geladen werden. PluginManager.pluginLoadingFailedStillTryingOverFreenet=Es wird immer noch versucht, das Plugin über das Freenet zu laden. PluginManager.pluginLoadingFailedWithMessage=Das Plugin (Erweiterung) ${name} konnte nicht geladen werden: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=Sie können versuchen, dieses Plugin erneut über Freenet herunterladen, oder es über das Web probieren. -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=Sie können dieses Plugin über Freenet herunterladen, oder es noch einmal über das Web versuchen. +PluginManager.officialPluginLoadFailedSuggestTryAgain=Sie können es erneut versuchen. PluginManager.officialPluginLoadFailedTryAgainFreenet=Lade das Plugin aus dem Freenet -PluginManager.officialPluginLoadFailedTryAgain=Neuer Versuch, das offizielle Plugin von den Freenet-Webservern herunterzuladen (NICHT ANONYM!) PluginToadlet.addPluginTitle=Ein Plugin hinzufügen PluginToadlet.failedToLoadPlugin=Laden des Plugins fehlgeschlagen. PluginToadlet.failedToLoadPluginCheckClass=Das Plugin (Erweiterung), das Sie angefordert haben, konnte nicht geladen werden. Bitte überprüfen Sie den Namen der Klasse des Plugins und die URL, wenn Sie eine angegeben haben. diff --git a/src/freenet/l10n/freenet.l10n.en.properties b/src/freenet/l10n/freenet.l10n.en.properties index 297828923a..4f7a419455 100644 --- a/src/freenet/l10n/freenet.l10n.en.properties +++ b/src/freenet/l10n/freenet.l10n.en.properties @@ -1494,10 +1494,8 @@ PluginManager.pluginLoadingFailedShort=Could not load plugin ${name}! PluginManager.pluginLoadingFailed=The plugin ${name} could not be loaded PluginManager.pluginLoadingFailedStillTryingOverFreenet=We are still trying to load the plugin over Freenet. PluginManager.pluginLoadingFailedWithMessage=The plugin ${name} could not be loaded: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=You can try again over Freenet, or you can fetch it over the web. -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=You can fetch the plugin over Freenet, or you can try again over the web. +PluginManager.officialPluginLoadFailedSuggestTryAgain=You can try again. PluginManager.officialPluginLoadFailedTryAgainFreenet=Load the plugin from Freenet -PluginManager.officialPluginLoadFailedTryAgain=Load the plugin over the web from our server (NOT ANONYMOUS!) PluginToadlet.addPluginTitle=Add a plugin PluginToadlet.failedToLoadPlugin=Failed to load plugin. PluginToadlet.failedToLoadPluginCheckClass=The plugin you requested could not be loaded. Please verify the name of the plugin's class and the URL, if you gave one. diff --git a/src/freenet/l10n/freenet.l10n.es.properties b/src/freenet/l10n/freenet.l10n.es.properties index 08ccc9999d..b51e640fb4 100644 --- a/src/freenet/l10n/freenet.l10n.es.properties +++ b/src/freenet/l10n/freenet.l10n.es.properties @@ -1391,10 +1391,7 @@ PluginManager.pluginLoadingFailedShort=¡No se pudo cargar el complemento ${name PluginManager.pluginLoadingFailed=No se pudo cargar el complemento ${name} PluginManager.pluginLoadingFailedStillTryingOverFreenet=Aún estamos intentando cargar el complemento desde Freenet. PluginManager.pluginLoadingFailedWithMessage=El complemento ${name} no se pudo cargar: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=Puede intentarlo de nuevo a través de Freenet, o puede obtenerlo desde la web. -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=Puede obtener el complemento (plugin) a través de Freenet, o puede intentarlo de nuevo desde la web. PluginManager.officialPluginLoadFailedTryAgainFreenet=Cargar el complemento desde Freenet -PluginManager.officialPluginLoadFailedTryAgain=Cargar el complemento vía web desde nuestros servidores (¡NO ES ANÓNIMO!) PluginToadlet.addPluginTitle=Añadir un complemento PluginToadlet.failedToLoadPlugin=Fallo al cargar el complemento. PluginToadlet.failedToLoadPluginCheckClass=No se pudo cargar el complemento (plugin) solicitado. Verifique por favor el nombre de clase del complemento y su URL, si dio una. diff --git a/src/freenet/l10n/freenet.l10n.fi.properties b/src/freenet/l10n/freenet.l10n.fi.properties index 1d20425013..e59240740c 100644 --- a/src/freenet/l10n/freenet.l10n.fi.properties +++ b/src/freenet/l10n/freenet.l10n.fi.properties @@ -860,7 +860,6 @@ PluginManager.pluginLoadingFailedShort=Liitännäistä ${name} ei voitu ottaa k PluginManager.pluginLoadingFailed=Määritettyä liitännäistä ${name} ei voitu ottaa käyttöön PluginManager.pluginLoadingFailedStillTryingOverFreenet=Yritämme yhä ladata lisäosaa Freenetistä. PluginManager.pluginLoadingFailedWithMessage=Määritettyä liitännäistä ${name} ei voitu ottaa käyttöön: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=Voit yrittää uudelleen Freenetistä tai voit hakea sen webistä. PluginManager.officialPluginLoadFailedTryAgainFreenet=Lataa lisäosa Freenetistä. PluginToadlet.addPluginTitle=Lisää liitännäinen PluginToadlet.failedToLoadPlugin=Liitännäisen lisäys epäonnistui. diff --git a/src/freenet/l10n/freenet.l10n.fr.properties b/src/freenet/l10n/freenet.l10n.fr.properties index f40574d608..4b9184ab36 100644 --- a/src/freenet/l10n/freenet.l10n.fr.properties +++ b/src/freenet/l10n/freenet.l10n.fr.properties @@ -1389,10 +1389,7 @@ PluginManager.pluginLoadingFailedShort=Impossible de charger le greffon ${name} PluginManager.pluginLoadingFailed=Le greffon ${name} n’a pas pu être chargé PluginManager.pluginLoadingFailedStillTryingOverFreenet=Nous essayons toujours de charger le greffon depuis Freenet. PluginManager.pluginLoadingFailedWithMessage=Le greffon ${name} n’a pas pu être chargé : ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=Vous pouvez réessayer sur Freenet ou vous pouvez le récupérer sur le Web. -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=Vous pouvez récupérer le greffon depuis Freenet, ou vous pouvez réessayer par le Web. PluginManager.officialPluginLoadFailedTryAgainFreenet=Charger le greffon depuis Freenet -PluginManager.officialPluginLoadFailedTryAgain=Charger le greffon à partir de notre serveur par le Web (N’EST PAS ANONYME !) PluginToadlet.addPluginTitle=Ajouter un greffon PluginToadlet.failedToLoadPlugin=Échec de chargement du greffon. PluginToadlet.failedToLoadPluginCheckClass=Le greffon que vous avez demandé n’a pas pu être chargé. Veuillez vérifier le nom de la classe du greffon et l’URL, si vous en avez donné une. diff --git a/src/freenet/l10n/freenet.l10n.it.properties b/src/freenet/l10n/freenet.l10n.it.properties index 4e279fa131..fb5469ba66 100644 --- a/src/freenet/l10n/freenet.l10n.it.properties +++ b/src/freenet/l10n/freenet.l10n.it.properties @@ -1296,10 +1296,7 @@ PluginManager.pluginLoadingFailedShort=Impossibile caricare il plugin ${name}! PluginManager.pluginLoadingFailed=Non è stato possibile caricare il plugin specificato ${name}. PluginManager.pluginLoadingFailedStillTryingOverFreenet=Il caricamento del plugin da Freenet è ancora in corso. PluginManager.pluginLoadingFailedWithMessage=Non è stato possibile caricare il plugin specificato ${name}: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=È possibile riprovare a scaricare da Freenet, o scaricare dal web -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=È possibile scaricare il plugin via Freenet o riprovare a scaricarlo via web. PluginManager.officialPluginLoadFailedTryAgainFreenet=Carica il plugin da Freenet -PluginManager.officialPluginLoadFailedTryAgain=Carica il plugin sul web dal nostro server (NON ANONIMO!) PluginToadlet.addPluginTitle=Carica plugin PluginToadlet.failedToLoadPlugin=Caricamento plugin fallito. PluginToadlet.failedToLoadPluginCheckClass=Non è stato possibile caricare il plugin richiesto. Verificare il nome del plugin, class, e URL se se ne è usata una. diff --git a/src/freenet/l10n/freenet.l10n.ja.properties b/src/freenet/l10n/freenet.l10n.ja.properties index 43ed808d92..9f805522dc 100644 --- a/src/freenet/l10n/freenet.l10n.ja.properties +++ b/src/freenet/l10n/freenet.l10n.ja.properties @@ -872,10 +872,7 @@ PluginManager.pluginLoadingFailedShort=プラグイン${name}をロードでき PluginManager.pluginLoadingFailed=プラグイン ${name} はロードできませんでした PluginManager.pluginLoadingFailedStillTryingOverFreenet=我々はまだFreeenetからプラグインをロードしようとしています。 PluginManager.pluginLoadingFailedWithMessage=プラグイン ${name} をロードできませんでした: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=Freenet経由で再トライできますが、web経由でフェッチすることもできます。 -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=Freenetからプラグインをフェッチできますが、web経由で再トライすることもできます。 PluginManager.officialPluginLoadFailedTryAgainFreenet=Freenetからプラグインを読み込む -PluginManager.officialPluginLoadFailedTryAgain=Web経由で我々のサーバからプラグインをロードする (匿名ではありません!) PluginToadlet.addPluginTitle=プラグインを追加 PluginToadlet.failedToLoadPlugin=プラグインのロードに失敗しました。 PluginToadlet.failedToLoadPluginCheckClass=リクエストされたプラグインが読み込めませんでした。プラグインのクラス名と、URLを指定している場合はそのURLを確認してください。 diff --git a/src/freenet/l10n/freenet.l10n.nb-no.properties b/src/freenet/l10n/freenet.l10n.nb-no.properties index 619bbad1a3..23dc8ee941 100644 --- a/src/freenet/l10n/freenet.l10n.nb-no.properties +++ b/src/freenet/l10n/freenet.l10n.nb-no.properties @@ -1075,10 +1075,7 @@ PluginManager.pluginLoadingFailedShort=Kunne ikke å laste programtillegget ${na PluginManager.pluginLoadingFailed=Kunne ikke laste inn programtillegget ${name} PluginManager.pluginLoadingFailedStillTryingOverFreenet=Prøver fremdeles å laste programtillegget over Freenet. PluginManager.pluginLoadingFailedWithMessage=Kunne ikke laste inn programtillegget ${name}: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=Du kan prøve igjen over Freenet, eller hente det ned over nettet. -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=Du kan hente inn programtillegget over Freenet, eller du kan prøve igjen via vev-en. PluginManager.officialPluginLoadFailedTryAgainFreenet=Last programtillegget fra Freenet -PluginManager.officialPluginLoadFailedTryAgain=Last inn et programtillegg fra vev-en fra våre tjenere (IKKE ANONYMT!) PluginToadlet.addPluginTitle=Legg til et programtillegg PluginToadlet.failedToLoadPlugin=Innlasting av programtillegg mislyktes. PluginToadlet.failedToLoadPluginCheckClass=Programtillegget du bad om kunne ikke lastes. Sjekk navnet på tilleggets klasse og URL, hvis du har angitt det. diff --git a/src/freenet/l10n/freenet.l10n.nl.properties b/src/freenet/l10n/freenet.l10n.nl.properties index 4ff487f0c3..3f65ee1a15 100644 --- a/src/freenet/l10n/freenet.l10n.nl.properties +++ b/src/freenet/l10n/freenet.l10n.nl.properties @@ -1345,10 +1345,7 @@ PluginManager.pluginLoadingFailedShort=Plugin ${name} kon niet geladen worden. PluginManager.pluginLoadingFailed=De opgegeven plugin ${name} kon niet worden geladen PluginManager.pluginLoadingFailedStillTryingOverFreenet=Deze node probeert nog steeds de plugin te laden via Freenet. PluginManager.pluginLoadingFailedWithMessage=De opgegeven plugin ${name} kon niet worden geladen: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=Je kunt de plugin opnieuw proberen binnen te halen via Freenet of via het web. -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=Je kunt de plugin binnenhalen via Freenet of het opnieuw proberen via het web. PluginManager.officialPluginLoadFailedTryAgainFreenet=De plugin laden van Freenet -PluginManager.officialPluginLoadFailedTryAgain=Haal de laatste versie van Freenet op van de servers van het Freenet project. (NIET ANONIEM!) PluginToadlet.addPluginTitle=Plugin toevoegen PluginToadlet.failedToLoadPlugin=Laden van plugin mislukt. PluginToadlet.failedToLoadPluginCheckClass=De opgegeven plugin kan niet worden geladen. Controleer de naam van de plugin in de URL (indien opgegeven). diff --git a/src/freenet/l10n/freenet.l10n.pt-br.properties b/src/freenet/l10n/freenet.l10n.pt-br.properties index ca1e22d89b..bd9b1ee867 100644 --- a/src/freenet/l10n/freenet.l10n.pt-br.properties +++ b/src/freenet/l10n/freenet.l10n.pt-br.properties @@ -1287,10 +1287,7 @@ PluginManager.pluginLoadingFailedShort=A extensão ${name} não pôde ser carreg PluginManager.pluginLoadingFailed=Não foi possível carregar a extensão ${name} PluginManager.pluginLoadingFailedStillTryingOverFreenet=Estamos ainda tentando carregar a extensão a partir da Freenet. PluginManager.pluginLoadingFailedWithMessage=Não foi possível carregar a extensão ${name}: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=Você pode tentar novamente na Freenet ou pode obtê-la via web. -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=Você pode obter a extensão via Freenet, ou pode tentar novamente através da Web. PluginManager.officialPluginLoadFailedTryAgainFreenet=Carregar a extensão via Freenet -PluginManager.officialPluginLoadFailedTryAgain=Carregar a extensão através da web a partir do nosso servidor (NÃO ANÔNIMO!) PluginToadlet.addPluginTitle=Adicionar uma extensão PluginToadlet.failedToLoadPlugin=Falha ao carregar extensão. PluginToadlet.failedToLoadPluginCheckClass=A extensão que você solicitou não pôde ser carregada. Por favor, verifique o nome da classe da extensão e o URL, caso tenha fornecido um. diff --git a/src/freenet/l10n/freenet.l10n.ru.properties b/src/freenet/l10n/freenet.l10n.ru.properties index 229b85d0a3..b449499f67 100644 --- a/src/freenet/l10n/freenet.l10n.ru.properties +++ b/src/freenet/l10n/freenet.l10n.ru.properties @@ -1289,10 +1289,7 @@ PluginManager.pluginLoadingFailedShort=Не могу загрузить допо PluginManager.pluginLoadingFailed=Сбой при загрузке дополнения ${name} PluginManager.pluginLoadingFailedStillTryingOverFreenet=Мы все еще пытаемся загрузить дополнение через Фринет. PluginManager.pluginLoadingFailedWithMessage=Сбой при загрузке дополнения ${name}: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=Вы можете еще раз попробовать получить дополнение через Фринет, или загрузить его через Веб. -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=Вы можете получить дополнение через Фринет или попробовать загрузить его через Веб. PluginManager.officialPluginLoadFailedTryAgainFreenet=Загрузить дополнение из Фринета -PluginManager.officialPluginLoadFailedTryAgain=Загрузить дополнение с нашего сервера через Веб (НЕ АНОНИМНО!) PluginToadlet.addPluginTitle=Добавить дополнение PluginToadlet.failedToLoadPlugin=Сбой при загрузке дополнения. PluginToadlet.failedToLoadPluginCheckClass=Запрашиваемое дополнение не может быть загружено. Проверьте название класса дополнения и URL, если вы указывали его. diff --git a/src/freenet/l10n/freenet.l10n.zh-cn.properties b/src/freenet/l10n/freenet.l10n.zh-cn.properties index b4640f7c65..13eed4848a 100644 --- a/src/freenet/l10n/freenet.l10n.zh-cn.properties +++ b/src/freenet/l10n/freenet.l10n.zh-cn.properties @@ -1397,10 +1397,7 @@ PluginManager.pluginLoadingFailedShort=无法加载插件 ${name}! PluginManager.pluginLoadingFailed=插件 ${name} 无法加载 PluginManager.pluginLoadingFailedStillTryingOverFreenet=我们仍然在尝试从 Freenet 加载插件。 PluginManager.pluginLoadingFailedWithMessage=插件 ${name} 无法加载: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=您可以重试通过 Freenet 获取插件,或者通过 Web 获取。 -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=您可以从 Freenet 获取插件,或者重试通过 Web 获取。 PluginManager.officialPluginLoadFailedTryAgainFreenet=从 Freenet 加载插件 -PluginManager.officialPluginLoadFailedTryAgain=通过 Web 从我们的服务器加载插件 (不是匿名的!) PluginToadlet.addPluginTitle=添加插件 PluginToadlet.failedToLoadPlugin=加载插件失败。 PluginToadlet.failedToLoadPluginCheckClass=您请求的插件无法被加载。如果您指定了插件类名和 URL ,请确认它们是否正确。 diff --git a/src/freenet/l10n/freenet.l10n.zh-tw.properties b/src/freenet/l10n/freenet.l10n.zh-tw.properties index ba6a62f588..6609145289 100644 --- a/src/freenet/l10n/freenet.l10n.zh-tw.properties +++ b/src/freenet/l10n/freenet.l10n.zh-tw.properties @@ -1387,10 +1387,7 @@ PluginManager.pluginLoadingFailedShort=無法載入外掛 ${name}! PluginManager.pluginLoadingFailed=指定的外掛 ${name} 無法載入 PluginManager.pluginLoadingFailedStillTryingOverFreenet=我們仍然在嘗試從 Freenet 載入外掛。 PluginManager.pluginLoadingFailedWithMessage=指定的外掛 ${name} 無法載入: ${message} -PluginManager.officialPluginLoadFailedSuggestTryAgainFreenet=您可以重試通過 Freenet 獲取外掛,或者通過 Web 獲取。 -PluginManager.officialPluginLoadFailedSuggestTryAgainHTTPS=您可以從 Freenet 獲取外掛,或者重試通過 Web 獲取。 PluginManager.officialPluginLoadFailedTryAgainFreenet=從 Freenet 載入外掛 -PluginManager.officialPluginLoadFailedTryAgain=通過 Web 從我們的伺服器載入外掛 (不是匿名的!) PluginToadlet.addPluginTitle=新增外掛 PluginToadlet.failedToLoadPlugin=載入外掛失敗. PluginToadlet.failedToLoadPluginCheckClass=你要求的外掛無法備載入. 請檢查外掛程式的類別名稱是否正確, 如果你指定了 URL 也請加以檢查. diff --git a/src/freenet/pluginmanager/PluginManager.java b/src/freenet/pluginmanager/PluginManager.java index 1221b7687f..7f09125ba8 100644 --- a/src/freenet/pluginmanager/PluginManager.java +++ b/src/freenet/pluginmanager/PluginManager.java @@ -378,7 +378,7 @@ public void run() { } } PluginLoadFailedUserAlert newAlert = - new PluginLoadFailedUserAlert(filename, pdl.isOfficialPluginLoader(), pdl.isOfficialPluginLoader() && pdl.isLoadingFromFreenet(), stillTrying, e); + new PluginLoadFailedUserAlert(filename, pdl.isOfficialPluginLoader(), stillTrying, e); PluginLoadFailedUserAlert oldAlert = loadedPlugins.replaceUserAlert(filename, newAlert); core.alerts.register(newAlert); core.alerts.unregister(oldAlert); @@ -390,7 +390,7 @@ public void run() { System.err.println("Plugin " + filename + " appears to require a later JVM"); Logger.error(this, "Plugin " + filename + " appears to require a later JVM"); PluginLoadFailedUserAlert newAlert = - new PluginLoadFailedUserAlert(filename, pdl.isOfficialPluginLoader(), pdl.isOfficialPluginLoader() && pdl.isLoadingFromFreenet(), false, l10n("pluginReqNewerJVMTitle", "name", filename)); + new PluginLoadFailedUserAlert(filename, pdl.isOfficialPluginLoader(), false, l10n("pluginReqNewerJVMTitle", "name", filename)); PluginLoadFailedUserAlert oldAlert = loadedPlugins.replaceUserAlert(filename, newAlert); core.alerts.register(newAlert); core.alerts.unregister(oldAlert); @@ -401,7 +401,7 @@ public void run() { System.err.println("Plugin "+filename+" is broken, but we want to retry after next startup"); Logger.error(this, "Plugin "+filename+" is broken, but we want to retry after next startup"); PluginLoadFailedUserAlert newAlert = - new PluginLoadFailedUserAlert(filename, pdl.isOfficialPluginLoader(), pdl.isOfficialPluginLoader() && pdl.isLoadingFromFreenet(), false, e); + new PluginLoadFailedUserAlert(filename, pdl.isOfficialPluginLoader(), false, e); PluginLoadFailedUserAlert oldAlert = loadedPlugins.replaceUserAlert(filename, newAlert); core.alerts.register(newAlert); core.alerts.unregister(oldAlert); @@ -435,22 +435,20 @@ class PluginLoadFailedUserAlert extends AbstractUserAlert { final String message; final StackTraceElement[] stacktrace; final boolean official; - final boolean officialFromFreenet; - final boolean stillTryingOverFreenet; + final boolean stillTrying; - public PluginLoadFailedUserAlert(String filename, boolean official, boolean officialFromFreenet, boolean stillTryingOverFreenet, String message) { + public PluginLoadFailedUserAlert(String filename, boolean official, boolean stillTrying, String message) { this.filename = filename; this.official = official; this.message = message; this.stacktrace = null; - this.officialFromFreenet = officialFromFreenet; - this.stillTryingOverFreenet = stillTryingOverFreenet; + this.stillTrying = stillTrying; } - public PluginLoadFailedUserAlert(String filename, boolean official, boolean officialFromFreenet, boolean stillTryingOverFreenet, Throwable e) { + public PluginLoadFailedUserAlert(String filename, boolean official, boolean stillTrying, Throwable e) { this.filename = filename; this.official = official; - this.stillTryingOverFreenet = stillTryingOverFreenet; + this.stillTrying = stillTrying; String msg; if(e instanceof PluginNotFoundException) { msg = e.getMessage(); @@ -462,7 +460,6 @@ public PluginLoadFailedUserAlert(String filename, boolean official, boolean offi } if(msg == null) msg = e.toString(); this.message = msg; - this.officialFromFreenet = officialFromFreenet; } @Override @@ -502,28 +499,18 @@ public HTMLNode getHTMLText() { } } - if(stillTryingOverFreenet) { + if(stillTrying) { div.addChild("p", l10n("pluginLoadingFailedStillTryingOverFreenet")); } if(official) { p = div.addChild("p"); - if(officialFromFreenet) - p.addChild("#", l10n("officialPluginLoadFailedSuggestTryAgainFreenet")); - else - p.addChild("#", l10n("officialPluginLoadFailedSuggestTryAgainHTTPS")); - - HTMLNode reloadForm = div.addChild("form", new String[] { "action", "method" }, new String[] { "/plugins/", "post" }); - reloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword }); - reloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "plugin-name", filename }); - reloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "pluginSource", "https" }); - reloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "submit-official", l10n("officialPluginLoadFailedTryAgain") }); - - if(!stillTryingOverFreenet) { - reloadForm = div.addChild("form", new String[] { "action", "method" }, new String[] { "/plugins/", "post" }); + p.addChild("#", l10n("officialPluginLoadFailedSuggestTryAgain")); + + if(!stillTrying) { + HTMLNode reloadForm = div.addChild("form", new String[] { "action", "method" }, new String[] { "/plugins/", "post" }); reloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword }); reloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "plugin-name", filename }); - reloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "pluginSource", "freenet" }); reloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "submit-official", l10n("officialPluginLoadFailedTryAgainFreenet") }); } }