mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-26 23:12:38 +02:00
Minor fixes for Netflix msgbox
This commit is contained in:
parent
4d13dd8605
commit
4d1e6d8f5d
@ -2001,14 +2001,11 @@ can edit in same subtitle file (collaboration)</Information>
|
||||
<UndoX>Undo: {0}</UndoX>
|
||||
</SpellCheck>
|
||||
<NetflixQualityCheck>
|
||||
<GlyphCheckSuccessfull>Character validation has been successful.</GlyphCheckSuccessfull>
|
||||
<GlyphCheckFailed>Character validation has failed.</GlyphCheckFailed>
|
||||
<GlyphCheckReport>Invalid character {0} found at column {1}</GlyphCheckReport>
|
||||
<WhiteSpaceCheckSuccessfull>White space validation has been successful.</WhiteSpaceCheckSuccessfull>
|
||||
<WhiteSpaceCheckFailed>White space validation has failed.</WhiteSpaceCheckFailed>
|
||||
<WhiteSpaceCheckReport>Invalid white space found at column {0}.</WhiteSpaceCheckReport>
|
||||
<ReportPrompt>Please see full report here: {0}.</ReportPrompt>
|
||||
<SavingError>Report cannot be saved.</SavingError>
|
||||
<FoundXIssues>Netflix quality check found {0} issues.</FoundXIssues>
|
||||
<CheckOk>Netflix quality check OK :)</CheckOk>
|
||||
</NetflixQualityCheck>
|
||||
<Split>
|
||||
<Title>Split</Title>
|
||||
|
@ -2296,16 +2296,11 @@ can edit in same subtitle file (collaboration)",
|
||||
|
||||
NetflixQualityCheck = new LanguageStructure.NetflixQualityCheck
|
||||
{
|
||||
GlyphCheckSuccessfull = "Character validation has been successful.",
|
||||
GlyphCheckFailed = "Character validation has failed.",
|
||||
GlyphCheckReport = "Invalid character {0} found at column {1}",
|
||||
|
||||
WhiteSpaceCheckSuccessfull = "White space validation has been successful.",
|
||||
WhiteSpaceCheckFailed = "White space validation has failed.",
|
||||
WhiteSpaceCheckReport = "Invalid white space found at column {0}.",
|
||||
|
||||
ReportPrompt = "Please see full report here: {0}.",
|
||||
SavingError = "Report cannot be saved."
|
||||
FoundXIssues = "Netflix quality check found {0} issues.",
|
||||
CheckOk = "Netflix quality check OK :)",
|
||||
};
|
||||
|
||||
Split = new LanguageStructure.Split
|
||||
|
@ -5422,29 +5422,20 @@ namespace Nikse.SubtitleEdit.Core
|
||||
case "SpellCheck/UndoX":
|
||||
language.SpellCheck.UndoX = reader.Value;
|
||||
break;
|
||||
case "NetflixQualityCheck/GlyphCheckSuccessfull":
|
||||
language.NetflixQualityCheck.GlyphCheckSuccessfull = reader.Value;
|
||||
break;
|
||||
case "NetflixQualityCheck/GlyphCheckFailed":
|
||||
language.NetflixQualityCheck.GlyphCheckFailed = reader.Value;
|
||||
break;
|
||||
case "NetflixQualityCheck/GlyphCheckReport":
|
||||
language.NetflixQualityCheck.GlyphCheckReport = reader.Value;
|
||||
break;
|
||||
case "NetflixQualityCheck/WhiteSpaceCheckSuccessfull":
|
||||
language.NetflixQualityCheck.WhiteSpaceCheckSuccessfull = reader.Value;
|
||||
break;
|
||||
case "NetflixQualityCheck/WhiteSpaceCheckFailed":
|
||||
language.NetflixQualityCheck.WhiteSpaceCheckFailed = reader.Value;
|
||||
break;
|
||||
case "NetflixQualityCheck/WhiteSpaceCheckReport":
|
||||
language.NetflixQualityCheck.WhiteSpaceCheckReport = reader.Value;
|
||||
break;
|
||||
case "NetflixQualityCheck/ReportPrompt":
|
||||
language.NetflixQualityCheck.ReportPrompt = reader.Value;
|
||||
break;
|
||||
case "NetflixQualityCheck/SavingError":
|
||||
language.NetflixQualityCheck.SavingError = reader.Value;
|
||||
case "NetflixQualityCheck/FoundXIssues":
|
||||
language.NetflixQualityCheck.FoundXIssues = reader.Value;
|
||||
break;
|
||||
case "NetflixQualityCheck/CheckOk":
|
||||
language.NetflixQualityCheck.CheckOk = reader.Value;
|
||||
break;
|
||||
case "Split/Title":
|
||||
language.Split.Title = reader.Value;
|
||||
|
@ -2177,16 +2177,13 @@
|
||||
|
||||
public class NetflixQualityCheck
|
||||
{
|
||||
public string GlyphCheckSuccessfull { get; set; }
|
||||
public string GlyphCheckFailed { get; set; }
|
||||
public string GlyphCheckReport { get; set; }
|
||||
|
||||
public string WhiteSpaceCheckSuccessfull { get; set; }
|
||||
public string WhiteSpaceCheckFailed { get; set; }
|
||||
public string WhiteSpaceCheckReport { get; set; }
|
||||
|
||||
public string ReportPrompt { get; set; }
|
||||
public string SavingError { get; set; }
|
||||
public string FoundXIssues { get; set; }
|
||||
public string CheckOk { get; set; }
|
||||
}
|
||||
|
||||
public class Split
|
||||
|
@ -128,13 +128,15 @@ namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
|
||||
|
||||
public string ToCsvRow()
|
||||
{
|
||||
string safeContext = Context;
|
||||
safeContext = safeContext.Replace("\"", "\"\"");
|
||||
safeContext = safeContext.Replace("\r", "\\r");
|
||||
safeContext = safeContext.Replace("\n", "\\n");
|
||||
safeContext = $"\"{safeContext}\"";
|
||||
return $"{Timecode},{CsvTextEncode(Context)},{CsvTextEncode(Comment)}";
|
||||
}
|
||||
|
||||
return $"{Timecode},{safeContext},{Comment}";
|
||||
private static string CsvTextEncode(string s)
|
||||
{
|
||||
s = s.Replace("\"", "\"\"");
|
||||
s = s.Replace("\r", "\\r");
|
||||
s = s.Replace("\n", "\\n");
|
||||
return $"\"{s}\"";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20858,7 +20858,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
string reportPath = Path.GetTempPath() + fileName + "_NetflixQualityCheck.csv";
|
||||
netflixController.SaveCsv(reportPath);
|
||||
string msgFormat = string.Format("{0} {1}", "Netflix quality found " + netflixController.Records.Count + " issues." + Environment.NewLine,
|
||||
string msgFormat = string.Format("{0}\r\n\r\n{1}", string.Format(Configuration.Settings.Language.NetflixQualityCheck.FoundXIssues, netflixController.Records.Count),
|
||||
Configuration.Settings.Language.NetflixQualityCheck.ReportPrompt);
|
||||
messages.Add(string.Format(msgFormat, reportPath));
|
||||
reportFiles.Add(reportPath);
|
||||
@ -20869,7 +20869,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (showSuccessMessage)
|
||||
{
|
||||
messages.Add("Netflix quality control is happy :)");
|
||||
messages.Add(Configuration.Settings.Language.NetflixQualityCheck.CheckOk);
|
||||
using (var dialog = new NetflixQCResult(string.Join(Environment.NewLine, messages), reportFiles))
|
||||
{
|
||||
dialog.ShowDialog(this);
|
||||
|
Loading…
Reference in New Issue
Block a user