Jaap Roes avatar Jaap Roes committed ce64952

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

Comments (0)

Files changed (1)

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)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.