File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,12 +236,7 @@ async def select_firewall(preset: FirewallConfiguration | None = None) -> Firewa
236236
237237
238238async def select_fonts (preset : FontsConfiguration | None = None ) -> FontsConfiguration | None :
239- descriptions = {
240- FontPackage .NOTO : tr ('Unicode font coverage for most languages' ),
241- FontPackage .EMOJI : tr ('color emoji for browsers and apps' ),
242- FontPackage .CJK : tr ('Chinese, Japanese, Korean characters' ),
243- }
244- items = [MenuItem (f'{ f .value } ({ descriptions [f ]} )' , value = f ) for f in FontPackage ]
239+ items = [MenuItem (f'{ f .value } ({ f .description ()} )' , value = f ) for f in FontPackage ]
245240 group = MenuItemGroup (items )
246241
247242 if preset :
Original file line number Diff line number Diff line change 22from enum import StrEnum , auto
33from typing import Any , NotRequired , Self , TypedDict
44
5+ from archinstall .lib .translationhandler import tr
6+
57
68class PowerManagement (StrEnum ):
79 POWER_PROFILES_DAEMON = 'power-profiles-daemon'
@@ -44,6 +46,15 @@ class FontPackage(StrEnum):
4446 EMOJI = 'noto-fonts-emoji'
4547 CJK = 'noto-fonts-cjk'
4648
49+ def description (self ) -> str :
50+ match self :
51+ case FontPackage .NOTO :
52+ return tr ('Unicode font coverage for most languages' )
53+ case FontPackage .EMOJI :
54+ return tr ('color emoji for browsers and apps' )
55+ case FontPackage .CJK :
56+ return tr ('Chinese, Japanese, Korean characters' )
57+
4758
4859class FontsConfigSerialization (TypedDict ):
4960 fonts : list [str ]
You can’t perform that action at this time.
0 commit comments