Skip to content

Commit 111cbf8

Browse files
committed
cs_default: Fix localization in removable_media_defs
Fixes #12877
1 parent efdc75d commit 111cbf8

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@
175175
]
176176

177177
removable_media_defs = [
178-
( "x-content/audio-cdda", _("CD audio") , _("Select an application for audio CDs")),
179-
( "x-content/video-dvd", _("DVD video"), _("Select an application for video DVDs") ),
178+
( "x-content/audio-cdda", _("Audio CD") , _("Select an application for audio CDs")),
179+
( "x-content/video-dvd", _("Video DVD"), _("Select an application for video DVDs") ),
180180
( "x-content/audio-player", _("Music player"), _("Select an application to run when a music player is connected") ),
181181
( "x-content/image-dcf", _("Photos"), _("Select an application to run when a camera is connected") ),
182182
( "x-content/unix-software", _("Software"), _("Select an application for software CDs") )
@@ -187,19 +187,20 @@
187187
# strings, just here to fix capitalization of the English originals.
188188
# If the shared-mime-info translation works for your language,
189189
# simply leave these untranslated.
190-
( "x-content/audio-dvd", _("audio DVD") ),
191-
( "x-content/blank-bd", _("blank Blu-ray disc") ),
192-
( "x-content/blank-cd", _("blank CD disc") ),
193-
( "x-content/blank-dvd", _("blank DVD disc") ),
194-
( "x-content/blank-hddvd", _("blank HD DVD disc") ),
190+
( "x-content/audio-dvd", _("Audio DVD") ),
191+
( "x-content/blank-bd", _("Blank Blu-ray disc") ),
192+
( "x-content/blank-cd", _("Blank CD disc") ),
193+
( "x-content/blank-dvd", _("Blank DVD disc") ),
194+
( "x-content/blank-hddvd", _("Blank HD DVD disc") ),
195195
( "x-content/video-bluray", _("Blu-ray video disc") ),
196-
( "x-content/ebook-reader", _("e-book reader") ),
196+
( "x-content/ebook-reader", _("E-book reader") ),
197197
( "x-content/video-hddvd", _("HD DVD video disc") ),
198198
( "x-content/image-picturecd", _("Picture CD") ),
199199
( "x-content/video-svcd", _("Super Video CD") ),
200200
( "x-content/video-vcd", _("Video CD") ),
201201
( "x-content/win32-software", _("Windows software") ),
202-
( "x-content/software", _("Software") )
202+
( "x-content/software", _("Software") ),
203+
( "x-content/ostree-repository", _("OSTree Software Updates") )
203204
]
204205

205206
class ColumnBox(Gtk.VBox):
@@ -523,16 +524,15 @@ def getDescription(self, content_type):
523524
description = None
524525
for d in other_defs:
525526
if content_type == d[DEF_CONTENT_TYPE]:
526-
s = d[DEF_LABEL]
527-
if s == _(s):
528-
description = Gio.content_type_get_description(content_type)
529-
else:
530-
description = s
527+
description = d[DEF_LABEL]
531528
break
532529

533530
if description is None:
534-
print(f"Content type '{content_type}' is missing from the info panel")
535-
return Gio.content_type_get_description(content_type)
531+
try:
532+
print(f"Content type '{content_type}' is missing from the info panel")
533+
description = Gio.content_type_get_description(content_type).capitalize()
534+
except Exception as e:
535+
print(e)
536536

537537
return description
538538

0 commit comments

Comments
 (0)