77from dataclasses import dataclass , field
88from importlib .metadata import version
99from pathlib import Path
10- from typing import TYPE_CHECKING , Any
10+ from typing import Any
1111from urllib .request import Request , urlopen
1212
1313from pydantic .dataclasses import dataclass as p_dataclass
2525from archinstall .lib .output import debug , error , warn
2626from archinstall .lib .plugins import load_plugin
2727from archinstall .lib .storage import storage
28- from archinstall .lib .translationhandler import Language , translation_handler
28+ from archinstall .lib .translationhandler import Language , tr , translation_handler
2929from archinstall .lib .utils .util import get_password
3030from archinstall .tui .curses_menu import Tui
3131
32- if TYPE_CHECKING :
33- from collections .abc import Callable
34-
35- from archinstall .lib .translationhandler import DeferredTranslation
36-
37- _ : Callable [[str ], DeferredTranslation ]
38-
3932
4033@p_dataclass
4134class Arguments :
@@ -430,7 +423,7 @@ def _process_creds_data(self, creds_data: str) -> dict[str, Any] | None:
430423 return json .loads (creds_data )
431424 except ValueError as err :
432425 if "Invalid password" in str (err ):
433- error (str ( _ ( "Incorrect credentials file decryption password" ) ))
426+ error (tr ( "Incorrect credentials file decryption password" ))
434427 exit (1 )
435428 else :
436429 debug (f"Error decrypting credentials file: { err } " )
@@ -440,10 +433,10 @@ def _process_creds_data(self, creds_data: str) -> dict[str, Any] | None:
440433
441434 with Tui ():
442435 while True :
443- header = str ( _ ( "Incorrect password" ) ) if incorrect_password else None
436+ header = tr ( "Incorrect password" ) if incorrect_password else None
444437
445438 decryption_pwd = get_password (
446- text = str ( _ ( "Credentials file decryption password" ) ),
439+ text = tr ( "Credentials file decryption password" ),
447440 header = header ,
448441 allow_skip = False ,
449442 skip_confirmation = True ,
0 commit comments