Skip to content

Commit

Permalink
Make translations works for Gtk4 template xml files
Browse files Browse the repository at this point in the history
  • Loading branch information
yilozt committed Oct 15, 2023
1 parent 291bc9c commit 762bffc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/prefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ import * as Adw from 'gi://Adw'
import { init_settings } from './utils/settings.js'
import { pages } from './preferences/index.js'
import * as Utils from './utils/io.js'
import {
ExtensionPreferences
} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'
import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'

declare const imports: any
export default class RoundedWindowCornresPrefs extends ExtensionPreferences {
constructor (metadata: object) {
super (metadata)

// Classical GTK4 template ui need this to make translatable string works
imports.gettext.textdomain (this.uuid)
this.initTranslations (this.uuid)
}

_load_css () {
const display = Gdk.Display.get_default ()
if (display) {
Expand Down

0 comments on commit 762bffc

Please sign in to comment.