<NME> extension.ts
<BEF> import * as Meta from '@imports/Meta-8';
import * as Shell from '@imports/Shell-0.1';
import { Settings } from '@imports/Gio-2.0';

import { SignalEmitter } from '..';
import { onAction } from './actions';
import { wrapNotifyError } from './notifications';
import * as Config from './config';
import * as Indicator from './indicator';
import { ScreenshotPortalProxy, getServiceProxy } from './screenshotPortal';
import ExtensionUtils, { ExtensionInfo } from '../gselib/extensionUtils';

const Signals = imports.signals;
const Main = imports.ui.main;

export declare interface Extension extends SignalEmitter {}

export class Extension {
  public readonly settings: Settings;
  public readonly info: ExtensionInfo;
  public readonly servicePromise: Promise<ScreenshotPortalProxy>;
  public indicator?: Indicator.Indicator;

  private readonly signalSettings: number[] = [];

  constructor() {
    this.settings = ExtensionUtils.getSettings();
    this.info = ExtensionUtils.getCurrentExtension();
    this.servicePromise = getServiceProxy(this.info.path);
    this.signalSettings.push(
      this.settings.connect('changed::' + Config.KeyEnableIndicator, this.updateIndicator.bind(this)),
    );
  }

  setKeybindings(): void {
    const bindingMode = Shell.ActionMode.NORMAL;

    for (const shortcut of Config.KeyShortcuts) {
      Main.wm.addKeybinding(
        shortcut,
        this.settings,
        Meta.KeyBindingFlags.NONE,
        bindingMode,
        wrapNotifyError(() => onAction(shortcut.replace('shortcut-', ''))),
      );
    }
  }

  unsetKeybindings(): void {
    for (const shortcut of Config.KeyShortcuts) {
      Main.wm.removeKeybinding(shortcut);
    }
  }

  createIndicator(): void {
    if (!this.indicator) {
      this.indicator = new Indicator.Indicator(this);
      Main.panel.addToStatusArea(Config.IndicatorName, this.indicator.panelButton);
    }
  }

  destroyIndicator(): void {
    if (this.indicator) {
      this.indicator.destroy();
      this.indicator = undefined;
    }
  }

  updateIndicator(): void {
    if (this.settings.get_boolean(Config.KeyEnableIndicator)) {
      this.createIndicator();
    } else {
      this.destroyIndicator();
    }
  }

  disable(): void {
    this.signalSettings.forEach((signal) => {
      this.settings.disconnect(signal);
    });

    this.disconnectAll();
  }
}

Signals.addSignalMethods(Extension.prototype);

let extension: Extension | null;

export function getExtension() {
  if (!extension) {
    throw new Error('extension is not enabled');
  }
  return extension;
}

export function enable() {
  extension = new Extension();
  extension.updateIndicator();
  extension.setKeybindings();
}

export function disable() {
  if (extension) {
    extension.disable();
    extension.destroyIndicator();
    extension.unsetKeybindings();
    extension = null;
  }
}
export declare interface Extension extends SignalEmitter {}

export class Extension {
  private _signalSettings: number[];
  private _indicator?: Indicator.Indicator;
  private _selection?: Selection.Selection;

  constructor() {
    this._signalSettings = [];

    this._signalSettings.push(
      settings.connect('changed::' + Config.KeyEnableIndicator, this._updateIndicator.bind(this)),
    );
  }

  _setKeybindings() {
    this.disconnectAll();
  }

  init() {
    Convenience.initTranslations();
  }

  enable() {
    this._updateIndicator();
    this._setKeybindings();
  }

<MSG> Fix initTranslations() call

<DFF> @@ -177,16 +177,12 @@ Signals.addSignalMethods(Screenshot.prototype);
 export declare interface Extension extends SignalEmitter {}
 
 export class Extension {
-  private _signalSettings: number[];
+  private _signalSettings: number[] = [];
   private _indicator?: Indicator.Indicator;
   private _selection?: Selection.Selection;
 
   constructor() {
-    this._signalSettings = [];
-
-    this._signalSettings.push(
-      settings.connect('changed::' + Config.KeyEnableIndicator, this._updateIndicator.bind(this)),
-    );
+    Convenience.initTranslations();
   }
 
   _setKeybindings() {
@@ -323,11 +319,10 @@ export class Extension {
     this.disconnectAll();
   }
 
-  init() {
-    Convenience.initTranslations();
-  }
-
   enable() {
+    this._signalSettings.push(
+      settings.connect('changed::' + Config.KeyEnableIndicator, this._updateIndicator.bind(this)),
+    );
     this._updateIndicator();
     this._setKeybindings();
   }

Fix initTranslations() call