SDLXLIFF Compare - Segment Status option: Is it working as it should?

May be I understand this wrong but my thinking was that if the Segment Status changed option is not ticked segments where the only change was a change of the Status (i.e. Draft -> Translated etc.) would not be reported. However, they are. Is there something else I can do to avoid reporting status changed only segments?

This relates to Version 1.3.1.2 for Studio 2019

Parents
  • I did some tests with your version of the app (note it's out of date as 1.3.2.0 has been available for a little while) but I can't reproduce this issue.  I did a simple test and compared a report with all the options checked, with one where the Segment Status Changed option was unchecked,  The result was as expected and going from this with all options checked:

    To this when I uncheck the setting in question:

    I presume you didn't have any other changes to the translation in your updated file because this would clearly cause it to be reported anyway?

    I put my simple test files here in case you want to validate, and also the reports:

    2019.zip

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Thanks for your thorough research, . I can confirm your findings. 

    Since I can't remember which files my query was based on (but I remember it wasn't the first time I stumbled across the problem) I played around a bit with your files. I found that non-breaking spaces - which I make heavy use of - don't show marked up in an HTML report if they replace normal space chars, but the segment is reported if there has also been a status change (or other change), otherwise not.

  • That's interesting.  I had a quick play and returned this:

    Segments #1 and #3 now have nbsp's in there but no status change.  The segment is now picked up where it wasn't before.  So I cannot corroborate your finding.

    However, you cannot see the change and that's not really helpful.  But I'm also not sure it's even possible to show a whitespace character in html.  If you open the html in Word you'll probably see them, but not in a browser.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Hi 

    This is what I meant: Segments #3 and #8 have nbsp and the reporting of status changes option is disabled:

    Because there is no other change visible in #8 it led me to believe the option is not working.

    I fiddled a bit with the code yesterday so nbsp are treated like alphanums. This is what it looks like then:

    You can also highlight spaces if you wish but it is still hard to spot:

    For the mentioned quick "fix" I edited Sdl.Community.XliffCompare.Core.Comparer.TextComparer like this. I'm sure someone else more familiar with the code can do better, may be putting in an option to mark-up nbsp and other chars or not:

    internal class TextParser
            {
                internal static WordsCollection Parse(List<SDLXLIFF.SegmentSection> xSegmentSections)
                {
                    ...
                    foreach (var xSegmentSection in xSegmentSections)
                    {
                        ...
                        string suffix;
                        if (!xSegmentSection.IsText)
                        {
                            ...
                        }
                        else
                        {
                            while (curPos < xSegmentSection.Content.Length)
                            {
                                var prevPos = curPos;
                                if (xSegmentSection.Content[curPos] != '\xa0') // <-- nbsp fix
                                {
                                    while (curPos < xSegmentSection.Content.Length &&
                                       (char.IsControl(xSegmentSection.Content[curPos])
                                       || char.IsWhiteSpace(xSegmentSection.Content[curPos])))
                                    {
                                        curPos++;
                                    }
                                }
                                ...
                                prevPos = curPos;
                                while (curPos < xSegmentSection.Content.Length &&
                                    (xSegmentSection.Content[curPos] == '\xa0'||    // <-- nbsp fix 
                                    (!char.IsControl(xSegmentSection.Content[curPos]) &&
                                    !char.IsWhiteSpace(xSegmentSection.Content[curPos]))))
                                {
                                    curPos++;
                                }
                                ...
                }
Reply
  • Hi 

    This is what I meant: Segments #3 and #8 have nbsp and the reporting of status changes option is disabled:

    Because there is no other change visible in #8 it led me to believe the option is not working.

    I fiddled a bit with the code yesterday so nbsp are treated like alphanums. This is what it looks like then:

    You can also highlight spaces if you wish but it is still hard to spot:

    For the mentioned quick "fix" I edited Sdl.Community.XliffCompare.Core.Comparer.TextComparer like this. I'm sure someone else more familiar with the code can do better, may be putting in an option to mark-up nbsp and other chars or not:

    internal class TextParser
            {
                internal static WordsCollection Parse(List<SDLXLIFF.SegmentSection> xSegmentSections)
                {
                    ...
                    foreach (var xSegmentSection in xSegmentSections)
                    {
                        ...
                        string suffix;
                        if (!xSegmentSection.IsText)
                        {
                            ...
                        }
                        else
                        {
                            while (curPos < xSegmentSection.Content.Length)
                            {
                                var prevPos = curPos;
                                if (xSegmentSection.Content[curPos] != '\xa0') // <-- nbsp fix
                                {
                                    while (curPos < xSegmentSection.Content.Length &&
                                       (char.IsControl(xSegmentSection.Content[curPos])
                                       || char.IsWhiteSpace(xSegmentSection.Content[curPos])))
                                    {
                                        curPos++;
                                    }
                                }
                                ...
                                prevPos = curPos;
                                while (curPos < xSegmentSection.Content.Length &&
                                    (xSegmentSection.Content[curPos] == '\xa0'||    // <-- nbsp fix 
                                    (!char.IsControl(xSegmentSection.Content[curPos]) &&
                                    !char.IsWhiteSpace(xSegmentSection.Content[curPos]))))
                                {
                                    curPos++;
                                }
                                ...
                }
Children
No Data