Commit 334e43f3 authored by Michal Čihař's avatar Michal Čihař

Language object is no longer optional

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent feda18ca
...@@ -78,15 +78,11 @@ def fmt_whitespace(value): ...@@ -78,15 +78,11 @@ def fmt_whitespace(value):
@register.inclusion_tag('format-translation.html') @register.inclusion_tag('format-translation.html')
def format_translation(value, language=None, diff=None, search_match=None, def format_translation(value, language, diff=None, search_match=None,
simple=False, num_plurals=2): simple=False, num_plurals=2):
""" """
Nicely formats translation text possibly handling plurals or diff. Nicely formats translation text possibly handling plurals or diff.
""" """
# Get language
if language is None:
language = Language.objects.get_default()
# Split plurals to separate strings # Split plurals to separate strings
plurals = split_plural(value) plurals = split_plural(value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment