mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-14 00:50:14 -04:00
FIX: Invalid i18n string appearing at bottom of topic
This commit is contained in:
parent
6949bc6611
commit
744266374a
2 changed files with 2 additions and 2 deletions
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue