This commit is contained in:
Nikolaj Olsson 2024-04-01 15:32:55 +02:00
parent e722aded31
commit 31ed11f60a
4 changed files with 20 additions and 6 deletions

View File

@ -2721,7 +2721,7 @@ namespace Nikse.SubtitleEdit.Forms
this.toolStripMenuItemSelectedLines,
this.toolStripMenuItemGoogleMicrosoftTranslateSelLine});
this.contextMenuStripListView.Name = "contextMenuStripListView";
this.contextMenuStripListView.Size = new System.Drawing.Size(285, 848);
this.contextMenuStripListView.Size = new System.Drawing.Size(285, 826);
this.contextMenuStripListView.Closed += new System.Windows.Forms.ToolStripDropDownClosedEventHandler(this.MenuClosed);
this.contextMenuStripListView.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListViewOpening);
this.contextMenuStripListView.Opened += new System.EventHandler(this.MenuOpened);
@ -3233,7 +3233,7 @@ namespace Nikse.SubtitleEdit.Forms
// genericTranslateToolStripMenuItem
//
this.genericTranslateToolStripMenuItem.Name = "genericTranslateToolStripMenuItem";
this.genericTranslateToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.genericTranslateToolStripMenuItem.Size = new System.Drawing.Size(128, 22);
this.genericTranslateToolStripMenuItem.Text = "translate...";
this.genericTranslateToolStripMenuItem.Click += new System.EventHandler(this.TranslateSelectedLinesToolStripMenuItemClick);
//

View File

@ -36405,7 +36405,7 @@ namespace Nikse.SubtitleEdit.Forms
private void MakeAutoTranslate(bool onlySelectedLines)
{
if (!IsSubtitleLoaded)
if (_subtitle != null && _subtitle.Paragraphs.Count == 0)
{
DisplaySubtitleNotLoadedMessage();
return;
@ -36464,6 +36464,20 @@ namespace Nikse.SubtitleEdit.Forms
MakeHistoryForUndo(_language.BeforeGoogleTranslation);
if (onlySelectedLines)
{
if (!SubtitleListview1.IsOriginalTextColumnVisible)
{
SubtitleListview1.ShowOriginalTextColumn(_languageGeneral.OriginalText);
SubtitleListview1.AutoSizeAllColumns(this);
_subtitleOriginal = new Subtitle(_subtitle, false);
_subtitleOriginalFileName = _fileName;
_fileName = null;
foreach (var p in _subtitle.Paragraphs)
{
p.Text = string.Empty;
}
}
// we only update selected lines
foreach (int index in SubtitleListview1.SelectedIndices)
{

View File

@ -730,9 +730,9 @@
<data name="toolStripButtonLockCenter.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACJSURBVEhLYxjioPT6M4aKawVQHvEApAekFydIvP6bofx6
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACJSURBVEhLYxjioPT6M4aKawVQHvEApAekFydIuP6bofx6
A5RHPADpAenFCbAZXHk1ACi2nqHi6n44BokhA5INrrpiwFBx/T9Q7DxYHILPg8VAcjBAssEgNsgQdACx
DFXdqMFgMGowlDdqMCUG0yxLgwCowEEugEAFEsWFELGAoME0K+gHP2BgAAAFFhe2fSAzQAAAAABJRU5E
DFXdqMFgMGowlDdqMCUG0yxLgwCowEEugEAFEsWFELGAoME0K+gHP2BgAACKlxeWMO5vswAAAABJRU5E
rkJggg==
</value>
</data>

View File

@ -80,7 +80,7 @@ namespace Nikse.SubtitleEdit.Forms.Translate
Text = title;
}
_subtitle = new Subtitle(subtitle);
_subtitle = new Subtitle(subtitle, false);
_encoding = encoding;
InitializeAutoTranslatorEngines();