aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
diff options
context:
space:
mode:
authorAcors24 <[email protected]>2024-09-03 23:37:42 +0200
committerAcors24 <[email protected]>2024-09-03 23:37:42 +0200
commitae4f850ff4560a9ce7f7149355a4deff0a4db4f0 (patch)
tree9123d81a9ff75c5f137c463df04a7d0bf5ca778c /src/utils
parent3738b180ddaa75d23f027272dd072dda4bc8e105 (diff)
downloadSponsorBlock-ae4f850ff4560a9ce7f7149355a4deff0a4db4f0.tar.gz
SponsorBlock-ae4f850ff4560a9ce7f7149355a4deff0a4db4f0.zip
add upcoming notices
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/categoryUtils.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/utils/categoryUtils.ts b/src/utils/categoryUtils.ts
index d93c2c7b..38f4b8e9 100644
--- a/src/utils/categoryUtils.ts
+++ b/src/utils/categoryUtils.ts
@@ -36,6 +36,15 @@ export function getSkippingText(segments: SponsorTime[], autoSkip: boolean): str
}
}
+export function getUpcomingText(segments: SponsorTime[]): string {
+ const categoryName = chrome.i18n.getMessage(segments.length > 1 ? "multipleSegments"
+ : "category_" + segments[0].category + "_short") || chrome.i18n.getMessage("category_" + segments[0].category);
+
+ const messageId = "upcoming";
+ return chrome.i18n.getMessage(messageId).replace("{0}", categoryName);
+}
+
+
export function getCategorySuffix(category: Category): string {
if (category.startsWith("poi_")) {
return "_POI";
@@ -51,5 +60,4 @@ export function getCategorySuffix(category: Category): string {
export function shortCategoryName(categoryName: string): string {
return chrome.i18n.getMessage("category_" + categoryName + "_short") || chrome.i18n.getMessage("category_" + categoryName);
}
-
export const DEFAULT_CATEGORY = "chooseACategory"; \ No newline at end of file