From 73773a503b7c4426967ad4162d5e1eb0f5dbcc9a Mon Sep 17 00:00:00 2001 From: Jerry <89069957+Jerry23011@users.noreply.github.com> Date: Sat, 16 Sep 2023 13:19:15 -0700 Subject: [PATCH] Localize skip button in notifications (#58) --- TomatoBar/Notifications.swift | 2 +- TomatoBar/en.lproj/Localizable.strings | 1 + TomatoBar/zh-Hans.lproj/Localizable.strings | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TomatoBar/Notifications.swift b/TomatoBar/Notifications.swift index 87038c8..9138883 100644 --- a/TomatoBar/Notifications.swift +++ b/TomatoBar/Notifications.swift @@ -31,7 +31,7 @@ class TBNotificationCenter: NSObject, UNUserNotificationCenterDelegate { let actionSkipRest = UNNotificationAction( identifier: TBNotification.Action.skipRest.rawValue, - title: "Skip", + title: NSLocalizedString("TBTimer.onRestStart.skip.title", comment: "Skip"), options: [] ) let restStartedCategory = UNNotificationCategory( diff --git a/TomatoBar/en.lproj/Localizable.strings b/TomatoBar/en.lproj/Localizable.strings index 570d653..11d353c 100644 --- a/TomatoBar/en.lproj/Localizable.strings +++ b/TomatoBar/en.lproj/Localizable.strings @@ -22,5 +22,6 @@ "TBTimer.onRestStart.title" = "Time's up"; "TBTimer.onRestStart.short.body" = "It's time for a short break!"; "TBTimer.onRestStart.long.body" = "It's time for a long break!"; +"TBTimer.onRestStart.skip.title" = "Skip"; "TBTimer.onRestFinish.title" = "Break is over"; "TBTimer.onRestFinish.body" = "Keep up the good work!"; diff --git a/TomatoBar/zh-Hans.lproj/Localizable.strings b/TomatoBar/zh-Hans.lproj/Localizable.strings index 2699123..537b741 100644 --- a/TomatoBar/zh-Hans.lproj/Localizable.strings +++ b/TomatoBar/zh-Hans.lproj/Localizable.strings @@ -22,5 +22,6 @@ "TBTimer.onRestStart.title" = "时间到"; "TBTimer.onRestStart.short.body" = "小憩时间到!"; "TBTimer.onRestStart.long.body" = "长休息时间到!"; +"TBTimer.onRestStart.skip.title" = "跳过"; "TBTimer.onRestFinish.title" = "休息结束"; "TBTimer.onRestFinish.body" = "继续努力!";