File tree Expand file tree Collapse file tree 1 file changed +21
-11
lines changed
Expand file tree Collapse file tree 1 file changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -389,19 +389,29 @@ def _setup_composite_view(self, addon: Addon) -> None:
389389 self .widget .ui .labelDescription .setText ("" )
390390
391391 def _set_package_maintainer_label (self , addon : Addon ):
392+
392393 maintainers = addon .metadata .maintainer
393- maintainers_string = ""
394- if len (maintainers ) == 1 :
395- maintainers_string = (
396- translate ("AddonsInstaller" , "Maintainer" )
397- + f": { maintainers [0 ].name } <{ maintainers [0 ].email } >"
398- )
399- elif len (maintainers ) > 1 :
400- n = len (maintainers )
401- maintainers_string = translate ("AddonsInstaller" , "Maintainers:" , "" , n )
394+
395+ text = ""
396+
397+ count = len (maintainers )
398+
399+ if count > 0 :
400+
401+ text = translate ("AddonsInstaller" , "Maintainers" , "" , count )
402+ text = f"{ text } : "
403+
402404 for maintainer in maintainers :
403- maintainers_string += f"\n { maintainer .name } <{ maintainer .email } >"
404- self .widget .ui .labelMaintainer .setText (maintainers_string )
405+
406+ if count > 1 :
407+ text += "\n "
408+
409+ text += maintainer .name
410+
411+ if maintainer .email :
412+ text += f" <{ maintainer .email } >"
413+
414+ self .widget .ui .labelMaintainer .setText (text )
405415
406416 def _set_macro_maintainer_label (self , repo : Addon ):
407417 if repo .macro .author :
You can’t perform that action at this time.
0 commit comments