Fix missing menus/buttons when operating in non-English languages
Fixes #11292
This commit is contained in:
parent
14acaca0b5
commit
e10df9eb6d
@ -213,8 +213,17 @@ class UIManager():
|
||||
# need to copy the tree so we can preserve original for later edits.
|
||||
editable = copy.deepcopy(self.et_xml)
|
||||
iterator(editable) # clean up tree to builder specifications
|
||||
xml_str = ET.tostring(editable, encoding="unicode")
|
||||
#print(xml_str)
|
||||
# The following should work, but seems to have a Gtk bug
|
||||
# xml_str = ET.tostring(editable, encoding="unicode")
|
||||
|
||||
xml_str = ET.tostring(editable).decode(encoding='ascii')
|
||||
|
||||
# debugging
|
||||
# with open('try.xml', 'w', encoding='utf8') as file:
|
||||
# file.write(xml_str)
|
||||
# with open('try.xml', encoding='utf8') as file:
|
||||
# xml_str = file.read()
|
||||
# print(xml_str)
|
||||
self.builder = Gtk.Builder()
|
||||
self.builder.set_translation_domain(glocale.get_localedomain())
|
||||
self.builder.add_from_string(xml_str)
|
||||
|
@ -246,8 +246,8 @@ class Tags(DbGUIElement):
|
||||
</item>'''
|
||||
|
||||
for tag_name, handle in self.__tag_list:
|
||||
tag_menu += menuitem % (handle, tag_name)
|
||||
actions.append(('TAG_%s' % handle,
|
||||
tag_menu += menuitem % (handle, escape(tag_name))
|
||||
actions.append(('TAG-%s' % handle,
|
||||
make_callback(self.tag_selected_rows, handle)))
|
||||
tag_menu = TAG_MENU % tag_menu
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user