Open FusionGold opened 1 week ago
Experiencing the same issue. Dialect 2.5.0, installed via flatpak.
Identified another issue: clipboard history is only available for running apps.
So, in order to translate the selection, I just run the flatpak run app.drey.Dialect --selection
twice via custom shortcut.
If you use the paste button in Dialect, do you get the same error?
Paste button works fine if I have contents in my clipboard.
Right, @mufeedali confirmed me that he could reproduce the problem, but I can't in my Fedora setup.
@ivan-toriya could you give me info about your system? I can get the selection activating Dialect once.
@rafaelmardojai Debian 12.7, Gnome 43.9 (Wayland)
@rafaelmardojai btw, is it possible to run Dialect in background or in minimized mode?
@ivan-toriya Nope.
If you have wl-clipboard
, as a workaround to this issue you can use what's suggested in this comment: https://github.com/dialect-app/dialect/issues/219#issuecomment-965583085.
@rafaelmardojai Thanks for the workaround hint.
Identified another issue: clipboard history is only available for running apps. So, in order to translate the selection, I just run the
flatpak run app.drey.Dialect --selection
twice via custom shortcut.
You need to focus on Dialect window while the second run is done.
It looks like it is a Wayland thing that prevents a window from reading the clipboard unless you are currently focusing on it.
https://wayland.app/protocols/primary-selection-unstable-v1
The result will differ depending on the timing of execution and the desktop environment behaviour (e.g. auto focus on new opened windows). That's why some might not be able to reproduce.
@rafaelmardojai can we wait for the user to focus on the window before reading the clipboard? This should solve the issue.
@zefr0x Yes that's possible.
Implemented that in #408, could you test that PR?
@rafaelmardojai It seems that the primary selection can be correctly filled in with #408 . However, now whenever the -n
option is used, a 'Translation failed' warning pops up first, and then the translation appears.
@FusionGold should be fixed now, could you test?
@rafaelmardojai Everything seems fine for me. Thanks for your hard work!
I am encountering an issue with
Dialect
, both when installed via AUR (dialect-git) and Flatpak on my Archlinux Gnome Wayland desktop environment. When runningdialect -n
from terminal and attempting to translate from the primary selection, the following error occurs:Steps to Reproduce:
wl-paste --primary
can paste the content.LANG=C flatpak run app.drey.Dialect -n
Dialect
window poped up with empty input and the above error message.