mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix localization
This commit is contained in:
parent
f3e81e4f3e
commit
3499dc7c5e
@ -145,6 +145,7 @@ objc_library(
|
||||
],
|
||||
deps = [
|
||||
"//submodules/NumberPluralizationForm:NumberPluralizationForm",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
|
@ -308,6 +308,7 @@ static _FormattedString * _Nonnull getFormatted{num_arguments}(_PresentationStri
|
||||
|
||||
#import <PresentationStrings/PresentationStrings.h>
|
||||
#import <NumberPluralizationForm/NumberPluralizationForm.h>
|
||||
#import <AppBundle/AppBundle.h>
|
||||
|
||||
@implementation _FormattedStringRange
|
||||
|
||||
@ -447,7 +448,7 @@ static NSString * _Nonnull getSingle(_PresentationStrings * _Nonnull strings, NS
|
||||
static NSDictionary<NSString *, NSString *> *fallbackDict = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
NSString *lprojPath = [[NSBundle mainBundle] pathForResource:@"en" ofType:@"lproj"];
|
||||
NSString *lprojPath = [getAppBundle() pathForResource:@"en" ofType:@"lproj"];
|
||||
if (!lprojPath) {
|
||||
return;
|
||||
}
|
||||
@ -496,7 +497,7 @@ static NSString * _Nonnull getPluralizedIndirect(_PresentationStrings * _Nonnull
|
||||
static NSDictionary<NSNumber *, NSString *> *idToKey = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
NSString *dataPath = [[NSBundle mainBundle] pathForResource:@"PresentationStrings" ofType:@"data"];
|
||||
NSString *dataPath = [getAppBundle() pathForResource:@"PresentationStrings" ofType:@"data"];
|
||||
if (!dataPath) {
|
||||
assert(false);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user