Feat: Add biweekly and bimonthly and fix translations (#36)

This commit is contained in:
Stan Triepels
2022-11-13 01:00:11 +01:00
committed by GitHub
parent 17205549eb
commit 542e04db54
15 changed files with 906 additions and 612 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ def call_hook(sender, instance, **kwargs):
f = getattr(m, func)
except (ValueError, ImportError, AttributeError):
logger.error(
_(f"malformed return hook '{instance.hook}' for [{instance.name}]")
_("malformed return hook '%(hook)s' for [%(name)s]") % {'hook': instance.hook, 'name': instance.name}
)
return
try:
@@ -27,8 +27,8 @@ def call_hook(sender, instance, **kwargs):
except Exception as e:
logger.error(
_(
f"return hook {instance.hook} failed on [{instance.name}] because {str(e)}"
)
"return hook %(hook)s failed on [%(name)s] because %(error)s"
) % {'hook': instance.hook, 'name': instance.name, 'error': str(e)}
)