Skip to content

Commit

Permalink
Merge pull request #4168 from aronasorman/handlebars-i18nzzz
Browse files Browse the repository at this point in the history
make sure the language-specific i18n js catalog file is loaded before en.js.
  • Loading branch information
aronasorman committed Jul 28, 2015
2 parents f9edd1a + fed31e2 commit e6718c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ var TabularReportView = BaseView.extend({
});

this.append_views(row_views, ".student-data");

this.$('.headrowuser').css("min-width", this.$('.headrow.data').outerWidth());

if(this.complete_callback) {
Expand Down Expand Up @@ -429,7 +429,7 @@ var CoachSummaryView = BaseView.extend({
var ref, ref1;

if ((this.data_model != null ? this.data_model.get("learner_events") != null ? this.data_model.get("learner_events").length : void 0 : void 0) === 0) {
show_message("warning", "No recent learner data for this group is available.");
show_message("warning", gettext("No recent learner data for this group is available."));
}

delete this.tabular_report_view;
Expand All @@ -442,12 +442,12 @@ var CoachSummaryView = BaseView.extend({
this.$("#show_tabular_report").text("Loading");
this.$("#show_tabular_report").attr("disabled", "disabled");
this.tabular_report_view = new TabularReportView({model: this.model, complete: function() {
self.$("#show_tabular_report").text("Hide Tabular Report");
self.$("#show_tabular_report").text(gettext("Hide Tabular Report"));
self.$("#show_tabular_report").removeAttr("disabled");
}});
this.$("#detailed_report_view").append(this.tabular_report_view.el);
} else {
this.$("#show_tabular_report").text("Show Tabular Report");
this.$("#show_tabular_report").text(gettext("Show Tabular Report"));
this.tabular_report_view.remove();
delete this.tabular_report_view;
}
Expand Down Expand Up @@ -603,4 +603,4 @@ var CoachReportView = BaseView.extend({
this.$('#facility-select-container').append(this.facility_select_view.el);
this.$("#student_report_container").append(this.coach_summary_view.el);
}
});
});
6 changes: 3 additions & 3 deletions kalite/distributed/templates/distributed/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@
<script src="{% static 'django_js_reverse/js/reverse.js' %}"></script>
{% endif %}

<!-- JS translation file statically included as a back-up, so that if the saved file below isn't available, we don't choke. -->
<script type="text/javascript" src="{% static 'js/i18n/en.js' %}"></script>

{% if current_language != "en" %}
<!-- JS translation files dynamically generated by django, then saved to the static file below -->
<script type="text/javascript" src="{{ settings.CONTENT_URL }}locale/js/i18n/{{ request.language }}.js"></script>
{% endif %}

{% compress js file basejs %}

<!-- JS translation file statically included as a back-up, so that if the saved file below isn't available, we don't choke. -->
<script type="text/javascript" src="{% static 'js/i18n/en.js' %}"></script>

{# Older versions of IE didn't have a JSON object, so this library adds it back in if needed #}
<script type="text/javascript" src="{% static 'js/json2.js' %}"></script>

Expand Down

0 comments on commit e6718c2

Please sign in to comment.