Commit 4defaadd authored by intrigeri's avatar intrigeri
Browse files

Unlock VeraCrypt Volumes: set correct translation domain (refs: #16602)

parent 2b5f2880
......@@ -5,3 +5,4 @@ DATA_DIR = "/usr/share/%s/" % APP_NAME
UI_DIR = path.join(DATA_DIR, "ui")
MAIN_UI_FILE = path.join(UI_DIR, "main.ui")
VOLUME_UI_FILE = path.join(UI_DIR, "volume.ui")
TRANSLATION_DOMAIN = "tails"
......@@ -4,7 +4,7 @@ from typing import Union
from gi.repository import Gtk, GLib, Gio, UDisks
from unlock_veracrypt_volumes import _
from unlock_veracrypt_volumes.config import VOLUME_UI_FILE, APP_NAME
from unlock_veracrypt_volumes.config import TRANSLATION_DOMAIN, VOLUME_UI_FILE
from unlock_veracrypt_volumes.exceptions import UdisksObjectNotFoundError, AlreadyUnlockedError
logger = getLogger(__name__)
......@@ -31,7 +31,7 @@ class Volume(object):
self.dialog_is_showing = False
self.builder = Gtk.Builder.new_from_file(VOLUME_UI_FILE)
self.builder.set_translation_domain(APP_NAME)
self.builder.set_translation_domain(TRANSLATION_DOMAIN)
self.builder.connect_signals(self)
self.list_box_row = self.builder.get_object("volume_row") # type: Gtk.ListBoxRow
self.box = self.builder.get_object("volume_box") # type: Gtk.Box
......
......@@ -11,7 +11,7 @@ from unlock_veracrypt_volumes import _
from unlock_veracrypt_volumes.volume_list import ContainerList, DeviceList
from unlock_veracrypt_volumes.volume import Volume
from unlock_veracrypt_volumes.exceptions import UdisksObjectNotFoundError, VolumeNotFoundError
from unlock_veracrypt_volumes.config import APP_NAME, MAIN_UI_FILE
from unlock_veracrypt_volumes.config import MAIN_UI_FILE, TRANSLATION_DOMAIN
WAIT_FOR_LOOP_SETUP_TIMEOUT = 1
......@@ -32,7 +32,7 @@ class VolumeManager(object):
self.mount_op_lock = Lock()
self.builder = Gtk.Builder.new_from_file(MAIN_UI_FILE)
self.builder.set_translation_domain(APP_NAME)
self.builder.set_translation_domain(TRANSLATION_DOMAIN)
self.builder.connect_signals(self)
self.window = self.builder.get_object("window") # type: Gtk.ApplicationWindow
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<interface domain="tails">
<requires lib="gtk+" version="3.22"/>
<object class="GtkApplicationWindow" id="window">
<property name="default-width">700</property>
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<interface domain="tails">
<requires lib="gtk+" version="3.22"/>
<object class="GtkListBoxRow" id="volume_row">
<property name="activatable">False</property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment