Skip to content

Commit

Permalink
normalize_decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 27, 2022
1 parent 3566f3a commit ffa185e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lingua_franca/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,14 @@ def _call_localized_function(func, *args, **kwargs):
# If we didn't find a localized function to correspond with
# the wrapped function, we cached NotImplementedError in its
# place.

# first account for the function not being present in any
# module, meaning all modules are falling back to a catch all
# parser, this usually means the function will need localization
# only in future languages not currently supported
if func_name not in _localized_functions[_module_name][lang_code]:
raise FunctionNotLocalizedError(func_name, lang_code)

loc_signature = _localized_functions[_module_name][lang_code][func_name]
if isinstance(loc_signature, type(NotImplementedError())):
raise loc_signature
Expand Down

0 comments on commit ffa185e

Please sign in to comment.