mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Fixed a few minor language bugs - thx FeiXJ :)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@180 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
1bb78834c5
commit
e3fd45f1e7
@ -15,7 +15,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
Text = Configuration.Settings.Language.EffectKaraoke.Title;
|
Text = Configuration.Settings.Language.EffectTypewriter.Title;
|
||||||
labelTM.Text = Configuration.Settings.Language.EffectKaraoke.TotalMilliseconds;
|
labelTM.Text = Configuration.Settings.Language.EffectKaraoke.TotalMilliseconds;
|
||||||
labelEndDelay.Text = Configuration.Settings.Language.EffectKaraoke.EndDelayInMilliseconds;
|
labelEndDelay.Text = Configuration.Settings.Language.EffectKaraoke.EndDelayInMilliseconds;
|
||||||
buttonPreview.Text = Configuration.Settings.Language.General.Preview;
|
buttonPreview.Text = Configuration.Settings.Language.General.Preview;
|
||||||
|
3
src/Forms/FixCommonErrors.Designer.cs
generated
3
src/Forms/FixCommonErrors.Designer.cs
generated
@ -303,6 +303,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.subtitleListView1.ContextMenuStrip = this.contextMenuStripListview;
|
this.subtitleListView1.ContextMenuStrip = this.contextMenuStripListview;
|
||||||
this.subtitleListView1.FirstVisibleIndex = -1;
|
this.subtitleListView1.FirstVisibleIndex = -1;
|
||||||
|
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.subtitleListView1.FullRowSelect = true;
|
this.subtitleListView1.FullRowSelect = true;
|
||||||
this.subtitleListView1.GridLines = true;
|
this.subtitleListView1.GridLines = true;
|
||||||
this.subtitleListView1.HideSelection = false;
|
this.subtitleListView1.HideSelection = false;
|
||||||
@ -421,7 +422,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
this.timeUpDownStartTime.Location = new System.Drawing.Point(8, 27);
|
this.timeUpDownStartTime.Location = new System.Drawing.Point(8, 27);
|
||||||
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
|
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
|
||||||
this.timeUpDownStartTime.Size = new System.Drawing.Size(89, 25);
|
this.timeUpDownStartTime.Size = new System.Drawing.Size(92, 25);
|
||||||
this.timeUpDownStartTime.TabIndex = 112;
|
this.timeUpDownStartTime.TabIndex = 112;
|
||||||
//
|
//
|
||||||
// numericUpDownDuration
|
// numericUpDownDuration
|
||||||
|
@ -110,6 +110,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
StringBuilder _newLog = new StringBuilder();
|
StringBuilder _newLog = new StringBuilder();
|
||||||
StringBuilder _appliedLog = new StringBuilder();
|
StringBuilder _appliedLog = new StringBuilder();
|
||||||
private int _numberOfImportantLogMessages = 0;
|
private int _numberOfImportantLogMessages = 0;
|
||||||
|
List<int> _deleteIndices = new List<int>();
|
||||||
|
|
||||||
public Subtitle FixedSubtitle
|
public Subtitle FixedSubtitle
|
||||||
{
|
{
|
||||||
@ -344,6 +345,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
p.Text = text.TrimEnd(Environment.NewLine.ToCharArray());
|
p.Text = text.TrimEnd(Environment.NewLine.ToCharArray());
|
||||||
emptyLinesRemoved++;
|
emptyLinesRemoved++;
|
||||||
AddFixToListView(p, i + 1, fixAction2, p.Text, text);
|
AddFixToListView(p, i + 1, fixAction2, p.Text, text);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,6 +363,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_subtitle.Paragraphs.RemoveAt(i);
|
_subtitle.Paragraphs.RemoveAt(i);
|
||||||
emptyLinesRemoved++;
|
emptyLinesRemoved++;
|
||||||
AddFixToListView(p, i + 1, fixAction0, p.Text, string.Format("[{0}]", _language.RemovedEmptyLine));
|
AddFixToListView(p, i + 1, fixAction0, p.Text, string.Format("[{0}]", _language.RemovedEmptyLine));
|
||||||
|
_deleteIndices.Add(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1364,7 +1368,11 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
Paragraph p = _subtitle.Paragraphs[i];
|
Paragraph p = _subtitle.Paragraphs[i];
|
||||||
Paragraph next = _subtitle.GetParagraphOrDefault(i + 1);
|
Paragraph next = _subtitle.GetParagraphOrDefault(i + 1);
|
||||||
|
|
||||||
if (next != null &&
|
if (IsOneLineUrl(p.Text))
|
||||||
|
{
|
||||||
|
; // ignore urls
|
||||||
|
}
|
||||||
|
else if (next != null &&
|
||||||
next.Text.Length > 0 &&
|
next.Text.Length > 0 &&
|
||||||
Utilities.GetLetters(true, false, false).Contains(next.Text[0].ToString()) &&
|
Utilities.GetLetters(true, false, false).Contains(next.Text[0].ToString()) &&
|
||||||
p.Text.Length > 0 &&
|
p.Text.Length > 0 &&
|
||||||
@ -1461,6 +1469,27 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
LogStatus(_language.AddPeriods, string.Format(_language.XPeriodsAdded, missigPeriodsAtEndOfLine));
|
LogStatus(_language.AddPeriods, string.Format(_language.XPeriodsAdded, missigPeriodsAtEndOfLine));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsOneLineUrl(string s)
|
||||||
|
{
|
||||||
|
if (s.Contains(" ") || s.Contains(Environment.NewLine))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (s.ToLower().StartsWith("http://"))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (s.ToLower().StartsWith("https://"))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (s.ToLower().StartsWith("www."))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
string[] parts = s.Split(".".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
if (parts.Length == 3 && parts[2].Length > 1 && parts[2].Length < 7)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private bool IsName(string candidate)
|
private bool IsName(string candidate)
|
||||||
{
|
{
|
||||||
MakeSureNamesListIsLoaded();
|
MakeSureNamesListIsLoaded();
|
||||||
@ -1655,7 +1684,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fixedStartWithUppercaseLetterAfterParagraphTicked > 0)
|
if (fixedStartWithUppercaseLetterAfterParagraphTicked > 0)
|
||||||
LogStatus(_language.StartWithUppercaseLetterAfterParagraph, fixedStartWithUppercaseLetterAfterParagraphTicked + " periods added.");
|
LogStatus(_language.StartWithUppercaseLetterAfterParagraph, fixedStartWithUppercaseLetterAfterParagraphTicked.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FixStartWithUppercaseLetterAfterPeriodInsideParagraph()
|
private void FixStartWithUppercaseLetterAfterPeriodInsideParagraph()
|
||||||
@ -3152,6 +3181,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
subtitleListView1.BeginUpdate();
|
subtitleListView1.BeginUpdate();
|
||||||
_newLog = new StringBuilder();
|
_newLog = new StringBuilder();
|
||||||
|
_deleteIndices = new List<int>();
|
||||||
|
|
||||||
_subtitle = new Subtitle(_originalSubtitle);
|
_subtitle = new Subtitle(_originalSubtitle);
|
||||||
foreach (ListViewItem item in listView1.Items)
|
foreach (ListViewItem item in listView1.Items)
|
||||||
@ -3275,10 +3305,18 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
private void ListViewFixesSelectedIndexChanged(object sender, EventArgs e)
|
private void ListViewFixesSelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
int addNumber = 0;
|
||||||
if (listViewFixes.SelectedItems.Count > 0)
|
if (listViewFixes.SelectedItems.Count > 0)
|
||||||
{
|
{
|
||||||
Paragraph p = (Paragraph) listViewFixes.SelectedItems[0].Tag;
|
Paragraph p = (Paragraph) listViewFixes.SelectedItems[0].Tag;
|
||||||
p = _originalSubtitle.GetFirstParagraphByLineNumber(p.Number);
|
|
||||||
|
for (int i = 0; i < p.Number; i++)
|
||||||
|
{
|
||||||
|
if (_deleteIndices.Contains(i))
|
||||||
|
addNumber++;
|
||||||
|
}
|
||||||
|
|
||||||
|
p = _originalSubtitle.GetFirstParagraphByLineNumber(p.Number+addNumber);
|
||||||
if (p != null)
|
if (p != null)
|
||||||
{
|
{
|
||||||
int index = _originalSubtitle.GetIndex(p);
|
int index = _originalSubtitle.GetIndex(p);
|
||||||
|
Loading…
Reference in New Issue
Block a user