Skip to content

Commit

Permalink
Reduce noise when loading xliff files from crowdin (20190320)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenMcConnel committed Mar 20, 2019
1 parent e9843da commit ff28df1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/L10NSharp/XLiffUtils/XLiffXmlSerializationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,9 @@ static void deserializer_UnknownElement(object sender, XmlElementEventArgs e)
var tuv = e.ObjectBeingDeserialized as TransUnitVariant;
if (tuv == null)
{
Console.WriteLine("{0} being deserialized: UnknownElement OuterXml={1}",
e.ObjectBeingDeserialized.GetType().ToString(), e.Element.OuterXml);
if (e.ObjectBeingDeserialized is TransUnit && e.Element.LocalName == "alt-trans")
return; // legal xliff that we totally don't care about.
Debug.WriteLine($"{e.ObjectBeingDeserialized.GetType()} being deserialized: UnknownElement OuterXml={e.Element.OuterXml}");
return;
}
// Only <g></g> and <x/> elements can be encountered since that's all the xliff standard allows
Expand All @@ -464,7 +465,7 @@ static void deserializer_UnknownElement(object sender, XmlElementEventArgs e)
}
else
{
Console.WriteLine("TransUnitVariant being deserialized: UnknownElement OuterXml={0}", e.Element.OuterXml);
Debug.WriteLine($"TransUnitVariant being deserialized: UnknownElement OuterXml={e.Element.OuterXml}");
return;
}
bldr.AppendFormat("<{0}", ctype);
Expand Down

0 comments on commit ff28df1

Please sign in to comment.