1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
|
diff --git a/apps/blueman-adapters b/apps/blueman-adapters
index ed80a4f..9f27b9e 100755
--- a/apps/blueman-adapters
+++ b/apps/blueman-adapters
@@ -6,6 +6,7 @@ from gi.repository import Pango
import os.path
import sys
import signal
+from locale import bind_textdomain_codeset
#support running uninstalled
_dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
@@ -34,6 +35,7 @@ class BluemanAdapters:
builder = Gtk.Builder()
builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
builder.add_from_file(UI_PATH + "/adapters.ui")
self.dialog = builder.get_object("dialog")
diff --git a/apps/blueman-assistant b/apps/blueman-assistant
index 7e602c8..fab3355 100755
--- a/apps/blueman-assistant
+++ b/apps/blueman-assistant
@@ -16,6 +16,7 @@ import random
import signal
import dbus.glib
from optparse import OptionParser
+from locale import bind_textdomain_codeset
#support running uninstalled
_dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
@@ -62,6 +63,7 @@ class Assistant:
self.Builder = Gtk.Builder()
self.Builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.Builder.add_from_file(UI_PATH + "/assistant.ui")
self.assistant = self.Builder.get_object("assistant")
self.assistant.set_title(_("Bluetooth Assistant"))
diff --git a/apps/blueman-manager b/apps/blueman-manager
index b152044..395257b 100755
--- a/apps/blueman-manager
+++ b/apps/blueman-manager
@@ -7,6 +7,7 @@ import dbus, dbus.glib
from blueman.Constants import *
import gi
gi.require_version("Gtk", "3.0")
+from locale import bind_textdomain_codeset
from gi.repository import Gtk
from gi.repository import GObject
from blueman.bluez.BlueZInterface import BlueZInterface
@@ -43,6 +44,7 @@ class Blueman:
self.Builder = Gtk.Builder()
self.Builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.Builder.add_from_file(UI_PATH + "/manager-main.ui")
self.window = self.Builder.get_object("window")
diff --git a/apps/blueman-sendto b/apps/blueman-sendto
index 852f99a..fdbff01 100755
--- a/apps/blueman-sendto
+++ b/apps/blueman-sendto
@@ -13,6 +13,7 @@ from optparse import OptionParser
import gettext
import urllib
import time
+from locale import bind_textdomain_codeset
from blueman.Constants import *
import gi
@@ -46,6 +47,7 @@ class Sender(GObject.GObject):
GObject.GObject.__init__(self)
self.Builder = Gtk.Builder()
self.Builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.Builder.add_from_file(UI_PATH + "/send-dialog.ui")
self.window = self.Builder.get_object("window")
diff --git a/apps/blueman-services b/apps/blueman-services
index 25a529b..4b4419c 100755
--- a/apps/blueman-services
+++ b/apps/blueman-services
@@ -2,6 +2,7 @@
import os
import sys
+from locale import bind_textdomain_codeset
#support running uninstalled
_dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
if os.path.exists(os.path.join(_dirname, "CHANGELOG.md")):
@@ -29,6 +30,7 @@ class BluemanServices:
self.Builder = Gtk.Builder()
self.Builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.Builder.add_from_file(UI_PATH + "/services.ui")
self.Config = Config()
diff --git a/blueman/gui/GsmSettings.py b/blueman/gui/GsmSettings.py
index ee07e62..e58277b 100644
--- a/blueman/gui/GsmSettings.py
+++ b/blueman/gui/GsmSettings.py
@@ -21,6 +21,7 @@ from blueman.Functions import *
from blueman.Constants import *
from gi.repository import Gtk
+from locale import bind_textdomain_codeset
class GsmSettings(Gtk.Dialog):
def __init__(self, bd_address):
@@ -30,6 +31,7 @@ class GsmSettings(Gtk.Dialog):
self.Builder = Gtk.Builder()
self.Builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.Builder.add_from_file(UI_PATH +"/gsm-settings.ui")
vbox = self.Builder.get_object("vbox1")
diff --git a/blueman/gui/applet/PluginDialog.py b/blueman/gui/applet/PluginDialog.py
index f994cc9..84d6370 100644
--- a/blueman/gui/applet/PluginDialog.py
+++ b/blueman/gui/applet/PluginDialog.py
@@ -23,6 +23,7 @@ from blueman.Functions import *
from blueman.gui.GenericList import GenericList
import weakref
+from locale import bind_textdomain_codeset
class SettingsWidget(Gtk.VBox):
def __init__(self, inst):
@@ -118,6 +119,7 @@ class PluginDialog(Gtk.Dialog):
self.Builder = Gtk.Builder()
self.Builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.Builder.add_from_file(UI_PATH +"/applet-plugins-widget.ui")
self.set_title(_("Plugins"))
diff --git a/blueman/main/applet/BluezAgent.py b/blueman/main/applet/BluezAgent.py
index 072958d..207659c 100644
--- a/blueman/main/applet/BluezAgent.py
+++ b/blueman/main/applet/BluezAgent.py
@@ -7,6 +7,7 @@ from gi.repository import Gtk
from gi.repository import GObject
from gi.types import GObjectMeta
import cgi
+from locale import bind_textdomain_codeset
import blueman.bluez as Bluez
from blueman.Sdp import *
from blueman.Constants import *
@@ -50,6 +51,7 @@ class CommonAgent(GObject.GObject, Agent):
editable.stop_emission("insert-text")
builder = Gtk.Builder()
+ bind_textdomain_codeset("blueman", "UTF-8")
builder.add_from_file(UI_PATH + "/applet-passkey.ui")
builder.set_translation_domain("blueman")
dialog = builder.get_object("dialog")
diff --git a/blueman/plugins/applet/NetUsage.py b/blueman/plugins/applet/NetUsage.py
index 9fd93c7..d6bc492 100644
--- a/blueman/plugins/applet/NetUsage.py
+++ b/blueman/plugins/applet/NetUsage.py
@@ -17,7 +17,7 @@ import dbus
import time
import datetime
import gettext
-
+from locale import bind_textdomain_codeset
class MonitorBase(GObject.GObject):
__gsignals__ = {
@@ -134,6 +134,7 @@ class Dialog:
builder = Gtk.Builder()
builder.add_from_file(UI_PATH + "/net-usage.ui")
builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.dialog = builder.get_object("dialog")
self.dialog.connect("response", self.on_response)
diff --git a/blueman/plugins/services/Audio.py b/blueman/plugins/services/Audio.py
index b44d6b5..4b13e8f 100644
--- a/blueman/plugins/services/Audio.py
+++ b/blueman/plugins/services/Audio.py
@@ -19,6 +19,7 @@
from gi.repository import Gtk
import dbus
+from locale import bind_textdomain_codeset
from blueman.Constants import *
from blueman.plugins.ServicePlugin import ServicePlugin
@@ -35,6 +36,7 @@ class Audio(ServicePlugin):
self.Builder = Gtk.Builder()
self.Builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.Builder.add_from_file(UI_PATH +"/services-audio.ui")
self.widget = self.Builder.get_object("audio")
diff --git a/blueman/plugins/services/Network.py b/blueman/plugins/services/Network.py
index 5fab49a..0dd88d9 100644
--- a/blueman/plugins/services/Network.py
+++ b/blueman/plugins/services/Network.py
@@ -18,6 +18,7 @@
#
from gi.repository import Gtk
+from locale import bind_textdomain_codeset
from blueman.Constants import *
from blueman.Functions import have, dprint, mask_ip4_address
from blueman.Lib import get_net_interfaces, get_net_address, get_net_netmask
@@ -36,6 +37,7 @@ class Network(ServicePlugin):
self.Builder = Gtk.Builder()
self.Builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.Builder.add_from_file(UI_PATH +"/services-network.ui")
self.widget = self.Builder.get_object("network")
diff --git a/blueman/plugins/services/Transfer.py b/blueman/plugins/services/Transfer.py
index 189d0cc..8fa65d0 100644
--- a/blueman/plugins/services/Transfer.py
+++ b/blueman/plugins/services/Transfer.py
@@ -1,4 +1,5 @@
from gi.repository import Gtk
+from locale import bind_textdomain_codeset
from blueman.Constants import *
from blueman.plugins.ServicePlugin import ServicePlugin
@@ -14,6 +15,7 @@ class Transfer(ServicePlugin):
self.Builder = Gtk.Builder()
self.Builder.set_translation_domain("blueman")
+ bind_textdomain_codeset("blueman", "UTF-8")
self.Builder.add_from_file(UI_PATH + "/services-transfer.ui")
self.widget = self.Builder.get_object("transfer")
|