Word count issue for .rc files in Passolo

Hi,
I want to calculate the word count of the Pre-translated 100% match strings in a macro:
----------------------------------------------------------------------------------------------
WPre100 =0
For Each trnlst In prj.TransLists
    For i = 1 To trnlst.StringCount
            If trnlst.String(i).State(pslStateAutoTranslated) And trnlst.String(i).Property(pslPropMatchRate) = 100 Then
            WPre100 = WPre100 + trnlst.String(i).GetSourceTextCounts().WordCount

           End If
         Next i
Next trnlst
----------------------------------------------------------------------------------------------
that works fine if the source files are not .rc files. The calculation is not correct only for .rc files. there are some invisible strings in .rc files are also included into Pre-translated strings, for example: the Font string - "MS Shell Dlg".
What wrong? Is that a Passolo RC parser bug?

Parents
  • This is not a bug in SDL Passolo, it is a problem in your code.

    First I would also point you to the answer from Uwe Schwenk. There is a PslStatistics object that can instantly give you the word count for a complete translation list.

    On the other side when are looping the complete translation list as shown above you will also count the words from the font strings. To get a correct result you have to check within your loop if translation list entries are read-only or hidden like the font string entries and then exclude them from your calculation.
Reply
  • This is not a bug in SDL Passolo, it is a problem in your code.

    First I would also point you to the answer from Uwe Schwenk. There is a PslStatistics object that can instantly give you the word count for a complete translation list.

    On the other side when are looping the complete translation list as shown above you will also count the words from the font strings. To get a correct result you have to check within your loop if translation list entries are read-only or hidden like the font string entries and then exclude them from your calculation.
Children
No Data