Don't duplicate lang postfix in "translate selected lines" - thx Jamakmake :)

This commit is contained in:
Nikolaj Olsson 2018-08-23 20:53:26 +02:00
parent 4e6f00f706
commit 7d5d938e67
2 changed files with 3 additions and 2 deletions

View File

@ -1196,7 +1196,8 @@ namespace Nikse.SubtitleEdit.Forms
{
return Path.GetFileNameWithoutExtension(videoFileName) + "." + _targetTwoLetterIsoLanguageName.ToLower() + subtitleFormat.Extension;
}
else if (!string.IsNullOrEmpty(oldFileName))
if (!string.IsNullOrEmpty(oldFileName))
{
var s = Path.GetFileNameWithoutExtension(oldFileName);
if (oldSubtitle != null)

View File

@ -6096,9 +6096,9 @@ namespace Nikse.SubtitleEdit.Forms
if (!onlySelectedLines)
{
ResetHistory();
_fileName = googleTranslate.GetFileNameWithTargetLanguage(oldFileName, _videoFileName, _subtitleAlternate, GetCurrentSubtitleFormat());
}
RestoreSubtitleListviewIndices();
_fileName = googleTranslate.GetFileNameWithTargetLanguage(oldFileName, _videoFileName, _subtitleAlternate, GetCurrentSubtitleFormat());
_converted = true;
SetTitle();
SetEncoding(Encoding.UTF8);