mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Added Catalan language file for SE 3.3 - thx Juansa :)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1522 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
70f5cee1bd
commit
583afba318
File diff suppressed because it is too large
Load Diff
@ -521,6 +521,17 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
string start = node.Attributes["TimeIn"].InnerText;
|
||||
string end = node.Attributes["TimeOut"].InnerText;
|
||||
|
||||
if (node.ParentNode.Name == "Font" && node.ParentNode.Attributes["Italic"] != null && node.ParentNode.Attributes["Italic"].InnerText.ToLower() == "yes" &&
|
||||
!pText.ToString().Contains("<i>"))
|
||||
{
|
||||
string text = pText.ToString();
|
||||
if (text.StartsWith("{\\an") && text.Length > 6)
|
||||
text = text.Insert(6, "<i>") + "</i>";
|
||||
else
|
||||
text = "<i>" + text + "</i>";
|
||||
pText = new StringBuilder(text);
|
||||
}
|
||||
|
||||
subtitle.Paragraphs.Add(new Paragraph(GetTimeCode(start), GetTimeCode(end), pText.ToString()));
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -50,12 +50,13 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
var sb = new StringBuilder();
|
||||
lines.ForEach(line => sb.AppendLine(line));
|
||||
string xmlAsString = sb.ToString().Trim();
|
||||
if (xmlAsString.Contains("<dcst:SubtitleReel"))
|
||||
if (xmlAsString.Contains("<dcst:SubtitleReel") || xmlAsString.Contains("<SubtitleReel"))
|
||||
{
|
||||
var xml = new XmlDocument();
|
||||
try
|
||||
{
|
||||
xmlAsString = xmlAsString.Replace("<dcst:", "<").Replace("</dcst:", "</");
|
||||
xmlAsString = xmlAsString.Replace("xmlns=\"http://www.smpte-ra.org/schemas/428-7/2007/DCST\"", string.Empty);
|
||||
xml.LoadXml(xmlAsString);
|
||||
var subtitles = xml.DocumentElement.SelectNodes("//Subtitle");
|
||||
if (subtitles != null && subtitles.Count >= 0)
|
||||
@ -373,7 +374,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
var sb = new StringBuilder();
|
||||
lines.ForEach(line => sb.AppendLine(line));
|
||||
var xml = new XmlDocument();
|
||||
xml.LoadXml(sb.ToString().Replace("<dcst:", "<").Replace("</dcst:", "</")); // tags might be prefixed with namespace (or not)... so we just remove them
|
||||
xml.LoadXml(sb.ToString().Replace("<dcst:", "<").Replace("</dcst:", "</").Replace("xmlns=\"http://www.smpte-ra.org/schemas/428-7/2007/DCST\"", string.Empty)); // tags might be prefixed with namespace (or not)... so we just remove them
|
||||
|
||||
var ss = Configuration.Settings.SubtitleSettings;
|
||||
try
|
||||
@ -542,6 +543,17 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
string start = node.Attributes["TimeIn"].InnerText;
|
||||
string end = node.Attributes["TimeOut"].InnerText;
|
||||
|
||||
if (node.ParentNode.Name == "Font" && node.ParentNode.Attributes["Italic"] != null && node.ParentNode.Attributes["Italic"].InnerText.ToLower() == "yes" &&
|
||||
!pText.ToString().Contains("<i>"))
|
||||
{
|
||||
string text = pText.ToString();
|
||||
if (text.StartsWith("{\\an") && text.Length > 6)
|
||||
text = text.Insert(6, "<i>") + "</i>";
|
||||
else
|
||||
text = "<i>" + text + "</i>";
|
||||
pText = new StringBuilder(text);
|
||||
}
|
||||
|
||||
subtitle.Paragraphs.Add(new Paragraph(GetTimeCode(start), GetTimeCode(end), pText.ToString()));
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -157,7 +157,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
|
||||
public static IEnumerable<string> GetMovieFileExtensions()
|
||||
{
|
||||
return new List<string> { ".avi", ".mkv", ".wmv", ".mpg", ".mpeg", ".divx", ".mp4", ".asf", ".flv", ".mov", ".m4v", ".vob", ".ogv", ".webm", ".ts" };
|
||||
return new List<string> { ".avi", ".mkv", ".wmv", ".mpg", ".mpeg", ".divx", ".mp4", ".asf", ".flv", ".mov", ".m4v", ".vob", ".ogv", ".webm", ".ts", ".m2ts" };
|
||||
}
|
||||
|
||||
public static string GetVideoFileFilter()
|
||||
|
@ -1287,7 +1287,9 @@
|
||||
<Content Include="Languages\bg-BG.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Languages\Old\ca-ES.xml" />
|
||||
<Content Include="Languages\ca-ES.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Languages\cs-CZ.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
Loading…
Reference in New Issue
Block a user