Possibility of localization YTCastConfirm

This commit is contained in:
dayanch96
2022-06-12 05:17:32 +03:00
committed by GitHub
parent e870be2f52
commit 29c7f279ae
+7 -4
View File
@@ -14,6 +14,8 @@
#import "Tweaks/YouTubeHeader/YTCommonColorPalette.h"
#import "Tweaks/YouTubeHeader/ASCollectionView.h"
#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]
#define YT_BUNDLE_ID @"com.google.ios.youtube"
#define YT_NAME @"YouTube"
@@ -119,15 +121,16 @@ BOOL ytMiniPlayer() {
%hook MDXPlaybackRouteButtonController
- (void)didPressButton:(id)arg1 {
if (castConfirm()) {
UIAlertController* alertController = [%c(UIAlertController) alertControllerWithTitle:@"Casting"
message:@"Are you sure you want to start casting?"
NSBundle *tweakBundle = uYouPlusBundle();
UIAlertController* alertController = [%c(UIAlertController) alertControllerWithTitle:LOC(@"CASTING")
message:LOC(@"MSG_ARE_YOU_SURE")
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [%c(UIAlertAction) actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
UIAlertAction* defaultAction = [%c(UIAlertAction) actionWithTitle:LOC(@"MSG_YES") style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
%orig;
}];
UIAlertAction* noButton = [%c(UIAlertAction)
actionWithTitle:@"Cancel"
actionWithTitle:LOC(@"MSG_CANCEL")
style:UIAlertActionStyleDefault
handler: ^(UIAlertAction * action) {
return;