mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +01:00
Fix naming from last commit
This commit is contained in:
parent
e739b551ea
commit
5cbc89fc2a
@ -260,11 +260,11 @@ namespace Nikse.SubtitleEdit.Core
|
||||
/// <summary>
|
||||
/// Get three letter language code, from two letter language code.
|
||||
/// </summary>
|
||||
/// <param name="twoLettercode">Two letter language code (casing not important)</param>
|
||||
/// <param name="twoLetterCode">Two letter language code (casing not important)</param>
|
||||
/// <returns>Three letter language code in lowercase, string.Empty if not found</returns>
|
||||
public static string GetThreeLetterCodeFromTwoLettercode(string twoLettercode)
|
||||
public static string GetThreeLetterCodeFromTwoLetterCode(string twoLetterCode)
|
||||
{
|
||||
var threeLetters = ThreeToTweLetterLookup.FirstOrDefault(p => p.Value == twoLettercode.ToUpperInvariant());
|
||||
var threeLetters = ThreeToTweLetterLookup.FirstOrDefault(p => p.Value == twoLetterCode.ToUpperInvariant());
|
||||
if (threeLetters.Key?.Length == 3)
|
||||
{
|
||||
return threeLetters.Key.ToLowerInvariant();
|
||||
|
@ -6999,7 +6999,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
threeLetterIsoLanguageName = ci.ThreeLetterISOLanguageName;
|
||||
if (string.IsNullOrEmpty(threeLetterIsoLanguageName))
|
||||
{
|
||||
var threeLetters = IsoCountryCodes.GetThreeLetterCodeFromTwoLettercode(ci.TwoLetterISOLanguageName);
|
||||
var threeLetters = IsoCountryCodes.GetThreeLetterCodeFromTwoLetterCode(ci.TwoLetterISOLanguageName);
|
||||
if (!string.IsNullOrEmpty(threeLetters))
|
||||
{
|
||||
threeLetterIsoLanguageName = threeLetters;
|
||||
@ -7552,7 +7552,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
threeLetterIsoLanguageName = ci.ThreeLetterISOLanguageName;
|
||||
if (string.IsNullOrEmpty(threeLetterIsoLanguageName))
|
||||
{
|
||||
var threeLetters = IsoCountryCodes.GetThreeLetterCodeFromTwoLettercode(ci.TwoLetterISOLanguageName);
|
||||
var threeLetters = IsoCountryCodes.GetThreeLetterCodeFromTwoLetterCode(ci.TwoLetterISOLanguageName);
|
||||
if (!string.IsNullOrEmpty(threeLetters))
|
||||
{
|
||||
threeLetterIsoLanguageName = threeLetters;
|
||||
@ -7571,7 +7571,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
threeLetterIsoLanguageName = x.ThreeLetterISOLanguageName;
|
||||
if (string.IsNullOrEmpty(threeLetterIsoLanguageName))
|
||||
{
|
||||
var threeLetters = IsoCountryCodes.GetThreeLetterCodeFromTwoLettercode(x.TwoLetterISOLanguageName);
|
||||
var threeLetters = IsoCountryCodes.GetThreeLetterCodeFromTwoLetterCode(x.TwoLetterISOLanguageName);
|
||||
if (!string.IsNullOrEmpty(threeLetters))
|
||||
{
|
||||
threeLetterIsoLanguageName = threeLetters;
|
||||
@ -7586,7 +7586,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
if (string.IsNullOrEmpty(threeLetterIsoLanguageName) && !string.IsNullOrEmpty(language) && language.Length >= 2)
|
||||
{
|
||||
var twoLetterCode = language.Substring(0, 2);
|
||||
var threeLetters = IsoCountryCodes.GetThreeLetterCodeFromTwoLettercode(twoLetterCode);
|
||||
var threeLetters = IsoCountryCodes.GetThreeLetterCodeFromTwoLetterCode(twoLetterCode);
|
||||
if (!string.IsNullOrEmpty(threeLetters))
|
||||
{
|
||||
threeLetterIsoLanguageName = threeLetters;
|
||||
|
Loading…
Reference in New Issue
Block a user