Skip to content

Commit

Permalink
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 %@".
  • Loading branch information
wutschel committed Jan 19, 2025
1 parent 4e8c79f commit f792947
Show file tree
Hide file tree
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
Expand Up @@ -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];
}
Expand All @@ -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")]) {
Expand Down
1 change: 0 additions & 1 deletion XBMC Remote/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit f792947

Please sign in to comment.