Commit a91c79cf authored by Felix Paul Kühne's avatar Felix Paul Kühne

playback: correctly localize the 'Disable' fake track selection item (closes #14594)

parent 4c8e7c60
B"CHOOSE_AUDIO_TRACK"="Choose Audio Track";
......
......@@ -1169,20 +1169,28 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
if (_switchingTracksNotChapters == YES) {
NSArray *indexArray;
NSString *trackName;
if ([mediaPlayer numberOfAudioTracks] > 2 && section == 0) {
indexArray = mediaPlayer.audioTrackIndexes;
if ([indexArray indexOfObject:[NSNumber numberWithInt:mediaPlayer.currentAudioTrackIndex]] == row)
cellShowsCurrentTrack = YES;
cell.textLabel.text = [NSString stringWithFormat:@"%@", mediaPlayer.audioTrackNames[row]];
trackName = mediaPlayer.audioTrackNames[row];
} else {
indexArray = mediaPlayer.videoSubTitlesIndexes;
if ([indexArray indexOfObject:[NSNumber numberWithInt:mediaPlayer.currentVideoSubTitleIndex]] == row)
cellShowsCurrentTrack = YES;
cell.textLabel.text = [NSString stringWithFormat:@"%@", mediaPlayer.videoSubTitlesNames[row]];
trackName = mediaPlayer.videoSubTitlesNames[row];
}
if (trackName != nil) {
if ([trackName isEqualToString:@"Disable"])
cell.textLabel.text = NSLocalizedString(@"DISABLE_LABEL", nil);
else
cell.textLabel.text = trackName;
}
} else {
if ([mediaPlayer numberOfTitles] > 1 && section == 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment