Review of "Fast Translate" version 1

Details Page Preview

Translate with Google and DeepL Translator

Extension Homepage
https://github.com/tazztone/translate-assistant

No comments.

FAQ

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

Shexli (experimental) warning 2 manual_review 1

Shexli found 3 issues that may need reviewer attention.

EGO-A-005 manual_review

extensions should not access the clipboard directly

Direct clipboard access via `St.Clipboard.get_default()` requires reviewer scrutiny.

Review Guidelines

  • extension.js:41
    St.Clipboard.get_default()
  • extension.js:1373
    St.Clipboard.get_default()

EGO-L-003 warning

signals connected by extension should be disconnected in disable()

Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.

Disconnect all signals

  • extension.js:917
                this.clearBtn.connect('clicked', () => {
                    this.inputEntry.get_clutter_text().set_text("");
                    this.outputEntry.get_clutter_text().set_text("");
                    if (this.errorLabel) {
                        this.errorLabel.text = "";
                    }
                
  • extension.js:1011
                this.copyBtn.connect('clicked', () => {
                    let outText = this.outputEntry.get_clutter_text().get_text();
                    if (outText && outText !== "") {
                        this._copyToClipboard(outText);
                    }
                })
  • extension.js:875
                this.inputEntry.connect('button-press-event', () => {
                    global.stage.set_key_focus(this.inputEntry.get_clutter_text());
                    return Clutter.EVENT_PROPAGATE;
                })
  • extension.js:224
                this.menu.connect('open-state-changed', (menu, isOpen) => {
                    if (this._destroyed) {
                        return;
                    }
                    if (this._tooltips) {
                        this._tooltips.forEach(t => t._hide());
                    }
                    if (!isOpen
  • extension.js:896
                this.pasteBtn.connect('clicked', () => {
                    Clipboard.get_text(CLIPBOARD_TYPE, (_, inText) => {
                        if (this._destroyed) {
                            return;
                        }
                        if (inText && inText !== "") {
                            this.in
  • extension.js:784
                this.sourceLabel.connect('clicked', () => {
                    const isVisible = !!this.sourceSelector;
                    GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
                        if (this._destroyed) {
                            return GLib.SOURCE_REMOVE;
                        }
              
  • extension.js:799
                this.swapBtn.connect('clicked', () => {
                    if (this.sourceSelector || this.targetSelector) {
                        GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
                            if (this._destroyed) {
                                return GLib.SOURCE_REMOVE;
                   
  • extension.js:826
                this.targetLabel.connect('clicked', () => {
                    const isVisible = !!this.targetSelector;
                    GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
                        if (this._destroyed) {
                            return GLib.SOURCE_REMOVE;
                        }
              
  • extension.js:942
                this.translateBtn.connect('clicked', () => {
                    if (this._cancellable) {
                        this._cancellable.cancel();
                    } else {
                        this._triggerTranslation();
                    }
                })
  • extension.js:1262
            this.overlay.connect('button-press-event', () => {
                this.destroy();
                return Clutter.EVENT_STOP;
            })

EGO-L-004 warning

main loop sources should be removed in disable()

Main loop sources assigned in `enable()` are missing matching removals in `disable()` or its helper methods.

Remove main loop sources

  • extension.js:1157
                            GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
                                if (this._destroyed) {
                                    return GLib.SOURCE_REMOVE;
                                }
                                this._toggleLanguageSelector(isSource, false);
                    
  • extension.js:245
                        GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
                            if (this._destroyed) {
                                return GLib.SOURCE_REMOVE;
                            }
                            global.stage.set_key_focus(this.inputEntry.get_clutter_text());
                       
  • extension.js:786
                    GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
                        if (this._destroyed) {
                            return GLib.SOURCE_REMOVE;
                        }
                        this._toggleLanguageSelector(true, !isVisible);
                        return GLib.SOURCE_REMOVE;
            
  • extension.js:801
                        GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
                            if (this._destroyed) {
                                return GLib.SOURCE_REMOVE;
                            }
                            this._toggleLanguageSelector(true, false);
                            return GLib.SOUR
  • extension.js:828
                    GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
                        if (this._destroyed) {
                            return GLib.SOURCE_REMOVE;
                        }
                        this._toggleLanguageSelector(false, !isVisible);
                        return GLib.SOURCE_REMOVE;
           

All Versions

Version Status
1 Unreviewed