diff --git a/html/translate.html b/html/translate.html
index d723b1857..babe19aab 100644
--- a/html/translate.html
+++ b/html/translate.html
@@ -19,7 +19,7 @@
{% else %}
{{ unit.source }} | {{ form.target }} |
{% endif %}
-{{ unit.location }} |
+{{ unit.get_location_links }} |
|
{% trans "Skip" %}
diff --git a/trans/models.py b/trans/models.py
index 0efd79c4f..73ee444dc 100644
--- a/trans/models.py
+++ b/trans/models.py
@@ -3,6 +3,7 @@ from django.db.models import Q
from django.conf import settings
from lang.models import Language
from django.utils.translation import ugettext_lazy, ugettext as _
+from django.utils.safestring import mark_safe
from glob import glob
import os
import os.path
@@ -363,3 +364,13 @@ class Unit(models.Model):
else:
del kwargs['backend']
super(Unit, self).save(*args, **kwargs)
+
+ def get_location_links(self):
+ ret = []
+ for location in self.location.split(','):
+ location = location.strip()
+ filename, line = location.split(':')
+ link = 'https://github.com/phpmyadmin/phpmyadmin/blob/master/%s#L%s' % (filename, line)
+ ret.append('%s' % (link, location))
+ return mark_safe('\n'.join(ret))
+
|