Skip to content

Commit

Permalink
Merge pull request #55 from StephenMcConnel/FixUnwantedVerbosity-2019…
Browse files Browse the repository at this point in the history
…0320

Reduce noise when loading xliff files from crowdin (20190320)
  • Loading branch information
andrew-polk authored Mar 20, 2019
2 parents e9843da + ff28df1 commit a8caae8
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 a8caae8

Please sign in to comment.