diff options
author | ritsuka <[email protected]> | 2014-07-31 11:59:14 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-07-31 11:59:14 +0000 |
commit | 0bab714e71a9cce63197a4f61596190db00debd0 (patch) | |
tree | 7e95b2daca5473c8414e51c65a3ef417d66d38a4 /macosx/HBSubtitlesController.m | |
parent | 0e0c317a9327eb166089a9d68c435e698cfe2cd4 (diff) |
MacGui: use the native language if available in the subtitles table and languages selection table.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6249 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBSubtitlesController.m')
-rw-r--r-- | macosx/HBSubtitlesController.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/macosx/HBSubtitlesController.m b/macosx/HBSubtitlesController.m index a804de748..f5c3c4792 100644 --- a/macosx/HBSubtitlesController.m +++ b/macosx/HBSubtitlesController.m @@ -124,11 +124,15 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex"; [forcedSourceNamesArray addObject:subSourceName]; } + // Use the native language name if available + iso639_lang_t *language = lang_for_code2(subtitle->iso639_2); + NSString *nativeLanguage = strlen(language->native_name) ? @(language->native_name) : @(language->eng_name); + /* create a dictionary of source subtitle information to store in our array */ - [self.subtitleSourceArray addObject:@{keySubTrackName: [NSString stringWithFormat:@"%d: %@ (%@) (%@)", i, @(subtitle->lang), bitmapOrText, subSourceName], + [self.subtitleSourceArray addObject:@{keySubTrackName: [NSString stringWithFormat:@"%d: %@ (%@) (%@)", i, nativeLanguage, bitmapOrText, subSourceName], keySubTrackIndex: @(i), keySubTrackType: @(subtitle->source), - keySubTrackLanguage: @(subtitle->lang), + keySubTrackLanguage: nativeLanguage, keySubTrackLanguageIsoCode: @(subtitle->iso639_2)}]; } |