mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 04:33:04 +01:00
More on #8111
This commit is contained in:
parent
e722aded31
commit
31ed11f60a
4
src/ui/Forms/Main.Designer.cs
generated
4
src/ui/Forms/Main.Designer.cs
generated
@ -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);
|
||||
//
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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>
|
||||
|
@ -80,7 +80,7 @@ namespace Nikse.SubtitleEdit.Forms.Translate
|
||||
Text = title;
|
||||
}
|
||||
|
||||
_subtitle = new Subtitle(subtitle);
|
||||
_subtitle = new Subtitle(subtitle, false);
|
||||
_encoding = encoding;
|
||||
|
||||
InitializeAutoTranslatorEngines();
|
||||
|
Loading…
Reference in New Issue
Block a user