Displaying several TM results in the editor

Hi All,


I'm developing a TM plugin, and it returns several results for a segment in the lookup. But Studio only displays one TM match in the editor, the first one. Is there a setting in Studio to change this, or do I have to set something in my results? What am I missing?

Thank you,

Agnes

Parents
  • Hi Agnes,

    In the 'Provider' class of your plugin, make sure that the boolean property 'SupportsMultipleResults' returns true...in case you haven't already done that.

    There is a setting in Studio (Project settings > Language Pairs > Search) that affect the number of results returned, but the default is 5 I think. Also, if there are multiple providers selected, there is a setting on that same page to limit the results to the best match.
  • Thank you, Patrick!
    The property is already set to true, and the number of results is 5 in the settings, and "Search for fuzzy matches even if exact match is found" is checked, and I tried both options for multiple providers (however, I only have one provider now, my TM plugin, and all my TMs are disabled). Nothing helps :( I only have 1 result in the results tab, even though I know that I return several results.
    Does this actually work for you?

    Thank you!
    Agnes
  • Hi Agnes,
    It sounds like you've covered all bases. None of my recent work has included multiple results, but I have done it before in testing, when it appeared to work. I don't remember if this was back with Studio 2011 or 2014. Could it have something to do with the way you are constructing the return results in the SearchSegment method? My approach would be to step through the code and check the values being passed back to Studio. I imagine you have probably already done that to some extent, but perhaps you can find if there is a bug in your code somewhere in that part of the method.

    In any case, my plan is in fact to move away from implementing translation providers altogether and instead do everything from a custom view part as part of the integration API. I just found out that you can modify the current segment in the document from a custom editor view pane, including the match score, segment confirmation status, origin, text, etc. The advantage is there would be much more control over the display in the view part than you get with the built-in translation provider interface. I will probably post back to the community with updates on this for anyone who is interested.

Reply
  • Hi Agnes,
    It sounds like you've covered all bases. None of my recent work has included multiple results, but I have done it before in testing, when it appeared to work. I don't remember if this was back with Studio 2011 or 2014. Could it have something to do with the way you are constructing the return results in the SearchSegment method? My approach would be to step through the code and check the values being passed back to Studio. I imagine you have probably already done that to some extent, but perhaps you can find if there is a bug in your code somewhere in that part of the method.

    In any case, my plan is in fact to move away from implementing translation providers altogether and instead do everything from a custom view part as part of the integration API. I just found out that you can modify the current segment in the document from a custom editor view pane, including the match score, segment confirmation status, origin, text, etc. The advantage is there would be much more control over the display in the view part than you get with the built-in translation provider interface. I will probably post back to the community with updates on this for anyone who is interested.

Children