mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
Work on WebVTT styles
This commit is contained in:
parent
08c45d1615
commit
39e8625842
@ -37,6 +37,7 @@
|
|||||||
<Actor>Actor</Actor>
|
<Actor>Actor</Actor>
|
||||||
<Gap>Gap</Gap>
|
<Gap>Gap</Gap>
|
||||||
<Region>Region</Region>
|
<Region>Region</Region>
|
||||||
|
<Layer>Layer</Layer>
|
||||||
<NumberSymbol>#</NumberSymbol>
|
<NumberSymbol>#</NumberSymbol>
|
||||||
<Number>Number</Number>
|
<Number>Number</Number>
|
||||||
<Text>Text</Text>
|
<Text>Text</Text>
|
||||||
@ -1474,7 +1475,6 @@ To use an API key, go to "Options -> Settings -> Tools" to enter your Goog
|
|||||||
<Next>Next ></Next>
|
<Next>Next ></Next>
|
||||||
<AutoBreak>Auto &br</AutoBreak>
|
<AutoBreak>Auto &br</AutoBreak>
|
||||||
<Unbreak>Unbreak</Unbreak>
|
<Unbreak>Unbreak</Unbreak>
|
||||||
<SetLayer>Set layer</SetLayer>
|
|
||||||
</Controls>
|
</Controls>
|
||||||
<VideoControls>
|
<VideoControls>
|
||||||
<Translate>Translate</Translate>
|
<Translate>Translate</Translate>
|
||||||
@ -3214,4 +3214,7 @@ Keep changes?</KeepChangesMessage>
|
|||||||
<Title>WebVTT - set new voice</Title>
|
<Title>WebVTT - set new voice</Title>
|
||||||
<VoiceName>Name of voice</VoiceName>
|
<VoiceName>Name of voice</VoiceName>
|
||||||
</WebVttNewVoice>
|
</WebVttNewVoice>
|
||||||
|
<WebVttStyleManager>
|
||||||
|
<Title>WebVTT styles</Title>
|
||||||
|
</WebVttStyleManager>
|
||||||
</Language>
|
</Language>
|
@ -5973,7 +5973,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
TryLoadIcon(toolStripButtonToggleWaveform, "WaveformToggle");
|
TryLoadIcon(toolStripButtonToggleWaveform, "WaveformToggle");
|
||||||
TryLoadIcon(toolStripButtonToggleVideo, "VideoToggle");
|
TryLoadIcon(toolStripButtonToggleVideo, "VideoToggle");
|
||||||
TryLoadIcon(toolStripButtonSourceView, "SourceView");
|
TryLoadIcon(toolStripButtonSourceView, "SourceView");
|
||||||
// IttProperties, WebVttProperties, EbuProperties
|
// IttProperties, WebVttProperties, WebVttStyle, EbuProperties
|
||||||
}
|
}
|
||||||
|
|
||||||
toolStripButtonFileNew.Visible = gs.ShowToolbarNew;
|
toolStripButtonFileNew.Visible = gs.ShowToolbarNew;
|
||||||
@ -10782,7 +10782,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var isAssa = GetCurrentSubtitleFormat().GetType() == typeof(AdvancedSubStationAlpha);
|
var isAssa = GetCurrentSubtitleFormat().GetType() == typeof(AdvancedSubStationAlpha);
|
||||||
if (isAssa)
|
if (isAssa)
|
||||||
{
|
{
|
||||||
var layer = (int)numericUpDownLayer.Value;
|
var layer = (int)numericUpDownLayer.Value;
|
||||||
@ -32989,6 +32989,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
var assFormatOn = formatType == typeof(AdvancedSubStationAlpha);
|
var assFormatOn = formatType == typeof(AdvancedSubStationAlpha);
|
||||||
toolStripButtonAssStyleManager.Visible = assFormatOn;
|
toolStripButtonAssStyleManager.Visible = assFormatOn;
|
||||||
|
toolStripButtonAssStyleManager.ToolTipText = LanguageSettings.Current.SubStationAlphaStyles.Title;
|
||||||
toolStripButtonAssProperties.Visible = assFormatOn;
|
toolStripButtonAssProperties.Visible = assFormatOn;
|
||||||
toolStripButtonAssaDraw.Visible = assFormatOn && File.Exists(Path.Combine(Configuration.PluginsDirectory, "AssaDraw.dll"));
|
toolStripButtonAssaDraw.Visible = assFormatOn && File.Exists(Path.Combine(Configuration.PluginsDirectory, "AssaDraw.dll"));
|
||||||
toolStripButtonAssAttachments.Visible = assFormatOn;
|
toolStripButtonAssAttachments.Visible = assFormatOn;
|
||||||
@ -33014,6 +33015,11 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
toolStripButtonXProperties.ToolTipText = string.Format(_language.Menu.File.FormatXProperties, new WebVTT().Name);
|
toolStripButtonXProperties.ToolTipText = string.Format(_language.Menu.File.FormatXProperties, new WebVTT().Name);
|
||||||
toolStripButtonXProperties.Image = Properties.Resources.webvtt;
|
toolStripButtonXProperties.Image = Properties.Resources.webvtt;
|
||||||
TryLoadIcon(toolStripButtonXProperties, "WebVttProperties");
|
TryLoadIcon(toolStripButtonXProperties, "WebVttProperties");
|
||||||
|
|
||||||
|
toolStripButtonAssStyleManager.Visible = true;
|
||||||
|
toolStripButtonAssStyleManager.ToolTipText = string.Format(LanguageSettings.Current.WebVttStyleManager.Title, new WebVTT().Name);
|
||||||
|
toolStripButtonAssStyleManager.Image = Properties.Resources.webvtt;
|
||||||
|
TryLoadIcon(toolStripButtonAssStyleManager, "WebVttStyle");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (formatType == typeof(Ebu))
|
if (formatType == typeof(Ebu))
|
||||||
|
@ -125,6 +125,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
public LanguageStructure.Waveform Waveform;
|
public LanguageStructure.Waveform Waveform;
|
||||||
public LanguageStructure.WaveformGenerateTimeCodes WaveformGenerateTimeCodes;
|
public LanguageStructure.WaveformGenerateTimeCodes WaveformGenerateTimeCodes;
|
||||||
public LanguageStructure.WebVttNewVoice WebVttNewVoice;
|
public LanguageStructure.WebVttNewVoice WebVttNewVoice;
|
||||||
|
public LanguageStructure.WebVttStyleManager WebVttStyleManager;
|
||||||
|
|
||||||
public Language()
|
public Language()
|
||||||
{
|
{
|
||||||
@ -3612,6 +3613,11 @@ Keep changes?",
|
|||||||
Title = "WebVTT - set new voice",
|
Title = "WebVTT - set new voice",
|
||||||
VoiceName = "Name of voice",
|
VoiceName = "Name of voice",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
WebVttStyleManager = new LanguageStructure.WebVttStyleManager
|
||||||
|
{
|
||||||
|
Title = "WebVTT styles",
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//public static Language Load(StreamReader sr) // normal but slow .net way
|
//public static Language Load(StreamReader sr) // normal but slow .net way
|
||||||
|
@ -166,6 +166,9 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
case "General/Region":
|
case "General/Region":
|
||||||
language.General.Region = reader.Value;
|
language.General.Region = reader.Value;
|
||||||
break;
|
break;
|
||||||
|
case "General/Layer":
|
||||||
|
language.General.Layer = reader.Value;
|
||||||
|
break;
|
||||||
case "General/NumberSymbol":
|
case "General/NumberSymbol":
|
||||||
language.General.NumberSymbol = reader.Value;
|
language.General.NumberSymbol = reader.Value;
|
||||||
break;
|
break;
|
||||||
@ -8773,6 +8776,9 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
case "WebVttNewVoice/VoiceName":
|
case "WebVttNewVoice/VoiceName":
|
||||||
language.WebVttNewVoice.VoiceName = reader.Value;
|
language.WebVttNewVoice.VoiceName = reader.Value;
|
||||||
break;
|
break;
|
||||||
|
case "WebVttStyleManager/Title":
|
||||||
|
language.WebVttStyleManager.Title = reader.Value;
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3459,5 +3459,9 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
public string VoiceName { get; set; }
|
public string VoiceName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class WebVttStyleManager
|
||||||
|
{
|
||||||
|
public string Title { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user