删除阿拉伯语首充相关图像资源及其配置文件;在 UIImage+Utils.m 中优化语言图像处理逻辑,新增对葡萄牙语的支持;在多个文件中添加对葡萄牙语的支持,包括本地化字符串和 InfoPlist 配置;更新 UI 组件以适应新的语言设置,确保用户界面的一致性和可用性。

This commit is contained in:
edwinQQQ
2025-07-15 14:35:05 +08:00
parent 16f9041ba9
commit 96c44cb032
16 changed files with 3430 additions and 81 deletions

View File

@@ -2665,6 +2665,8 @@
4C44BD5C2D151B5C00F321FA /* RoomSideMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomSideMenu.m; sourceTree = "<group>"; };
4C4707A32D53430300C8CD24 /* NSData+GZIP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+GZIP.h"; sourceTree = "<group>"; };
4C4707A42D53430300C8CD24 /* NSData+GZIP.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSData+GZIP.m"; sourceTree = "<group>"; };
4C4DE6442E2513DA00122763 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
4C4DE6452E2513DB00122763 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; };
4C51B09A2DA3B4C600D8DFB5 /* LudoGameViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LudoGameViewController.h; sourceTree = "<group>"; };
4C51B09B2DA3B4C600D8DFB5 /* LudoGameViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LudoGameViewController.m; sourceTree = "<group>"; };
4C51B09D2DA50FDA00D8DFB5 /* CPRelationshipChangeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPRelationshipChangeView.h; sourceTree = "<group>"; };
@@ -11741,6 +11743,7 @@
"zh-Hant",
ar,
tr,
"pt-BR",
);
mainGroup = 189DD52026DE255300AB55B1;
productRefGroup = 189DD52A26DE255300AB55B1 /* Products */;
@@ -13491,6 +13494,7 @@
2368ECD02BC38FA900EDF4C9 /* en */,
2368ECD22BC38FC500EDF4C9 /* zh-Hant */,
54435F2C2CC89D4600F4884B /* tr */,
4C4DE6442E2513DA00122763 /* pt-BR */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
@@ -13511,6 +13515,7 @@
2368ECC92BC38F6400EDF4C9 /* ar */,
2368ECCA2BC38F6F00EDF4C9 /* en */,
54435F2D2CC89D4600F4884B /* tr */,
4C4DE6452E2513DB00122763 /* pt-BR */,
);
name = Localizable.strings;
sourceTree = "<group>";

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"filename" : "room_menu_gift_first_recharge_ar.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -534,15 +534,14 @@
NSString *curImage = image;
NSString *language = [NSBundle getLanguageText];
//
if ([language isEqualToString:@"en"]) {
image = [NSString stringWithFormat:@"%@_en", image];
} else if ([language isEqualToString:@"ar"]) {
image = [NSString stringWithFormat:@"%@_ar", image];
} else if ([language isEqualToString:@"tr"]) {
if (isMSZH()) {
//
} else if (isMSTR()) {
image = [NSString stringWithFormat:@"%@_tr", image];
} else if (isMSRTL()) {
image = [NSString stringWithFormat:@"%@_ar", image];
} else {
//
image = [NSString stringWithFormat:@"%@_en", image];
}
//

View File

@@ -68,6 +68,8 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
#define isMSEN() [[NSBundle getLanguageText] hasPrefix:@"en"]
///是否土耳其语
#define isMSTR() [[NSBundle getLanguageText] hasPrefix:@"tr"]
///是否葡萄牙语
#define isMSPT() [[NSBundle getLanguageText] hasPrefix:@"pt"]
#endif /* YUMIMacroUitls_h */

View File

@@ -159,20 +159,47 @@
make.edges.mas_equalTo(self);
}];
honorImageView = [[UIImageView alloc] initWithImage:kImage(@"medals_rank_namebar")];
[self addSubview:honorImageView];
[honorImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.bottom.mas_equalTo(self).offset(6);
}];
// honorImageView = [[UIImageView alloc] initWithImage:kImage(@"medals_rank_namebar")];
// [self addSubview:honorImageView];
// [honorImageView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerX.mas_equalTo(self);
// make.bottom.mas_equalTo(self).offset(6);
// }];
//
// honorLabel = [UILabel labelInitWithText:YMLocalizedString(@"20.20.61_text_12")
// font:kFontSemibold(12)
// textColor:UIColorFromRGB(0xfff27b)];
// [self addSubview:honorLabel];
// [honorLabel mas_makeConstraints:^(MASConstraintMaker *make) {
// make.center.mas_equalTo(honorImageView);
// }];
// 1. label imageView label
honorLabel = [UILabel labelInitWithText:YMLocalizedString(@"20.20.61_text_12")
font:kFontSemibold(12)
textColor:UIColorFromRGB(0xfff27b)];
honorLabel.textAlignment = NSTextAlignmentCenter;
[self addSubview:honorLabel];
// 2. imageView
honorImageView = [[UIImageView alloc] initWithImage:kImage(@"medals_rank_namebar")];
honorImageView.contentMode = UIViewContentModeScaleToFill; //
[self insertSubview:honorImageView belowSubview:honorLabel]; // label
// 3. imageView label 8pt
[honorLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(honorImageView);
make.centerX.mas_equalTo(self);
make.bottom.mas_equalTo(self).offset(6); // view
}];
[honorImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(honorLabel); // label
make.left.equalTo(honorLabel.mas_left).offset(-8);
make.right.equalTo(honorLabel.mas_right).offset(8);
make.top.equalTo(honorLabel.mas_top).offset(-4);
make.bottom.equalTo(honorLabel.mas_bottom).offset(4);
}];
nameLabel = [UILabel labelInitWithText:@"" font:kFontSemibold(15) textColor:UIColorFromRGB(0xffffff)];
[self addSubview:nameLabel];

