Skip to content

Commit fce8b5e

Browse files
committed
cs_default: Don't use translated strings as dictionary keys.
ref: 89c7722 This was breaking the display of terminal and calculator combos. Fixes #11405
1 parent 9e870f2 commit fce8b5e

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

files/usr/share/cinnamon/cinnamon-settings/modules/cs_default.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,38 @@
3434
# Office: Word processor, Spreadsheet, Presentation, Document, Source code
3535
# System: file manager, Text editor, Terminal, Calculator
3636

37-
preferred_app_defs[_("Accessibility")] = (
37+
translated_categories = {
38+
"accessibility": _("Accessibility"),
39+
"internet": _("Internet"),
40+
"multimedia": _("Multimedia"),
41+
"office": _("Office"),
42+
"system": _("System")
43+
}
44+
45+
preferred_app_defs["accessibility"] = (
3846
# 1st mimetype is to let us find apps
3947
# 2nd mimetype is to set default handler for (so we handle all of that type, not just a specific format)
4048
)
4149

42-
preferred_app_defs[_("Internet")] = (
50+
preferred_app_defs["internet"] = (
4351
( "x-scheme-handler/http", "x-scheme-handler/http", _("Web") ),
4452
( "x-scheme-handler/mailto", "x-scheme-handler/mailto", _("Mail") ),
4553
)
4654

47-
preferred_app_defs[_("Multimedia")] = (
55+
preferred_app_defs["multimedia"] = (
4856
( "audio/x-vorbis+ogg", "audio", _("Music") ),
4957
( "video/x-ogm+ogg", "video", _("Video") ),
5058
( "image/jpeg", "image", _("Photos") ),
5159
)
5260

53-
preferred_app_defs[_("Office")] = (
61+
preferred_app_defs["office"] = (
5462
( "application/msword", "application/msword", _("Word") ),
5563
( "application/msexcel", "application/msexcel", _("Spreadsheet") ),
5664
( "application/pdf", "application/pdf", _("PDF") ),
5765
( "text/x-python", "text/x-python", _("Source Code") ),
5866
)
5967

60-
preferred_app_defs[_("System")] = (
68+
preferred_app_defs["system"] = (
6169
( "inode/directory", "inode/directory", _("File Manager") ),
6270
( "text/plain", "text/plain", _("Plain Text") ),
6371
)
@@ -583,7 +591,7 @@ def on_module_selected(self):
583591
for name in preferred_app_defs:
584592
items = preferred_app_defs[name]
585593
if len(items) > 0:
586-
settings = page.add_section(name)
594+
settings = page.add_section(translated_categories[name])
587595
# size_group = Gtk.SizeGroup.new(Gtk.SizeGroupMode.HORIZONTAL)
588596
for item in items:
589597
widget = SettingsWidget()

0 commit comments

Comments
 (0)