Keys should be changed on a second plugin

 Hello.

Which keys should I modify on a second plugin?

 

=======

I start to make a second plugin for Trados.

But this is constructed from the same SDK.

So below message is shown when I attempt to load two plugins at the same time.

"An item with the same key has already been added."

7 Replies Latest Replies: 12 Jun 2018 9:37 PM by Hoon Kim < 1   2  >
  • In reply to NICT Dev:

    Another problem.

    Here, I called P1 as primary plugin
    and P2 as duplicated plugin from P1.

    =========
    On Project Settings, Translation Memory and Automated Translation,
    when select P2 on "Use" tab, P1 is loaded on list.
    What key is wrong?

    When load only P2 to Trados, action is normal.
    On Project Settings, Translation Memory and Automated Translation,
    when select P2 on "Use" tab, P2 is loaded on list.

    =========
    I changed below keys.

    TranslationProviderFactory Id Name
    TranslationProvider Name Uri
    TranslationProviderWinFormsUi Id Name
  • In reply to NICT Dev:

    I've resolved this problem.

    I had to implement the method SupportsTranslationProviderUri
    on TranslationProviderFactory and TranslationProviderWinFormsUi correctly.

    ===========

    public bool SupportsTranslationProviderUri(Uri translationProviderUri)
    {
    TranslationProvider provider = TranslationProviderFactory._provider;
    if (translationProviderUri == null || provider == null) { return false; }
    return String.Equals(translationProviderUri.AbsoluteUri,
    provider.Uri.AbsoluteUri,
    StringComparison.CurrentCultureIgnoreCase);
    }
< 1   2  >
Related