GithubHelp home page GithubHelp logo

lsnow / translate-clipboard Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 0.0 422 KB

Gnome shell extension.Show translation of clipboard content. GNOME桌面取词翻译插件

License: GNU General Public License v3.0

JavaScript 29.44% CSS 0.27% Shell 70.29%
gnome translation extensions

translate-clipboard's Introduction

translate-clipboard

Gnome shell extension.Show translation of clipboard content.

Inspired by Tudmotu's clipboard-indicator and gufoe's text-translator and sevenuz's gnome-translate-indicator.

translate-clipboard's People

Contributors

lsnow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

translate-clipboard's Issues

Would you consider using DeepL translation engine ?

Hi,

What I nice Gnome Extension !

For the purpose of an engine respectful of privacy and security, would you consider adding the possibility to choose in the settings the translation engine, and to add the DeepL engine for it's translation quality and privacy features. Privacy by design, no tracking, GDPR compliant, German made...

I have almost no programming skills. I might have understood that the translation part is handled by the trans file ...
Would it be possible to do such an upgrade ?

Activate translating with a hot key pressed down

Translating is activated when I don't need it which obscures lots of contents, and I just want to copy/paste. Therefore, can translating only be activated when I select text with a hot key pressed down, like Alt/Ctrl.

Scrollable result view

Do you know if it is possible to use a St.ScrollView and to limit the height / width?

Question

This is a really cool extensions.

What is the default translate search engine and dictionary?

can not open setup interface

TypeError: prefsModule.buildPrefsWidget is not a function

Stack trace:
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:207:40
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:175:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
start@resource:///org/gnome/gjs/modules/script/package.js:206:5
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

Argument position: value is out of range for uint32

Good evening the issue im facing is no translation at all
when i press the shrotcut key combination 'Super+Y '
i get
image

error when opening settings
image

Actual Error
Error: Argument position: value is out of range for uint32

Stack trace:
_addVoicesRow@file:///home/stephen/.local/share/gnome-shell/extensions/[email protected]/prefs.js:99:13
TranslatePrefsWidget@file:///home/stephen/.local/share/gnome-shell/extensions/[email protected]/prefs.js:51:14
getPreferencesWidget@file:///home/stephen/.local/share/gnome-shell/extensions/[email protected]/prefs.js:134:16
fillPreferencesWindow@resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js:36:29
_loadPrefs@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:41:18
async*_init@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:26:14
ExtensionPrefsDialog@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:17:4
OpenExtensionPrefsAsync@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:139:33
async*_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:373:35
_wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:408:34
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

OS: Fedora Linux 39 (Workstation Edition) x86_64
Host: S5
Kernel: 6.8.6-200.fc39.x86_64
Uptime: 6 days, 11 hours, 15 mins
Packages: 2139 (rpm), 19 (flatpak)
Shell: bash 5.2.26
Resolution: 1920x1080
DE: GNOME 45.5
WM: Mutter
WM Theme: Adwaita
Theme: Adwaita [GTK2/3]
Icons: Adwaita [GTK2/3]
Terminal: gnome-terminal
CPU: AMD Ryzen 7 5800H with Radeon Graphics (16) @ 4.463GHz
GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
Memory: 16699MiB / 28987MiB

gnome-extensions list
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

Error on extension cleanup

Noticed the extension stopped functioning (super+Y did nothing) sometime after locking/unlocking the screen, and then found this in the gnome-shell logs:

gnome-shell[3361]: JS ERROR: Extension [email protected]: TypeError: this._pipeline is undefined
                                          _stopPlayAudio@/home/.../.local/share/gnome-shell/extensions/[email protected]/tts.js:192:9
                                          cleanup@/home/.../.local/share/gnome-shell/extensions/[email protected]/tts.js:213:14
                                          destroy@/home/.../.local/share/gnome-shell/extensions/[email protected]/extension.js:153:19
                                          disable@/home/.../.local/share/gnome-shell/extensions/[email protected]/extension.js:684:25
                                          _callExtensionDisable@resource:///org/gnome/shell/ui/extensionSystem.js:109:32
                                          _disableAllExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:622:22
                                          _disableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:621:52
                                          _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:639:18
                                          _emit@resource:///org/gnome/gjs/modules/core/_signals.js:114:47
                                          _sync@resource:///org/gnome/shell/ui/sessionMode.js:200:14
                                          pushMode@resource:///org/gnome/shell/ui/sessionMode.js:161:14
                                          activate@resource:///org/gnome/shell/ui/screenShield.js:646:34
                                          lock@resource:///org/gnome/shell/ui/screenShield.js:690:14
                                          _onStatusChanged/this._lockTimeoutId<@resource:///org/gnome/shell/ui/screenShield.js:327:26

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.