Skip to content

Commit

Permalink
translations: Show translated language name
Browse files Browse the repository at this point in the history
On a preview we came up with "Page not available in Deutsch", which is
obivously wrong. Translate the language name as well, so that it fits to
the rest of the phrase.
  • Loading branch information
donald committed Feb 13, 2020
1 parent 4676194 commit 561a87b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpicms/base/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def preview_text(self):
def serve(self, request):
lang = request.LANGUAGE_CODE
if not getattr(self, 'body_' + lang) and self.body:
messages.info(request, _('Page not available in %s') % get_language_info(lang)['name_local'])
messages.info(request, _('Page not available in %s') % get_language_info(lang)['name_translated'])

return super().serve(request)

Expand Down

0 comments on commit 561a87b

Please sign in to comment.