Add err msg about empty sub when saving

This commit is contained in:
Nikolaj Olsson 2021-02-18 19:42:39 +01:00
parent 8aa0d804cd
commit 8e22070744
5 changed files with 9 additions and 0 deletions

View File

@ -1333,6 +1333,7 @@ To use an API key go to "Options -> Settings -> Tools" to enter your Googl
<SaveChangesToOriginalX>Save changes to original {0}?</SaveChangesToOriginalX>
<SaveSubtitleAs>Save subtitle as...</SaveSubtitleAs>
<SaveOriginalSubtitleAs>Save original subtitle as...</SaveOriginalSubtitleAs>
<CannotSaveEmptySubtitle>Cannot save empty subtitle</CannotSaveEmptySubtitle>
<NoSubtitleLoaded>No subtitle loaded</NoSubtitleLoaded>
<VisualSyncSelectedLines>Visual sync - selected lines</VisualSyncSelectedLines>
<VisualSyncTitle>Visual sync</VisualSyncTitle>

View File

@ -3970,6 +3970,7 @@ namespace Nikse.SubtitleEdit.Forms
{
if (!IsSubtitleLoaded)
{
ShowStatus(_language.CannotSaveEmptySubtitle);
return;
}
@ -3982,6 +3983,7 @@ namespace Nikse.SubtitleEdit.Forms
{
if (!IsSubtitleLoaded)
{
ShowStatus(_language.CannotSaveEmptySubtitle);
return;
}
@ -5359,6 +5361,7 @@ namespace Nikse.SubtitleEdit.Forms
{
if (!IsSubtitleLoaded)
{
ShowStatus(_language.CannotSaveEmptySubtitle);
return;
}

View File

@ -1223,6 +1223,7 @@ namespace Nikse.SubtitleEdit.Logic
SaveChangesToOriginalX = "Save changes to original {0}?",
SaveSubtitleAs = "Save subtitle as...",
SaveOriginalSubtitleAs = "Save original subtitle as...",
CannotSaveEmptySubtitle = "Cannot save empty subtitle",
NoSubtitleLoaded = "No subtitle loaded",
VisualSyncSelectedLines = "Visual sync - selected lines",
VisualSyncTitle = "Visual sync",

View File

@ -2680,6 +2680,9 @@ namespace Nikse.SubtitleEdit.Logic
case "Main/SaveOriginalSubtitleAs":
language.Main.SaveOriginalSubtitleAs = reader.Value;
break;
case "Main/CannotSaveEmptySubtitle":
language.Main.CannotSaveEmptySubtitle = reader.Value;
break;
case "Main/NoSubtitleLoaded":
language.Main.NoSubtitleLoaded = reader.Value;
break;

View File

@ -1095,6 +1095,7 @@
public string SaveChangesToOriginalX { get; set; }
public string SaveSubtitleAs { get; set; }
public string SaveOriginalSubtitleAs { get; set; }
public string CannotSaveEmptySubtitle { get; set; }
public string NoSubtitleLoaded { get; set; }
public string VisualSyncSelectedLines { get; set; }
public string VisualSyncTitle { get; set; }