FIX: Invalid i18n string appearing at bottom of topic

This commit is contained in:
Robin Ward 2013-10-07 15:01:51 -04:00
parent 6949bc6611
commit 744266374a
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ Discourse.TopicDetails = Discourse.Model.extend({
notificationReasonText: function() {
var locale_string = "topic.notifications.reasons." + this.get('notification_level');
var locale_string = "topic.notifications.reasons." + (this.get('notification_level') || 1);
if (typeof this.get('notifications_reason_id') === 'number') {
locale_string += "_" + this.get('notifications_reason_id');
}

View file

@ -21,7 +21,7 @@ Discourse.NotificationsButton = Discourse.DropdownButtonView.extend({
text: function() {
var key = (function() {
switch (this.get('topic.details.notification_level')) {
switch (this.get('topic.details.notification_level') || 1) {
case Discourse.Topic.NotificationLevel.WATCHING: return 'watching';
case Discourse.Topic.NotificationLevel.TRACKING: return 'tracking';
case Discourse.Topic.NotificationLevel.REGULAR: return 'regular';