Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Fix i18n error
Browse files Browse the repository at this point in the history
1. When ```PLATFORM_NAME``` or ```APPLICATION_NAME``` contains non-ascii characters, production.py casuse an UnicodeDecode exception.
2. Use ```{{ application_name }}``` rather than hard-code ```Insights``` in index.html.
  • Loading branch information
louyihua committed Oct 22, 2015
1 parent 0956bcb commit 9a918b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion analytics_dashboard/courses/templates/courses/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h3>
{% endblock %}

{% block intro-text %}
{% blocktrans %}Here are the courses you currently have access to in Insights:{% endblocktrans %}
{% blocktrans %}Here are the courses you currently have access to in {{ application_name }}:{% endblocktrans %}
{% endblock intro-text %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion analytics_dashboard/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
DATABASES['default'][override] = value

# Re-declare the full application name in case the components have been overridden.
FULL_APPLICATION_NAME = '{0} {1}'.format(PLATFORM_NAME, APPLICATION_NAME)
FULL_APPLICATION_NAME = u'{0} {1}'.format(PLATFORM_NAME, APPLICATION_NAME)

# Depends on DOCUMENTATION_LOAD_ERROR_URL, so evaluate at the end
DOCUMENTATION_LOAD_ERROR_MESSAGE = 'This data may not be available for your course. ' \
Expand Down

0 comments on commit 9a918b8

Please sign in to comment.