View File

@@ -1121,6 +1121,8 @@ typedef enum : NSInteger {
[button setTitleColor:UIColorFromRGB(0xd8a2ff) forState:UIControlStateNormal];
[button setTitleColor:UIColorFromRGB(0xFFFFFF) forState:UIControlStateSelected];
[button.titleLabel setFont:kFontMedium(13)];
[button.titleLabel setAdjustsFontSizeToFitWidth:YES];
button.contentEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 20);
[button setAdjustsImageWhenDisabled:NO];
return button;
}
@@ -1138,6 +1140,7 @@ typedef enum : NSInteger {
UIStackView *stack = [[UIStackView alloc] initWithArrangedSubviews:self.centerTabButtons];
stack.distribution = UIStackViewDistributionFillEqually;
return stack;
}

View File

@@ -76,6 +76,7 @@
_coinLabel.textAlignment = NSTextAlignmentCenter;
_coinLabel.font = kFontSemibold(14);
_coinLabel.textColor = UIColorFromRGB(0x4F3500);
_coinLabel.adjustsFontSizeToFitWidth = YES;
}
return _coinLabel;
}

View File

@@ -34,13 +34,15 @@
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(20));
make.leading.trailing.equalTo(self.view).inset(kGetScaleWidth(16));
make.height.mas_equalTo(kGetScaleWidth(51 * 4));
make.height.mas_equalTo(kGetScaleWidth(51 * 5));
}];
}
-(void)saveBtnAction{
NSString *language ;
if ([self.chooseModel.title isEqualToString:@"English"]){
language = @"en";
} else if ([self.chooseModel.title isEqualToString:@"Português (Brasil)"]){
language = @"pt-BR";
} else if ([self.chooseModel.title isEqualToString:@"繁體中文"]){
language = @"zh-Hant";
} else if ([self.chooseModel.title isEqualToString:@"Türkçe"]) {
@@ -99,6 +101,8 @@
if(!_datasource){
XPMineSettingItemModel *enItem = [XPMineSettingItemModel new];
enItem.title = @"English";
XPMineSettingItemModel *ptBRItem = [XPMineSettingItemModel new];
ptBRItem.title = @"Português (Brasil)";
XPMineSettingItemModel *zhItem = [XPMineSettingItemModel new];
zhItem.title = @"繁體中文";
XPMineSettingItemModel *arItem = [XPMineSettingItemModel new];
@@ -110,6 +114,9 @@
if ([language isEqualToString:@"en"]){
enItem.isChoose = YES;
self.chooseModel = enItem;
}else if ([language isEqualToString:@"pt-BR"]){
ptBRItem.isChoose = YES;
self.chooseModel = ptBRItem;
}else if ([language isEqualToString:@"ar"]){
arItem.isChoose = YES;
self.chooseModel = arItem;
@@ -120,7 +127,7 @@
zhItem.isChoose = YES;
self.chooseModel = zhItem;
}
_datasource = @[enItem, zhItem, arItem, trItem];
_datasource = @[enItem, ptBRItem, zhItem, arItem, trItem];
}
return _datasource;
}

View File

@@ -118,18 +118,13 @@
NSString * userId = [AccountInfoStorage instance].getUid;
NSString * roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
// NSLog(@"用户ID%@房间ID%@, 游戏ID%lld, code:%@", userId, roomId, self.currentmgId, self.code);
//
NSString *language = [NSBundle getLanguageText];
if ([language hasPrefix:@"zh"]) {
if ([language rangeOfString:@"Hans"].location != NSNotFound) {
language = @"zh-CN"; //
} else {
language = @"zh-TW"; //
}
}else{
language = @"en-US"; //
}
NSString *language = @"en-US";
if (isMSZH()) {
language = @"zh-TW";
} else if (isMSPT()) {
language = @"pt-BR";
}
self.fsmAPP2MG = [SudMGP loadMG:userId roomId:roomId code:self.code mgId:self.currentmgId language:language fsmMG:self rootView:self];
} else {
/// ,

View File

@@ -70,7 +70,7 @@
}
- (void)gameSetUp {
NSLog(@"小游戏的版本号是:%@", [SudMGP getVersion]);
NSLog(@"ISudFSMMG:小游戏的版本号是:%@", [SudMGP getVersion]);
BOOL isTestEnv = NO;
#ifdef DEBUG
isTestEnv = YES;
@@ -80,7 +80,7 @@
if(isEnterprise == NO){
[[SudMGP getCfg]setBackgroundMode:NO];
}
[SudMGP initSDK:KeyWithType(KeyType_SudGameAppID)
[SudMGP initSDK:KeyWithType(KeyType_SudGameAppID)
appKey:KeyWithType(KeyType_SudGameAppKey)
isTestEnv:isTestEnv
listener:^(int retCode, const NSString *retMsg) {
@@ -90,18 +90,13 @@
}
NSString * userId = [AccountInfoStorage instance].getUid;
NSString * roomId = self.gameModel.roomId;
NSLog(@"用户ID%@房间ID%@, 游戏ID%lld, code:%@", userId, roomId, self.currentmgId, self.code);
NSString *language = [NSBundle getLanguageText];
if ([language hasPrefix:@"zh"]) {
if ([language rangeOfString:@"Hans"].location != NSNotFound) {
language = @"zh-CN"; //
} else {
language = @"zh-TW"; //
}
}else{
language = @"en-US"; //
}
NSLog(@"ISudFSMMG:用户ID%@房间ID%@, 游戏ID%lld, code:%@", userId, roomId, self.currentmgId, self.code);
NSString *language = @"en-US";
if (isMSZH()) {
language = @"zh-TW";
} else if (isMSPT()) {
language = @"pt-BR";
}
self.fsmAPP2MG = [SudMGP loadMG:userId roomId:roomId code:self.code mgId:self.currentmgId language:language fsmMG:self rootView:self];
} else {
/// ,
@@ -251,15 +246,15 @@
//
if (error) {
NSLog(@"JSON 解析失败: %@", error.localizedDescription);
NSLog(@"ISudFSMMG:JSON 解析失败: %@", error.localizedDescription);
} else {
NSLog(@"解析后的字典: %@", dictionary);
NSLog(@"ISudFSMMG:解析后的字典: %@", dictionary);
//
NSMutableDictionary *ui = [[NSMutableDictionary alloc] initWithDictionary:dictionary[@"ui"]];
[ui setObject: @{@"hide" : @(YES)}
forKey:@"lobby_game_setting"];
[dictionary setObject:ui forKey:@"ui"];
NSLog(@"更新后的字典: %@", dictionary);
NSLog(@"ISudFSMMG:更新后的字典: %@", dictionary);
}
// dict[@"ui"] = @{
@@ -290,11 +285,11 @@
* @param dataJson json
*/
-(void)onGameStateChange:(id<ISudFSMStateHandle>) handle state:(NSString*) state dataJson:(NSString*) dataJson {
NSLog(@"onGameStateChange 回调: %@ \n%@", state, dataJson);
NSLog(@"ISudFSMMG:onGameStateChange 回调: %@ \n%@", state, dataJson);
if ([state isEqualToString:MG_COMMON_SELF_CLICK_READY_BTN]) {
// [self addAI];
} else if ([state isEqualToString:@"mg_common_game_add_ai_players"]) {
NSLog(@" ????????????????????????????????????????????? ");
NSLog(@"ISudFSMMG: ????????????????????????????????????????????? ");
} else if([state isEqualToString:MG_COMMON_GAME_SETTLE]){
NSDictionary *data = @{@"value0":self.gameModel.data.matchRoundId ?: @""};
NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[data mj_JSONString] , @"reportGameInfoExtras",@"value0" , @"reportGameInfoKey" ,nil];
@@ -308,7 +303,7 @@
[self.delegate getGameRsultsWithList:list];
}
}else if ([state isEqualToString:MG_COMMON_PUBLIC_MESSAGE]) {
NSLog(@"ISudFSMMG:onGameStateChange:游戏->APP:公屏消息");
NSLog(@"ISudFSMMG:ISudFSMMG:onGameStateChange:游戏->APP:公屏消息");
} else if ([state isEqualToString:MG_COMMON_KEY_WORD_TO_HIT]) {
}else if ([state isEqualToString:MG_COMMON_SELF_CLICK_JOIN_BTN]) {//
@@ -318,9 +313,9 @@
seatIndex = [[dic objectForKey:@"seatIndex"] intValue];
}
if (seatIndex == -1) {
NSLog(@"来自加入按钮%d",seatIndex);
NSLog(@"ISudFSMMG:来自加入按钮%d",seatIndex);
}else {
NSLog(@"来自麦位+入%d",seatIndex);
NSLog(@"ISudFSMMG:来自麦位+入%d",seatIndex);
}
[self notifySelfInState:YES seatIndex:-1];
} else if([state isEqualToString:MG_COMMON_SELF_CLICK_START_BTN]) {//

View File

@@ -290,9 +290,10 @@ NSString * const kJPClose = @"newTppClose";
if (![self isValidGameURL:url]) {
return nil;
}
switch (self.gameType) {
case MSGameTypeBaiShun:
url = [self addSupportLanguage:url];
return [NSURL URLWithString:url];
case MSGameTypeJoyPlay:
url = [url stringByAppendingFormat:@"?gameId=%@", @(self.gameModel.gameModel.gameId)];
@@ -313,25 +314,37 @@ NSString * const kJPClose = @"newTppClose";
break;
}
url = [self addSupportLanguage:url];
if (![NSString isEmpty:self.gameModel.gameModel.urlParam]) {
url = [url stringByAppendingString:[NSString stringWithFormat:@"&%@", self.gameModel.gameModel.urlParam]];
}
if (isMSEN()) {
url = [url stringByAppendingFormat:@"&lang=%@", @"en-US"];
} else if (isMSTR()) {
url = [url stringByAppendingFormat:@"&lang=%@", @"tr-TR"];
} else if (isMSZH()) {
url = [url stringByAppendingFormat:@"&lang=%@", @"zh-TW"];
} else if (isMSRTL()) {
url = [url stringByAppendingFormat:@"&lang=%@", @"ar-EG"];
}
url = [url stringByAppendingFormat:@"&token=%@", self.gameModel.gameModel.code];
url = [url stringByAppendingFormat:@"&uid=%@", [AccountInfoStorage instance].getUid];
return [NSURL URLWithString:url];
}
- (NSString *)addSupportLanguage:(NSString *)url {
NSString *mark = @"&";
NSString *lang = @"en-US";
if (![url containsString:@"?"]) {
mark = @"?";
}
if (isMSTR()) {
lang = @"tr-TR";
} else if (isMSZH()) {
lang = @"zh-TW";
} else if (isMSRTL()) {
lang = @"ar-EG";
} else if (isMSPT()) {
lang = @"pt-BR";
}
url = [url stringByAppendingFormat:@"%@lang=%@", mark, lang];
return url;
}
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
[self hideHUD];
self.retryCount = 0;

View File

@@ -52,7 +52,7 @@
return manager;
}
+(NSString *)getHostUrl{
#if 0
#if DEBUG
// return @"https://api.epartylive.com";
NSString *isProduction = [[NSUserDefaults standardUserDefaults]valueForKey:@"kIsProductionEnvironment"];

View File

@@ -71,6 +71,8 @@ static NSString * const kResourceType = @"lproj";
return @"ar"; //
} else if ([language hasPrefix:@"tr"]) {
return @"tr"; //
} else if ([language hasPrefix:@"pt-BR"] || [language hasPrefix:@"pt"]) {
return @"pt-BR"; // -西
} else {
return @"en"; //
}

