mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Invalid i18n string appearing at bottom of topic
This commit is contained in:
parent
6949bc6611
commit
744266374a
@ -34,7 +34,7 @@ Discourse.TopicDetails = Discourse.Model.extend({
|
|||||||
|
|
||||||
|
|
||||||
notificationReasonText: function() {
|
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') {
|
if (typeof this.get('notifications_reason_id') === 'number') {
|
||||||
locale_string += "_" + this.get('notifications_reason_id');
|
locale_string += "_" + this.get('notifications_reason_id');
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ Discourse.NotificationsButton = Discourse.DropdownButtonView.extend({
|
|||||||
|
|
||||||
text: function() {
|
text: function() {
|
||||||
var key = (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.WATCHING: return 'watching';
|
||||||
case Discourse.Topic.NotificationLevel.TRACKING: return 'tracking';
|
case Discourse.Topic.NotificationLevel.TRACKING: return 'tracking';
|
||||||
case Discourse.Topic.NotificationLevel.REGULAR: return 'regular';
|
case Discourse.Topic.NotificationLevel.REGULAR: return 'regular';
|
||||||
|
Loading…
Reference in New Issue
Block a user