Skip to content

Commit d78aa23

Browse files
committed
translatable MissingMacroOrKeyError
1 parent 7d7a3a3 commit d78aa23

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

inputremapper/gui/controller.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,18 @@
4141
from inputremapper.configs.mapping import (
4242
MappingData,
4343
UIMapping,
44+
MappingType,
45+
)
46+
from inputremapper.configs.paths import PathUtils
47+
from inputremapper.configs.validation_errors import (
48+
pydantify,
49+
MissingMacroOrKeyError,
4450
MacroButTypeOrCodeSetError,
4551
SymbolAndCodeMismatchError,
4652
MissingOutputAxisError,
4753
WrongMappingTypeForKeyError,
4854
OutputSymbolVariantError,
49-
MappingType,
5055
)
51-
from inputremapper.configs.paths import PathUtils
52-
from inputremapper.configs.validation_errors import pydantify
5356
from inputremapper.exceptions import DataManagementError
5457
from inputremapper.gui.components.output_type_names import OutputTypeNames
5558
from inputremapper.gui.data_manager import DataManager, DEFAULT_PRESET_NAME
@@ -264,6 +267,9 @@ def format_error_message(mapping, error_type, error_message: str) -> str:
264267

265268
return error_message
266269

270+
if pydantify(MissingMacroOrKeyError) in error_type:
271+
return _("Missing macro or key")
272+
267273
return error_message
268274

269275
@staticmethod

0 commit comments

Comments
 (0)