# HG changeset patch # User antonc27 # Date 1445553957 -7200 # Node ID bb3e57426a07539da236bcf86118a5be0f0122bf # Parent 4499aa8570fb82f6f1571ffd68d0d3c1dbca64d3 - Localization for missed strings in StatsPage (for both eng and rus) Note 1: Some strings here are contains format characters, translators must not change their! Note 2: Conjugation with numbers not really handled here. diff -r 4499aa8570fb -r bb3e57426a07 project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m --- a/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m Fri Oct 23 00:06:35 2015 +0200 +++ b/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m Fri Oct 23 00:45:57 2015 +0200 @@ -347,13 +347,13 @@ [statsArray insertObject:[NSString stringWithUTF8String:&buffer[2]] atIndex:1]; break; case 'D': // best shot - [statsArray addObject:[NSString stringWithFormat:@"The best shot award won by %s (with %@ points)", &buffer[index], arg]]; + [statsArray addObject:[NSString stringWithFormat:NSLocalizedString(@"The best shot award won by %s (with %@ points)", nil), &buffer[index], arg]]; break; case 'k': // best hedgehog - [statsArray addObject:[NSString stringWithFormat:@"The best killer is %s with %@ kill(s) in a turn", &buffer[index], arg]]; + [statsArray addObject:[NSString stringWithFormat:NSLocalizedString(@"The best killer is %s with %@ kill(s) in a turn", nil), &buffer[index], arg]]; break; case 'K': // number of hogs killed - [statsArray addObject:[NSString stringWithFormat:@"%@ hedgehog(s) were killed during this round", arg]]; + [statsArray addObject:[NSString stringWithFormat:NSLocalizedString(@"%@ hedgehog(s) were killed during this round", nil), arg]]; break; case 'H': // team health/graph break; @@ -364,13 +364,13 @@ [[statsArray objectAtIndex:0] addObject:tempStr]; break; case 's': // self damage - [statsArray addObject:[NSString stringWithFormat:@"%s thought it's good to shoot his own hedgehogs with %@ points", &buffer[index], arg]]; + [statsArray addObject:[NSString stringWithFormat:NSLocalizedString(@"%s thought it's good to shoot his own hedgehogs with %@ points", nil), &buffer[index], arg]]; break; case 'S': // friendly fire - [statsArray addObject:[NSString stringWithFormat:@"%s killed %@ of his own hedgehogs", &buffer[index], arg]]; + [statsArray addObject:[NSString stringWithFormat:NSLocalizedString(@"%s killed %@ of his own hedgehogs", nil), &buffer[index], arg]]; break; case 'B': // turn skipped - [statsArray addObject:[NSString stringWithFormat:@"%s was scared and skipped turn %@ times", &buffer[index], arg]]; + [statsArray addObject:[NSString stringWithFormat:NSLocalizedString(@"%s was scared and skipped turn %@ times", nil), &buffer[index], arg]]; break; default: DLog(@"Unhandled stat message, see statsPage.cpp"); diff -r 4499aa8570fb -r bb3e57426a07 project_files/HedgewarsMobile/Classes/StatsPageViewController.m --- a/project_files/HedgewarsMobile/Classes/StatsPageViewController.m Fri Oct 23 00:06:35 2015 +0200 +++ b/project_files/HedgewarsMobile/Classes/StatsPageViewController.m Fri Oct 23 00:45:57 2015 +0200 @@ -107,7 +107,7 @@ green:((color >> 8) & 0xFF)/255.0f blue:(color & 0xFF)/255.0f alpha:1.0f]; - cell.textLabel.text = [NSString stringWithFormat:@"%d. %@ (%@ kills)", row+1, [self teamNameFromInfo:info], [info objectAtIndex:1]]; + cell.textLabel.text = [NSString stringWithFormat:@"%d. %@ (%@ %@)", row+1, [self teamNameFromInfo:info], [info objectAtIndex:1], NSLocalizedString(@"kills", nil)]; imgName = [NSString stringWithFormat:@"StatsMedal%d",row+1]; } else if (section == 2) { // general info imgName = @"iconDamage"; diff -r 4499aa8570fb -r bb3e57426a07 project_files/HedgewarsMobile/Locale/English.lproj/Localizable.strings Binary file project_files/HedgewarsMobile/Locale/English.lproj/Localizable.strings has changed diff -r 4499aa8570fb -r bb3e57426a07 project_files/HedgewarsMobile/Locale/ru.lproj/Localizable.strings Binary file project_files/HedgewarsMobile/Locale/ru.lproj/Localizable.strings has changed