From d9a4906b3ce312bd9dd7dc07b005360f461436f4 Mon Sep 17 00:00:00 2001 From: classabbyamp <5366828+classabbyamp@users.noreply.github.com> Date: Mon, 17 Jul 2023 03:11:40 -0400 Subject: [PATCH] impr: Clarify portal error message (#1197) ### Problem description see #723 ### Implementation description `xdg-desktop-portal-wlr` is not relevant because it does not provide the FileChooser interface. `xdg-desktop-portal` needs the `WAYLAND_DISPLAY` env var on wayland and the `DISPLAY` and `XAUTHORITY` env vars on xorg. If the dbus user session bus is not run in a way that it already gets those variables, they must be given via `dbus-update-activation-environment(1)`. ### Screenshots ### Additional things fixes #723 --- plugins/builtin/romfs/lang/de_DE.json | 4 ++-- plugins/builtin/romfs/lang/en_US.json | 4 ++-- plugins/builtin/romfs/lang/es_ES.json | 4 ++-- plugins/builtin/romfs/lang/zh_CN.json | 4 ++-- plugins/builtin/romfs/lang/zh_TW.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/builtin/romfs/lang/de_DE.json b/plugins/builtin/romfs/lang/de_DE.json index 6b9f8d79d..f78d3e2e0 100644 --- a/plugins/builtin/romfs/lang/de_DE.json +++ b/plugins/builtin/romfs/lang/de_DE.json @@ -388,7 +388,7 @@ "hex.builtin.popup.docs_question.title": "", "hex.builtin.popup.error.create": "Erstellen der neuen Datei fehlgeschlagen!", "hex.builtin.popup.error.file_dialog.common": "Ein Fehler trat beim Öffnen des Dateibrowser auf!", - "hex.builtin.popup.error.file_dialog.portal": "Ein Fehler trat beim Öffnen des Dateibrowser auf! Der Grund dafür kann sein, dass dein System kein xdg-desktop-portal Backend korrekt installiert hat.\n\nFür KDE wird xdg-desktop-portal-kde benötigt.\nFür Gnome wird xdg-desktop-portal-gnome benötigt.\nFür wlroots wird xdg-desktop-portal-wlr benötigt.\nAndernfalls kann eventuell xdg-desktop-portal-gtk verwendet werden.\n\nStarte dein System nach der Installation neu.\n\nFalls der Dateibrowser immer noch nicht funktionieren sollte, erstelle ein Issue auf https://github.com/WerWolv/ImHex/issues\n\nIn der Zwischenzeit können Dateien immer noch geöffnet werden, in dem sie auf das ImHex Fenster gezogen werden.", + "hex.builtin.popup.error.file_dialog.portal": "", "hex.builtin.popup.error.project.load": "Laden des Projektes fehlgeschlagen!", "hex.builtin.popup.error.project.save": "Speichern des Projektes fehlgeschlagen!", "hex.builtin.popup.error.read_only": "Fehlende Schreibrechte. Datei wurde im Lesemodus geöffnet.", @@ -942,4 +942,4 @@ "hex.builtin.welcome.update.link": "https://github.com/WerWolv/ImHex/releases/latest", "hex.builtin.welcome.update.title": "Neues Update verfügbar!" } -} \ No newline at end of file +} diff --git a/plugins/builtin/romfs/lang/en_US.json b/plugins/builtin/romfs/lang/en_US.json index 124d4a9ae..df788bc7e 100644 --- a/plugins/builtin/romfs/lang/en_US.json +++ b/plugins/builtin/romfs/lang/en_US.json @@ -399,7 +399,7 @@ "hex.builtin.popup.docs_question.thinking": "Thinking...", "hex.builtin.popup.error.create": "Failed to create new file!", "hex.builtin.popup.error.file_dialog.common": "An error occurred while opening the file browser: {}", - "hex.builtin.popup.error.file_dialog.portal": "There was an error while opening the file browser: {}.\nThis might be caused by your system not having a xdg-desktop-portal backend installed correctly.\n\nOn KDE, it's xdg-desktop-portal-kde.\nOn Gnome it's xdg-desktop-portal-gnome.\nOn wlroots it's xdg-desktop-portal-wlr.\nOtherwise, you can try to use xdg-desktop-portal-gtk.\n\nReboot your system after installing it.\n\nIf the file browser still doesn't work after this, submit an issue at https://github.com/WerWolv/ImHex/issues\n\nIn the meantime files can still be opened by dragging them onto the ImHex window!", + "hex.builtin.popup.error.file_dialog.portal": "There was an error while opening the file browser: {}.\nThis might be caused by your system not having a xdg-desktop-portal backend installed correctly.\n\nOn KDE, it's xdg-desktop-portal-kde.\nOn Gnome, it's xdg-desktop-portal-gnome.\nOtherwise, you can try to use xdg-desktop-portal-gtk.\n\nReboot your system after installing it.\n\nIf the file browser still doesn't work after this, try adding\n\tdbus-update-activation-environment WAYLAND_DISPLAY DISPLAY XAUTHORITY\nto your window manager or compositor's startup script or configuration.\n\nIf the file browser still doesn't work, submit an issue at https://github.com/WerWolv/ImHex/issues\n\nIn the meantime files can still be opened by dragging them onto the ImHex window!", "hex.builtin.popup.error.project.load": "Failed to load project: {}", "hex.builtin.popup.error.project.save": "Failed to save project!", "hex.builtin.popup.error.project.load.create_provider": "Failed to create provider with type {}", @@ -979,4 +979,4 @@ "hex.builtin.welcome.update.link": "https://github.com/WerWolv/ImHex/releases/latest", "hex.builtin.welcome.update.title": "New Update available!" } -} \ No newline at end of file +} diff --git a/plugins/builtin/romfs/lang/es_ES.json b/plugins/builtin/romfs/lang/es_ES.json index c04796a0c..fb73e38e6 100644 --- a/plugins/builtin/romfs/lang/es_ES.json +++ b/plugins/builtin/romfs/lang/es_ES.json @@ -386,7 +386,7 @@ "hex.builtin.popup.docs_question.title": "Búsqueda de Documentación", "hex.builtin.popup.error.create": "¡Fallo al crear nuevo archivo!", "hex.builtin.popup.error.file_dialog.common": "Ocurrió un error al abrir el explorador de archivos: '{}'", - "hex.builtin.popup.error.file_dialog.portal": "Ocurrió un error al abrir el explorador de archivos: {}.\nEsto ha podido deberse a que su sistema no tenga un backend de xdg-desktop-portal instalado adecuadamente.\n\nEn KDE es xdg-desktop-portal-kde.\nEn Gnome es xdg-desktop-portal-gnome.\nEn wlroots es xdg-desktop-portal-wlr.\nDe lo contrario, puede intentar utilizar xdg-desktop-portal-gtk.\n\nReinicie el sistema tras instalarlo.\n\nSi tras esto el explorador de archivos sigue sin funcionar, cree un issue en https://github.com/WerWolv/ImHex/issues\n\n¡Mientras tanto, los archivos pueden ser abiertos arrastrándose hacia la ventana de ImHex!", + "hex.builtin.popup.error.file_dialog.portal": "", "hex.builtin.popup.error.project.load": "¡Fallo al cargar proyecto!", "hex.builtin.popup.error.project.save": "¡Fallo al guardar proyecto!", "hex.builtin.popup.error.read_only": "No se pudo obtener acceso de escritura. Archivo abierto en modo de sólo lectura.", @@ -938,4 +938,4 @@ "hex.builtin.welcome.update.link": "https://github.com/WerWolv/ImHex/releases/latest", "hex.builtin.welcome.update.title": "Nueva actualización disponible!" } -} \ No newline at end of file +} diff --git a/plugins/builtin/romfs/lang/zh_CN.json b/plugins/builtin/romfs/lang/zh_CN.json index 0dacdb68e..7ba60f7f4 100644 --- a/plugins/builtin/romfs/lang/zh_CN.json +++ b/plugins/builtin/romfs/lang/zh_CN.json @@ -386,7 +386,7 @@ "hex.builtin.popup.docs_question.title": "", "hex.builtin.popup.error.create": "创建新文件失败!", "hex.builtin.popup.error.file_dialog.common": "尝试打开文件浏览器时发生了错误!", - "hex.builtin.popup.error.file_dialog.portal": "打开文件浏览器时发生了错误。这可能是由于您的系统没有正确安装 xdg-desktop-portal 后端。\n\n对于 KDE,请使用 xdg-desktop-portal-kde。\n对于 Gnome,请使用 xdg-desktop-portal-gnome。\n对于 wlroots,请使用 xdg-desktop-portal-wlr。\n其他情况,您可以尝试使用 xdg-desktop-portal-gtk。\n\n重启后请重启您的系统。\n\n如果在这之后文件浏览器仍然不能正常工作,请在 https://github.com/WerWolv/ImHex/issues 提交问题。\n\n与此同时,仍然可以通过将文件拖到 ImHex 窗口来打开它们!", + "hex.builtin.popup.error.file_dialog.portal": "", "hex.builtin.popup.error.project.load": "加载工程失败!", "hex.builtin.popup.error.project.save": "保存工程失败!", "hex.builtin.popup.error.read_only": "无法获得写权限,文件以只读方式打开。", @@ -940,4 +940,4 @@ "hex.builtin.welcome.update.link": "https://github.com/WerWolv/ImHex/releases/latest", "hex.builtin.welcome.update.title": "新的更新可用!" } -} \ No newline at end of file +} diff --git a/plugins/builtin/romfs/lang/zh_TW.json b/plugins/builtin/romfs/lang/zh_TW.json index dd13d2956..478c2b66a 100644 --- a/plugins/builtin/romfs/lang/zh_TW.json +++ b/plugins/builtin/romfs/lang/zh_TW.json @@ -386,7 +386,7 @@ "hex.builtin.popup.docs_question.title": "", "hex.builtin.popup.error.create": "無法建立新檔案!", "hex.builtin.popup.error.file_dialog.common": "開啟檔案瀏覽器時發生錯誤!", - "hex.builtin.popup.error.file_dialog.portal": "開啟檔案瀏覽器時發生錯誤。可能是因為您的系統未正確安裝 xdg-desktop-portal 後端。\n\nKDE 為 xdg-desktop-portal-kde。\nGnome 為 xdg-desktop-portal-gnome。\nwlroots 為 xdg-desktop-portal-wlr。\n否則您可以嘗試使用 xdg-desktop-portal-gtk。\n\n安裝後,請重新啟動您的系統\n\n若安裝後,檔案管理器仍無法正常運作,請在 https://github.com/WerWolv/ImHex/issues 提交 Issue。\n\n您仍可以將檔案拖曳至 ImHex 視窗來開啟!", + "hex.builtin.popup.error.file_dialog.portal": "", "hex.builtin.popup.error.project.load": "無法載入專案!", "hex.builtin.popup.error.project.save": "無法儲存專案!", "hex.builtin.popup.error.read_only": "無法取得寫入權限。檔案已以唯讀模式開啟。", @@ -940,4 +940,4 @@ "hex.builtin.welcome.update.link": "https://github.com/WerWolv/ImHex/releases/latest", "hex.builtin.welcome.update.title": "有可用更新!" } -} \ No newline at end of file +}