Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework logic to identify "resume" in actionSheetHandler
Browse files Browse the repository at this point in the history
Instead of comparing two separately translated strings (which is faulty for Turkish, and in general not robust), use the same string as base to identify the "Resume from" pattern for all languages This also allows to remove the string "Resume from" completely as we already have "Resume from %@".
wutschel committed Jan 19, 2025
1 parent 4e8c79f commit f792947
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion XBMC Remote/ShowInfoViewController.m
Original file line number Diff line number Diff line change
@@ -388,6 +388,7 @@ - (void)showActionSheet {
}

- (void)actionSheetHandler:(NSString*)actiontitle {
NSString *resumeKey = [LOCALIZED_STR(@"Resume from %@") stringByReplacingOccurrencesOfString:@"%@" withString:@""];
if ([actiontitle isEqualToString:LOCALIZED_STR(@"Queue after current")]) {
[self addQueueAfterCurrent:YES];
}
@@ -401,7 +402,7 @@ - (void)actionSheetHandler:(NSString*)actiontitle {
[actiontitle isEqualToString:LOCALIZED_STR(@"Stop Recording")]) {
[self recordChannel];
}
else if ([actiontitle rangeOfString:LOCALIZED_STR(@"Resume from")].location != NSNotFound) {
else if ([actiontitle rangeOfString:resumeKey].location != NSNotFound) {
[self resumePlayback];
}
else if ([actiontitle isEqualToString:LOCALIZED_STR(@"Play Trailer")]) {
1 change: 0 additions & 1 deletion XBMC Remote/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -98,7 +98,6 @@
"OK" = "OK";
"Cancel" = "Cancel";
"Resume from %@" = "Resume from %@";
"Resume from" = "Resume from";
"First aired on %@" = "First aired on %@";
"Episodes: %@" = "Episodes: %@";
"1 result" = "1 result";

0 comments on commit f792947

Please sign in to comment.