Added short category names

This commit is contained in:
Ajay Ramachandran
2020-06-03 20:42:38 -04:00
parent d9800b3c14
commit c9460bd6c6
2 changed files with 14 additions and 1 deletions

View File

@@ -486,21 +486,33 @@
"category_intro": { "category_intro": {
"message": "Intro Animation" "message": "Intro Animation"
}, },
"category_intro_short": {
"message": "Intro"
},
"category_outro": { "category_outro": {
"message": "Endcards/Credits" "message": "Endcards/Credits"
}, },
"category_interaction": { "category_interaction": {
"message": "Interaction Reminder (Subscribe)" "message": "Interaction Reminder (Subscribe)"
}, },
"category_interaction_short": {
"message": "Interaction Reminder"
},
"category_selfpromo": { "category_selfpromo": {
"message": "Unpaid/Self Promotion" "message": "Unpaid/Self Promotion"
}, },
"category_music_offtopic": { "category_music_offtopic": {
"message": "Music: Non-Music Section" "message": "Music: Non-Music Section"
}, },
"category_music_offtopic_short": {
"message": "Non-Music"
},
"category_livestream_messages": { "category_livestream_messages": {
"message": "Livestream: Donation/Message Readings" "message": "Livestream: Donation/Message Readings"
}, },
"category_livestream_messages_short": {
"message": "Message Reading"
},
"disable": { "disable": {
"message": "Disable" "message": "Disable"
}, },

View File

@@ -73,7 +73,8 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
this.contentContainer = props.contentContainer; this.contentContainer = props.contentContainer;
this.audio = null; this.audio = null;
let categoryName = chrome.i18n.getMessage(this.segments.length > 1 ? "multipleSegments" : "category_" + this.segments[0].category); let categoryName = chrome.i18n.getMessage(this.segments.length > 1 ? "multipleSegments"
: "category_" + this.segments[0].category + "_short") || chrome.i18n.getMessage("category_" + this.segments[0].category);
let noticeTitle = categoryName + " " + chrome.i18n.getMessage("skipped"); let noticeTitle = categoryName + " " + chrome.i18n.getMessage("skipped");
if (!this.autoSkip) { if (!this.autoSkip) {
noticeTitle = chrome.i18n.getMessage("skip") + " " + categoryName + "?"; noticeTitle = chrome.i18n.getMessage("skip") + " " + categoryName + "?";