dialect-app / dialect Goto Github PK
View Code? Open in Web Editor NEWA translation app for GNOME.
License: GNU General Public License v3.0
A translation app for GNOME.
License: GNU General Public License v3.0
File "/usr/bin/dialect", line 33, in <module>
from dialect import main
File "/usr/share/dialect/dialect/main.py", line 13, in <module>
gi.require_version('Handy', '1')
File "/usr/lib/python3.8/site-packages/gi/__init__.py", line 132, in require_version
raise ValueError('Namespace %s not available for version %s' %
ValueError: Namespace Handy not available for version 1
Argos Translate is an offline translation app/library written in Python.
It would be great to have that as an option instead of sending everything through Google.
There could be a better icon more compliant with GNOME guidelines and more stylized.
If you have any suggestions, put them here
Common themes:
Currently, whenever user clicks the "speaker" button, the GUI freezes until audio is downloaded and played. This is a bad user experience.
Use async
and await
to download and play audio.
Expected behavior:
P.S. I am inexperience in Python so I can't help you with this, sorry :(
While Gnabel ships an app icon, it would be nice to have a proper GNOME HIG compliant app icon with a symbolic variant.
Is this something Meson should be able to do alone? If not, then better specify in the readme they have to be installed through pip
I'm sorry, I have been translating this program for almost two weeks, but I do not understand these three sentences to complete the translation. What are these?
Warning: You could get your IP banned by API abuse.
Translate Accel
The opposite accel will be used for new line.
So I tried install and run gnabel on EndeavourOS Live CD, and this is the result:
I am not sure which dependencies are missing as I am not familiar with GTK development.
Do you have any idea, @fushinari?
First very cool program, I hope you keep it up.
The install script is, a bit funky. Several suggestions.
Also if you're interested I created an arch PKGBUILD which installs gnabel within a virtualenv. I am still using your source code updating which as I said could be eliminated.
Did you make it yourself? If possible, can you make an SVG icon instead? SVG is smaller in size yet infinitely scalable.
Hi.
Currently, your cute application allow translation from only one online site, Google translate. But there are other cute source for online translation & it will be very useful to add an option allowing user to select from several choices.
Example for other online translation sources are:
https://www.bing.com/translator/
https://translate.yandex.com/
https://www.translate.com/
Kindly, see which of them could be integrated with your application.
Best.
I translated a really long text, clicked the Listen button, closed the app, the speach kept playing in the background and I had to kill the app.
Any time I try to translate something, even when I specify the origin language, I get a network error and nothing happens. This started happening suddenly and without any change on my side. I think I read that this may be an upstream issue with py-googletrans but I didnt see any issues in that git project that matched this exactly.
Hello!
I am working on the German translation of dialect and finished it 99%. :-)
But one thing I cannot understand.
String: "The opposite accel will be used for new line." I know what this is doing but I am confused about the word "opposite". Does that mean the live translation starts to work with the new input? So could it be "The live translation will be start with a new line."?
Kind regards
I have created a PKGBUILD and an AUR package. I have tested the AUR package with yay
and it works perfectly.
@jjgalvez @fushinari Do you have any criticisms?
@gi-lom Since you are the author of this project, I am willing to transfer ownership of the AUR package if you are willing to maintain it (this would only make sense if you use Arch Linux). The publication of AUR package can be automated with GitHub Workflow, I am willing to help you with that too.
I am referring to line 27 and 28 of install.sh
https://github.com/gi-lom/gnabel/blob/92e9ccb82650c26d5ef60fed10c0106cadf8cb3f/install.sh#L27-L28
Problems:
Suggestion:
~/.icons/gnabel.png
, /usr/share/icons/$ICON_THEME/gnabel.png
, etc.).I find the Japanese letter on the icon a bit weird. So あ
is pronounced a
and ぢ
can be pronounced ji
, zi
, or di
. Since dialect
is a translator app, I think it more makes sense to translate D
into ぢ
instead of あ
.
"Do not translate the program name".
why?
I am using Pop!_OS 20.04 with all the latest updates. The Flatpak version of the app does not seem to respect the Desktop Theme (other Flatpak apps all do - idk why this one does not). Also - the dark mode toggle does not change anything for me.
Thanks for the handy app though - it's very useful :)!
I received this error after installing on Manjaro GNOME using my own PKGBUILD building from the latest commit:
Traceback (most recent call last):
File "/usr/sbin/gnabel", line 24, in <module>
SettingsFile = os.path.join(XdgConfigHome, 'gnabel', 'settings.json')
NameError: name 'XdgConfigHome' is not defined
Shouldn't ~/.local/share/gnabel/settings.json
or ~/.config/gnabel/settings.json
be created if it's not found?
I had fun writing Dialect, but I discovered maintaining an app is not really my cup of tea considering all I'm doing now is merging pull requests :) so I think that for the project's sake a more active maintainer would be better. Any of you would lake to take care of it?
UX would be much better and more comparable with web Google Translate interface, when you app would be able to provide "Did you mean" suggestions when text has wrong, misspelled words. I don't know whether API provides this information but IMHO without this kind of suggestion for end users the app has little sense for me.
GitHub and every other platform is moving towards better terminology. So, I think we should too.
https://github.com/github/renaming#later-this-year
The required change is simple: rename the branch "master2" into "main".
See https://gnu.org/licenses/identify-licenses-clearly.html. It should be either GPL 3.0 only, or GPL 3.0 or later.
GNU strongly recommends allowing the use of later licenses, see https://www.gnu.org/licenses/gpl-faq.html.en#VersionThreeOrLater.
Hi.
This may be strange request from title ! But it's usefulness is that:
If this feature accepted to be added as future enhancement, then it should allow SOCKS 5 proxy & should allow user to select UDP or TCP or automatic(UDP/TCP) protocol.
Thank you.
Using GSettings will be better than saving settings to our own json file.
If is fine, I will provide a PR latter.
The only example of such a term that I've noticed so far is "exye". Typing that will give you "error".
In addition, it seems to set the src language to "hten". Thankfully, Dialect seems to handle it pretty gracefully on launch.
I haven't looked into how or why this is happening due to lack of time, but I'll look into it later.
Please package this app for Guix System as well; Thanks
What preferences will we want to expose?
Some thoughts:
Currently, content of desktop entry is embeded inside install.sh: https://github.com/gi-lom/gnabel/blob/92e9ccb82650c26d5ef60fed10c0106cadf8cb3f/install.sh#L31-L42
This method of installation is hard for packaging for various Linux distros where executing a shell script is not encouraged. The ideal format should require only copy-pasting files from package to destinations.
Suggestion:
gnabel.desktop
file outside of install.sh
.Icon=${DEST_DIR}/gnabel/icon.png
with just Icon=gnabel
to enable icon theming.icon.png
to gnabel.png
.install.sh
to copy icon file to ~/.icon/gnabel.png
.The current summary "A translation app for GNOME" isn't great, because it mentions the target environment (imagine every iOS app mentioning that it targets iOS in the summary :D). It's fine to mention GNOME in the description, but the summary should be short and focus on what it can do for people, e.g. "Translate any language".
More general guidance here: https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/App-Metadata
1.1.0
will be released soon. We have added a few new strings and slightly changed others.
CC: @Etamuk, @musicsd, @meskobalazs, @albanobattistella, @nexeleriot, @v30xy.
Thanks in advance!
We need mockups and ideas for implementation of a libhandy-based Mobile user interface. It has to be usable both on mobile and desktop and should not feel out of place in either environments.
The Google Translate website automatically produces translated text as user type input text. The Crow Translate application also has a checkbox to enable auto-translation.
It would be great if Gnabel has the same feature.
However, I suspect that Gnabel requests for translation synchronously. If this is true, it would freeze the GUI on every character user types, leading to bad experience, so you may need to convert your mechanism to asynchronous first.
Tried to install this on macOS, it failed, then I realized there's no uninstall process. Not sure what's been installed on my system and where. I saw pip
pulled a few things, I guess for now I just need to go through and manually remove them.
Hello 😀!
First of all, great app! (And WOW! GREAT rewrite !)
The story is... I wanted to package dialect for Fedora now that there's a stable release. But... I've unfortunately discovered a bug with Gstreamer...
$ dialect
Traceback (most recent call last):
File "/usr/share/dialect/dialect/main.py", line 35, in do_activate
self.window = DialectWindow(
File "/usr/share/dialect/dialect/window.py", line 94, in __init__
bus = self.player.get_bus()
AttributeError: 'NoneType' object has no attribute 'get_bus'
And then, no window appear. The program doesn't really crash either. But if I open another terminal and retype the command, while the other one is still running, I get this:
I cannot translate anything. Nothing works.
I think what happens here is quite clear, Gst.ElementFactory("playbin", "player")
fails and return none, and can't create the rest of the window. When I retype the command, it forces the window to show itself, even if it's still incomplete.
So I think that « maybe it is just some Gstreamer plugin missing, right »? Well, no. gstreamer1-plugins-base
is installed and installing all Gstreamer-related package (except one random one because it's too heavy) doesn't change anything :/.
But then, something weird happens. If I try to do sudo dialect
... It works! I mean, since I'm using Wayland I still has no sound, but, at least, it can translate! So this seems to be some kind of permission issues?
Btw, the Flatpak version works.
Currently I don't have time to checkout this, but just noticed after installing exported .flatpak
from GNOME builder.
I don't know if we need to own com.github.gi_lom.dialect.SearchProvider
in the manifest, or if it's another issue.
GNOME GitLab and Codeberg are good places, because they are free and better; Why not move there?
The current name is not great, the g
prefix makes it look like an old app from the GNOME 2 days. Would you be open to changing it?
I have a blog post on the subject you might be interested in: https://blogs.gnome.org/tbernard/2019/04/26/naming-your-app
The text translation works, but there's an issue with voice dictation. This occurs with gTTS
2.1.1 + gTTS-token
1.1.3 and gTTS
2.1.2 / 2.2.0 / 2.2.1 + gTTS-token
1.1.4.
I'm using dialect-git
1.1.0.r12.gff51505 on Manjaro GNOME (unstable branch).
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/share/dialect/dialect/window.py", line 160, in load_lang_speech
self.lang_speech = list(lang.tts_langs(tld='com').keys())
TypeError: tts_langs() got an unexpected keyword argument 'tld'
What do you guys think about changing the search behavior? It's standard in messaging applications to use Ctrl+Enter for linebreaks and Enter for actually sending the message.
The current code for the current behavior is a dirty hack. I was rewriting some of the GTK code to make it simpler, so I came across this weird behavior and wanted to know what you all thought about it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.