Fix missing menus/buttons when operating in non-English languages
Fixes #11292
This commit is contained in:
@ -213,7 +213,16 @@ class UIManager():
|
|||||||
# need to copy the tree so we can preserve original for later edits.
|
# need to copy the tree so we can preserve original for later edits.
|
||||||
editable = copy.deepcopy(self.et_xml)
|
editable = copy.deepcopy(self.et_xml)
|
||||||
iterator(editable) # clean up tree to builder specifications
|
iterator(editable) # clean up tree to builder specifications
|
||||||
xml_str = ET.tostring(editable, encoding="unicode")
|
# 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)
|
# print(xml_str)
|
||||||
self.builder = Gtk.Builder()
|
self.builder = Gtk.Builder()
|
||||||
self.builder.set_translation_domain(glocale.get_localedomain())
|
self.builder.set_translation_domain(glocale.get_localedomain())
|
||||||
|
@ -246,8 +246,8 @@ class Tags(DbGUIElement):
|
|||||||
</item>'''
|
</item>'''
|
||||||
|
|
||||||
for tag_name, handle in self.__tag_list:
|
for tag_name, handle in self.__tag_list:
|
||||||
tag_menu += menuitem % (handle, tag_name)
|
tag_menu += menuitem % (handle, escape(tag_name))
|
||||||
actions.append(('TAG_%s' % handle,
|
actions.append(('TAG-%s' % handle,
|
||||||
make_callback(self.tag_selected_rows, handle)))
|
make_callback(self.tag_selected_rows, handle)))
|
||||||
tag_menu = TAG_MENU % tag_menu
|
tag_menu = TAG_MENU % tag_menu
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user