View File

@@ -0,0 +1,13 @@
NSCameraUsageDescription = "O \"MoliStar\" precisa do seu consentimento antes que você possa visitar, tirar fotos e enviar suas imagens, e depois exibi-las em sua página pessoal para que outros possam visualizar";
NSLocalNetworkUsageDescription = "O aplicativo irá descobrir e conectar-se a dispositivos em sua rede";
NSLocationWhenInUseUsageDescription = "O seu consentimento é necessário antes que você possa usar os serviços de localização e recomendar amigos próximos";
NSMicrophoneUsageDescription = "O \"MoliStar\" precisa do seu consentimento antes de poder realizar chat de voz";
NSPhotoLibraryAddUsageDescription = "O \"MoliStar\" precisa do seu consentimento antes de poder armazenar fotos no álbum";
NSPhotoLibraryUsageDescription = "O \"MoliStar\" precisa do seu consentimento antes que você possa acessar o álbum e selecionar as imagens que deseja enviar, e depois exibi-las em sua página pessoal para que outros possam visualizar";
NSUserTrackingUsageDescription = "Por favor, permita-nos obter sua permissão IDFA para fornecer a você atividades e serviços personalizados. Suas informações não serão usadas para outros fins sem a sua permissão";

File diff suppressed because it is too large Load Diff