Skip to content

Commit

Permalink
translatable MissingMacroOrKeyError
Browse files Browse the repository at this point in the history
  • Loading branch information
sezanzeb committed Dec 28, 2024
1 parent 7d7a3a3 commit d78aa23
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions inputremapper/gui/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,18 @@
from inputremapper.configs.mapping import (
MappingData,
UIMapping,
MappingType,
)
from inputremapper.configs.paths import PathUtils
from inputremapper.configs.validation_errors import (
pydantify,
MissingMacroOrKeyError,
MacroButTypeOrCodeSetError,
SymbolAndCodeMismatchError,
MissingOutputAxisError,
WrongMappingTypeForKeyError,
OutputSymbolVariantError,
MappingType,
)
from inputremapper.configs.paths import PathUtils
from inputremapper.configs.validation_errors import pydantify
from inputremapper.exceptions import DataManagementError
from inputremapper.gui.components.output_type_names import OutputTypeNames
from inputremapper.gui.data_manager import DataManager, DEFAULT_PRESET_NAME
Expand Down Expand Up @@ -264,6 +267,9 @@ def format_error_message(mapping, error_type, error_message: str) -> str:

return error_message

if pydantify(MissingMacroOrKeyError) in error_type:
return _("Missing macro or key")

return error_message

@staticmethod
Expand Down

0 comments on commit d78aa23

Please sign in to comment.