1919from textual .widgets .selection_list import Selection
2020from textual .worker import WorkerCancelled
2121
22- from archinstall .lib .output import debug , info
22+ from archinstall .lib .output import debug
2323from archinstall .lib .translationhandler import tr
2424from archinstall .tui .ui .menu_item import MenuItem , MenuItemGroup
2525from archinstall .tui .ui .result import Result , ResultType
@@ -1238,9 +1238,9 @@ def __init__(self, main: InstanceRunnable[ValueT] | Callable[[], Awaitable[Value
12381238
12391239 @override
12401240 async def _on_exit_app (self ) -> None :
1241- from archinstall .lib .translationhandler import _restore_console_font
1241+ from archinstall .lib .translationhandler import restore_console_font
12421242
1243- _restore_console_font ()
1243+ restore_console_font ()
12441244 await super ()._on_exit_app ()
12451245
12461246 def action_trigger_help (self ) -> None :
@@ -1252,17 +1252,9 @@ def action_trigger_help(self) -> None:
12521252 _ = self .screen .mount (HelpPanel ())
12531253
12541254 def on_mount (self ) -> None :
1255- import archinstall .lib .translationhandler as th
1255+ from archinstall .lib .translationhandler import translation_handler
12561256
1257- if th ._ENV_FONT :
1258- if th ._set_console_font (th ._ENV_FONT ):
1259- th .translation_handler ._using_env_font = True
1260- else :
1261- debug (f'FONT={ th ._ENV_FONT } could not be set, using language font mapping' )
1262- if th .translation_handler .active_font :
1263- th ._set_console_font (th .translation_handler .active_font )
1264- elif th .translation_handler .active_font :
1265- th ._set_console_font (th .translation_handler .active_font )
1257+ translation_handler .apply_console_font ()
12661258 self ._run_worker ()
12671259
12681260 @work
@@ -1293,14 +1285,9 @@ class TApp:
12931285 app : _AppInstance [Any ] | None = None
12941286
12951287 def run (self , main : InstanceRunnable [ValueT ] | Callable [[], Awaitable [ValueT ]]) -> ValueT :
1296- import archinstall .lib .translationhandler as th
1297-
12981288 TApp .app = _AppInstance (main )
12991289 result : ValueT | Exception | None = TApp .app .run ()
13001290
1301- if th ._ENV_FONT and not th .translation_handler ._using_env_font :
1302- info (f'FONT={ th ._ENV_FONT } could not be set, using language font mapping' )
1303-
13041291 if isinstance (result , Exception ):
13051292 raise result
13061293
0 commit comments