I finaly got the chance to write about this new API that was introduced in Trados Studio 2019. This major release introduces a new functionality that let's me explore and invoke available Trados Studio commands and settings called "Tell Me". For more details about "Tell Me" please have a look here. Underneath this interesting functionality there's a new API that allows me to either enhance the default functionality with the commands and settings that are available in my Studio plugin or I have the ability to specify some additional search sources. A few ideas passed my mind, like the ability to search on the SDL AppStore, Google or maybe some internal knowledge based system. To better understand the new API I created a studio plugin that allows me to directly search on google from Studio but I didn't publicly release it as I built as more of an experiment. Someday maybe ... if there's enough interest. Another reason why I didn't release the google plugin might be that I also started playing with another idea where Studio, via the "Tell Me" user interface, could provide all kinds of useful information, like conversations, math arithmetic or airport information. This idea turned into a concrete Trados Studio 2019 plugin that's available on the SDL AppStore SDL QuickInfo.
How can I enhance "Tell Me" results?
One way to enhance the "Tell Me" results is to specify additional commands, actions or settings available with my plugin. The api is fairly simple and there are just 4 simple constructions I had to use in order to enhance the tell me results.
- In order to access the "Tell Me" API I needed to add a reference to
Sdl.TellMe.ProviderApi.dll
from my plugin. The dll is located in the Trados Studio 2019 installation folder and the process is the same as with any standard .net framework project. - After adding the reference I registered my plugin as a "Tell Me" provider. I then created a new class that is inherited from
ITellMeProvider
and also mark it with theTellMeProvider
attribute. - Implementing the
ITellMeProvider
interface required me to set the Name property and the actions that are defined as part of this provider. For each provided action I specified a few keywords so that the Tell Me engine is able to match my actions when the user is searching. - In order to specify the action I wanted in my "Tell Me" provider, I created a new class that I inherited then from
AbstractTellMeAction
and implemented the execute method so that it performs the action I wanted.
Support for "Tell Me" will be add to the new plugins developed under SDL Community and for existing ones it will be based on the need.
How can I enhance "Tell Me" by adding new search sources?
Before going forward I need to clarify the aspect of different search sources. The Tell Me user interface is able to display information coming from various places and sources. The default search source is the list of available commands and settings available in Trados Studio (and a bit more if I look at the previous section). Besides this default search source the Tell Me API allows me to define new search sources. Results from these additional search sources will not be returned unless the user enters in the search area the name of the search source prefixed by the @
character. For example in order to get results from SDL QuickInfo I need to write something like @info *color*
. This instructs the Tell Me engine to identify a search source with the name info
and inside that source to look for color
.
In order to create and add a new search source, or search data provider, for "Tell Me" I had to carry out the following steps (make sure to have a reference to Sdl.TellMe.ProviderApi.dll
as described in the previous section):
- Define a "Tell Me" plugin loader. I needed this so that I am able to instruct Trados Studio 2019 about my new search data provider. This is a simple class that has to be decorated with the
TellMeSearchProvider
attribute and inherited fromITellMePluginLoader
- Create a new search data provider that is specified at the first step. I had to inherit the search data provider from
ISearchDataProvider
interface. Besides the name and icon information this interface exposes two methods. One,GetProviderForQuery(string query)
, that is allowing me to verify if the search source introduced by the user is matching my search data provider andSearchForSuggestion(string query)
which is the method where the lookup for the specified query happens. It's important to understand that each search source/search data provider needs to implement it's own search engine. Trados Studio comes with a specialized search implementation for the commands and settings which might not be the best option in certain scenarios and that's why each search source should implement it's own engine.
Don't hesitate to leave me a comment if you have any questions or suggestions.
View Comments