mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
commit
613b8e0038
1
src/Forms/SubStationAlphaProperties.Designer.cs
generated
1
src/Forms/SubStationAlphaProperties.Designer.cs
generated
@ -398,6 +398,7 @@
|
||||
this.Controls.Add(this.groupBoxScript);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.KeyPreview = true;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "SubStationAlphaProperties";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
|
@ -112,12 +112,12 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@ -7,7 +7,6 @@ namespace Nikse.SubtitleEdit.Logic.Forms
|
||||
{
|
||||
public static class FixCommonErrorsHelper
|
||||
{
|
||||
|
||||
public static string FixEllipsesStartHelper(string text)
|
||||
{
|
||||
if (text == null || text.Trim().Length < 4)
|
||||
@ -85,8 +84,21 @@ namespace Nikse.SubtitleEdit.Logic.Forms
|
||||
text = "<i>- " + text;
|
||||
}
|
||||
text = text.Replace(" ", " ");
|
||||
|
||||
// WOMAN 2: <i>...24 hours a day at BabyC.</i>
|
||||
var index = text.IndexOf(':');
|
||||
if (index > 0 && text.Length > index + 1 && !char.IsDigit(text[index + 1]) && text.Contains(".."))
|
||||
{
|
||||
var post = text.Substring(0, index + 1);
|
||||
if (post.Length < 2)
|
||||
return text;
|
||||
|
||||
text = text.Remove(0, index + 1);
|
||||
text = text.Trim();
|
||||
text = FixEllipsesStartHelper(text);
|
||||
text = post + " " + text;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -207,15 +207,13 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
|
||||
public static string FormatBytesToDisplayFileSize(long fileSize)
|
||||
{
|
||||
{
|
||||
if (fileSize <= 1024)
|
||||
return string.Format("{0} bytes", fileSize);
|
||||
if (fileSize <= 1024 * 1024)
|
||||
return string.Format("{0} kb", fileSize / 1024);
|
||||
if (fileSize <= 1024 * 1024 * 1024)
|
||||
return string.Format("{0:0.0} mb", (float)fileSize / (1024 * 1024));
|
||||
return string.Format("{0:0.0} gb", (float)fileSize / (1024 * 1024 * 1024));
|
||||
}
|
||||
if (fileSize <= 1024)
|
||||
return string.Format("{0} bytes", fileSize);
|
||||
if (fileSize <= 1024 * 1024)
|
||||
return string.Format("{0} kb", fileSize / 1024);
|
||||
if (fileSize <= 1024 * 1024 * 1024)
|
||||
return string.Format("{0:0.0} mb", (float)fileSize / (1024 * 1024));
|
||||
return string.Format("{0:0.0} gb", (float)fileSize / (1024 * 1024 * 1024));
|
||||
}
|
||||
|
||||
public static int GetSubtitleIndex(List<Paragraph> paragraphs, VideoPlayerContainer videoPlayerContainer)
|
||||
@ -2486,7 +2484,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
text = text.Replace("< I>", beginTag);
|
||||
text = text.Replace("<I >", beginTag);
|
||||
|
||||
text = text.Replace("< / i >", "</i>");
|
||||
text = text.Replace("< / i >", endTag);
|
||||
text = text.Replace("< /i>", endTag);
|
||||
text = text.Replace("</ i>", endTag);
|
||||
text = text.Replace("< /i>", endTag);
|
||||
|
Loading…
Reference in New Issue
Block a user