diff --git a/src/L10NSharp/XLiffUtils/XLiffXmlSerializationHelper.cs b/src/L10NSharp/XLiffUtils/XLiffXmlSerializationHelper.cs index 283f4ab..7835fb2 100644 --- a/src/L10NSharp/XLiffUtils/XLiffXmlSerializationHelper.cs +++ b/src/L10NSharp/XLiffUtils/XLiffXmlSerializationHelper.cs @@ -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 and elements can be encountered since that's all the xliff standard allows @@ -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);