Skip to content

Commit

Permalink
Use localization header file
Browse files Browse the repository at this point in the history
  • Loading branch information
dayanch96 committed Mar 16, 2024
1 parent 66970d5 commit 2bcc011
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions Sideloading.xm
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,12 @@
#import <Foundation/Foundation.h>
#import <dlfcn.h>
#import <rootless.h>
#import "Source/Prefs/Localization.h"

#define YT_BUNDLE_ID @"com.google.ios.youtubemusic"
#define YT_BUNDLE_NAME @"YouTubeMusic"
#define YT_NAME @"YouTube Music"
#define YTMULoginAlert @"YTMULoginAlert"
#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]

NSBundle *YTMusicUltimateBundle() {
static NSBundle *bundle = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *tweakBundlePath = [[NSBundle mainBundle] pathForResource:@"YTMusicUltimate" ofType:@"bundle"];
if (tweakBundlePath)
bundle = [NSBundle bundleWithPath:tweakBundlePath];
else
bundle = [NSBundle bundleWithPath:ROOT_PATH_NS("/Library/Application Support/YTMusicUltimate.bundle")];
});
return bundle;
}

NSBundle *tweakBundle = YTMusicUltimateBundle();

@interface YTAlertView : UIView
@property (nonatomic, copy, readwrite) NSString *title;
Expand Down

0 comments on commit 2bcc011

Please sign in to comment.