Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Translate the file name of the nutritional plan PDF

Roland Geider484e56fd354e
diff --git a/nutrition/views.py b/nutrition/views.py
index 8d76dbda7..240926228 100644
--- a/nutrition/views.py
+++ b/nutrition/views.py
@@ -157,7 +157,9 @@ def export_pdf(request, id):
# Create the HttpResponse object with the appropriate PDF headers.
response = HttpResponse(mimetype='application/pdf')
- response['Content-Disposition'] = 'attachment; filename=plan.pdf'
+
+ # Translators: translation can only have ASCII characters
+ response['Content-Disposition'] = 'attachment; filename=%s.pdf' % _('nutritional-plan')
# Create the PDF object, using the response object as its "file."
doc = SimpleDocTemplate(response,