Commits

Jaap Roes committed ce64952

Use   for indent in the move form dropdown. Use gettext_lazy to fetch translations.

  • Participants
  • Parent commits 56d523f

Comments (0)

Files changed (1)

File treebeard/forms.py

 
 from django.forms.models import model_to_dict, ErrorList, BaseModelForm
 from django import forms
-from django.utils.translation import ugettext as _
+from django.utils.translation import ugettext_lazy as _
+from django.utils.safestring import mark_safe
 
 
 class MoveNodeForm(forms.ModelForm):
                             possible_parent == for_node) or \
                             possible_parent.is_descendant_of(for_node)
 
-            mk_indent = lambda(level): '. . ' * (level - 1)
+            mk_indent = lambda(level): '    ' * (level - 1)
 
             def add_subtree(node, options):
                 """ Recursively build options tree. """
                 if is_loop_safe(node):
                     options.append(
-                        (node.pk, mk_indent(node.get_depth()) + str(node)))
+                        (node.pk, mark_safe(mk_indent(node.get_depth()) + str(node))))
                     for subnode in node.get_children():
                         add_subtree(subnode, options)