diff --git a/html/translate.html b/html/translate.html
index 03fce2b45..0c74ab1a4 100644
--- a/html/translate.html
+++ b/html/translate.html
@@ -29,8 +29,9 @@
{% trans "Flags" %} |
{{ unit.flags }} |
|
+{% trans "Previous" %}
-{% trans "Skip" %}
+{% trans "Next" %}
diff --git a/trans/views.py b/trans/views.py
index e4a8309b2..5e4f2636f 100644
--- a/trans/views.py
+++ b/trans/views.py
@@ -43,6 +43,7 @@ def translate(request, project, subproject, lang):
# Check where we are
rqtype = request.REQUEST.get('type', 'all')
+ direction = request.REQUEST.get('dir', 'forward')
pos = request.REQUEST.get('oldpos', '-1')
try:
pos = int(pos)
@@ -63,7 +64,10 @@ def translate(request, project, subproject, lang):
else:
# What unit to show
- unit = obj.unit_set.filter_type(rqtype).filter(position__gt = pos)[0]
+ if direction == 'back':
+ unit = obj.unit_set.filter_type(rqtype).filter(position__lt = pos)[0]
+ else:
+ unit = obj.unit_set.filter_type(rqtype).filter(position__gt = pos)[0]
# Prepare form
form = TranslationForm(initial = {
|