mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Show friendly msg when user try to drop JPG file
This commit is contained in:
parent
14dd511776
commit
7c99fe6445
@ -1276,6 +1276,7 @@ Continue?</SubtitleAppendPrompt>
|
||||
<ErrorLoadRar>This file seems to be a compressed .rar file. Subtitle Edit cannot open compressed files.</ErrorLoadRar>
|
||||
<ErrorLoadZip>This file seems to be a compressed .zip file. Subtitle Edit cannot open compressed files.</ErrorLoadZip>
|
||||
<ErrorLoadPng>This file seems to be a PNG image file. Subtitle Edit cannot open PNG files.</ErrorLoadPng>
|
||||
<ErrorLoadJpg>This file seems to be a JPG image file. Subtitle Edit cannot open JPG files.</ErrorLoadJpg>
|
||||
<ErrorLoadSrr>This file seems to be a ReScene .srr file - not a subtitle file.</ErrorLoadSrr>
|
||||
<ErrorLoadTorrent>This file seems to be a BitTorrent file - not a subtitle file.</ErrorLoadTorrent>
|
||||
<ErrorLoadBinaryZeroes>Sorry, this file contains only binary zeroes!
|
||||
|
@ -2343,6 +2343,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
// check for .Jpg file
|
||||
if (format == null && fi.Length > 100 && FileUtil.IsJpg(fileName))
|
||||
{
|
||||
MessageBox.Show(_language.ErrorLoadJpg);
|
||||
return;
|
||||
}
|
||||
|
||||
// check for .srr file
|
||||
if (format == null && fi.Length > 100 && ext == ".srr" && FileUtil.IsSrr(fileName))
|
||||
{
|
||||
|
@ -1179,6 +1179,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
ErrorLoadRar = "This file seems to be a compressed .rar file. Subtitle Edit cannot open compressed files.",
|
||||
ErrorLoadZip = "This file seems to be a compressed .zip file. Subtitle Edit cannot open compressed files.",
|
||||
ErrorLoadPng = "This file seems to be a PNG image file. Subtitle Edit cannot open PNG files.",
|
||||
ErrorLoadJpg = "This file seems to be a JPG image file. Subtitle Edit cannot open JPG files.",
|
||||
ErrorLoadSrr = "This file seems to be a ReScene .srr file - not a subtitle file.",
|
||||
ErrorLoadTorrent = "This file seems to be a BitTorrent file - not a subtitle file.",
|
||||
ErrorLoadBinaryZeroes = "Sorry, this file contains only binary zeroes!\r\n\r\nIf you have edited this file with Subtitle Edit you might be alble to find a backup via the menu item File -> Restore auto-backup...",
|
||||
|
@ -2616,6 +2616,9 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
case "Main/ErrorLoadPng":
|
||||
language.Main.ErrorLoadPng = reader.Value;
|
||||
break;
|
||||
case "Main/ErrorLoadJpg":
|
||||
language.Main.ErrorLoadJpg = reader.Value;
|
||||
break;
|
||||
case "Main/ErrorLoadSrr":
|
||||
language.Main.ErrorLoadSrr = reader.Value;
|
||||
break;
|
||||
|
@ -1055,6 +1055,7 @@
|
||||
public string ErrorLoadRar { get; set; }
|
||||
public string ErrorLoadZip { get; set; }
|
||||
public string ErrorLoadPng { get; set; }
|
||||
public string ErrorLoadJpg { get; set; }
|
||||
public string ErrorLoadSrr { get; set; }
|
||||
public string ErrorLoadTorrent { get; set; }
|
||||
public string ErrorLoadBinaryZeroes { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user