Better titles

This commit is contained in:
Michal Čihař 2012-02-28 09:26:31 +01:00
parent 6727585666
commit cf0cf84d56
2 changed files with 4 additions and 4 deletions

View File

@ -165,7 +165,7 @@ class Translation(models.Model):
return ('trans.views.show_translation', (), {'project': self.subproject.slug, 'subproject': self.subproject.slug, 'lang': self.language.code}) return ('trans.views.show_translation', (), {'project': self.subproject.slug, 'subproject': self.subproject.slug, 'lang': self.language.code})
def __unicode__(self): def __unicode__(self):
return '%s@%s' % (self.language.name, self.subproject.__unicode__()) return '%s %s' % (self.language.name, self.subproject.__unicode__())
def update_from_blob(self, blob): def update_from_blob(self, blob):
''' '''

View File

@ -8,7 +8,7 @@ def show_project(request, project):
return render_to_response('project.html', RequestContext(request, { return render_to_response('project.html', RequestContext(request, {
'object': obj, 'object': obj,
'title': '%s @ Weblate' % obj.name, 'title': '%s @ Weblate' % (obj.__unicode__()),
})) }))
def show_subproject(request, project, subproject): def show_subproject(request, project, subproject):
@ -16,7 +16,7 @@ def show_subproject(request, project, subproject):
return render_to_response('subproject.html', RequestContext(request, { return render_to_response('subproject.html', RequestContext(request, {
'object': obj, 'object': obj,
'title': '%s/%s @ Weblate' % (obj.name, obj.project.name), 'title': '%s @ Weblate' % (obj.__unicode__()),
})) }))
def show_translation(request, project, subproject, lang): def show_translation(request, project, subproject, lang):
@ -24,6 +24,6 @@ def show_translation(request, project, subproject, lang):
return render_to_response('translation.html', RequestContext(request, { return render_to_response('translation.html', RequestContext(request, {
'object': obj, 'object': obj,
'title': '%s %s/%s @ Weblate' % (obj.language.name, obj.subproject.name, obj.subproject.project.name), 'title': '%s @ Weblate' % (obj.__unicode__()),
})) }))