diff --git a/LanguageMaster.xml b/LanguageMaster.xml
index 16a93528d..a860c4a81 100644
--- a/LanguageMaster.xml
+++ b/LanguageMaster.xml
@@ -1459,7 +1459,7 @@ Continue?
Before spell check
Spell check: Changed '{0}' to '{1}'
Before adding <{0}> tag
- <{0}> tags added
+ {0} tag added
line {0} of {1}
{0} lines saved as {1}
{0} lines deleted
@@ -2362,6 +2362,7 @@ can edit in same subtitle file (collaboration)
Break at first space from cursor position and go to next
Unbreak text
Unbreak without space (CJK)
+ Show ASSA intellisense
Save all
Misc.
Chars/sec (CPS) includes spaces
diff --git a/src/Test/Logic/SubtitleFormats/SubtitleFormatsTest.cs b/src/Test/Logic/SubtitleFormats/SubtitleFormatsTest.cs
index 37eac9355..faceed72f 100644
--- a/src/Test/Logic/SubtitleFormats/SubtitleFormatsTest.cs
+++ b/src/Test/Logic/SubtitleFormats/SubtitleFormatsTest.cs
@@ -468,6 +468,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\i1}Italic{\i0}"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Italic";
Assert.AreEqual(expected, actual);
@@ -479,6 +480,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\b1}Bold{\b0}"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Bold";
Assert.AreEqual(expected, actual);
@@ -490,6 +492,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\u1}Underline{\u0}"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Underline";
Assert.AreEqual(expected, actual);
@@ -501,6 +504,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\fs28}Font"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Font";
Assert.AreEqual(expected, actual);
@@ -512,6 +516,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\fs1}T{\fs2}E{\fs3}S{\fs4}T"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "TEST";
Assert.AreEqual(expected, actual);
@@ -533,6 +538,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\fnArial}Font"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Font";
Assert.AreEqual(expected, actual);
@@ -544,6 +550,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\fnArial Bold}Font"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Font";
Assert.AreEqual(expected, actual);
@@ -564,6 +571,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\fnArial}Font1{\fnTahoma}Font2"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Font1Font2";
Assert.AreEqual(expected, actual);
@@ -575,6 +583,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\c&HFF&}Font"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Font";
Assert.AreEqual(expected, actual);
@@ -586,6 +595,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\c&HFF00&}Font"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Font";
Assert.AreEqual(expected, actual);
@@ -597,6 +607,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\c&HFF0000&}Font"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Font";
Assert.AreEqual(expected, actual);
@@ -608,6 +619,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\c&HFFFFFF&}Font"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Font";
Assert.AreEqual(expected, actual);
@@ -619,6 +631,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"start {\c&HFFFFFF&}Font end"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "start Font end";
Assert.AreEqual(expected, actual);
@@ -630,6 +643,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"start {\1c&HFFFF00&\i1}CYAN{\i0}{\1c} end"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "start CYAN end";
Assert.AreEqual(expected, actual);
@@ -641,6 +655,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\i1\c&H00ffff&}Italic and color{\c}{\i0}"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
var actual = subtitle.Paragraphs[0].Text;
const string expected = "Italic and color";
Assert.AreEqual(expected, actual);
@@ -652,6 +667,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"start {\1c&HFFFF00&\i1}CYAN{\i0} end"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "start CYAN end";
Assert.AreEqual(expected, actual);
@@ -663,6 +679,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"start {\fnFont Name}text1 {\fs10}text2{\fs}{\fn} {\1c&H112233}text3{\1c} text4 {\c&332211}text5{\c} end"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "start text1 text2 text3 text4 text5 end";
Assert.AreEqual(expected, actual);
@@ -674,6 +691,7 @@ Dialogue: 0,0:00:16.84,0:00:18.16,rechts,,0000,0000,0000,," + lineOneText;
var target = new AdvancedSubStationAlpha();
var subtitle = new Subtitle();
target.LoadSubtitle(subtitle, GetAssLines(@"{\fnViner Hand ITC\fs28}Testing"), null);
+ target.RemoveNativeFormatting(subtitle, new SubRip());
string actual = subtitle.Paragraphs[0].Text;
const string expected = "Testing";
Assert.AreEqual(expected, actual);
@@ -1143,18 +1161,21 @@ Dialogue: Marked=0,0:00:01.00,0:00:03.00,Default,NTP,0000,0000,0000,!Effect," +
subtitle.Paragraphs.Add(new Paragraph("Line 4", 12000, 15000));
int expected = subtitle.Paragraphs.Count;
- foreach (SubtitleFormat format in SubtitleFormat.AllSubtitleFormats)
+ foreach (var format in SubtitleFormat.AllSubtitleFormats)
{
if (format.GetType() != typeof(JsonType6) && format.IsTextBased)
{
format.BatchMode = true;
- string text = format.ToText(subtitle, "test");
+ var text = format.ToText(subtitle, "test");
var list = new List();
- foreach (string line in text.Replace("\r\n", "\n").Split('\n'))
+ foreach (var line in text.Replace("\r\n", "\n").Split('\n'))
+ {
list.Add(line);
+ }
+
var s2 = new Subtitle();
format.LoadSubtitle(s2, list, null);
- int actual = s2.Paragraphs.Count;
+ var actual = s2.Paragraphs.Count;
Assert.AreEqual(expected, actual, format.FriendlyName);
}
}
diff --git a/src/libse/SubtitleFormats/OgmChapters.cs b/src/libse/SubtitleFormats/OgmChapters.cs
index e319dc1ac..da94f59e8 100644
--- a/src/libse/SubtitleFormats/OgmChapters.cs
+++ b/src/libse/SubtitleFormats/OgmChapters.cs
@@ -29,7 +29,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
private static string EncodeTimeCode(TimeCode time)
{
- return time.ToDisplayString().Replace(",", ".");
+ return time.ToString().Replace(",", ".");
}
public override void LoadSubtitle(Subtitle subtitle, List lines, string fileName)
@@ -37,7 +37,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
Paragraph p = null;
subtitle.Paragraphs.Clear();
_errorCount = 0;
- foreach (string line in lines)
+ foreach (var line in lines)
{
var s = line.Trim();
if (s.StartsWith("CHAPTER", StringComparison.Ordinal))
diff --git a/src/libse/SubtitleFormats/UnknownSubtitle101.cs b/src/libse/SubtitleFormats/UnknownSubtitle101.cs
index 143c38b38..2ab819699 100644
--- a/src/libse/SubtitleFormats/UnknownSubtitle101.cs
+++ b/src/libse/SubtitleFormats/UnknownSubtitle101.cs
@@ -40,8 +40,8 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
}
}
- var start = p.StartTime.ToDisplayString().Replace(",", ".");
- var end = p.EndTime.ToDisplayString().Replace(",", ".");
+ var start = p.StartTime.ToString().Replace(",", ".");
+ var end = p.EndTime.ToString().Replace(",", ".");
var text = HtmlUtil.RemoveHtmlTags(p.Text, true);
sb.AppendLine(string.Format(writeFormat, start, end, Environment.NewLine, text, count));
}
diff --git a/src/ui/Logic/LanguageDeserializer.cs b/src/ui/Logic/LanguageDeserializer.cs
index c0dc16f33..0816c7e09 100644
--- a/src/ui/Logic/LanguageDeserializer.cs
+++ b/src/ui/Logic/LanguageDeserializer.cs
@@ -6496,6 +6496,9 @@ namespace Nikse.SubtitleEdit.Logic
case "Settings/MainTextBoxUnbreakNoSpace":
language.Settings.MainTextBoxUnbreakNoSpace = reader.Value;
break;
+ case "Settings/MainTextBoxAssaIntellisense":
+ language.Settings.MainTextBoxAssaIntellisense = reader.Value;
+ break;
case "Settings/MainFileSaveAll":
language.Settings.MainFileSaveAll = reader.Value;
break;