Exemplo n.º 1
0
        /// <summary>
        /// Used for displaying the plug-in info such as the plug-in name,
        /// tooltip, and icon.
        /// </summary>
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var info    = new TranslationProviderDisplayInfo();
            var options = new MtTranslationOptions(translationProviderUri);

            info.TranslationProviderIcon = PluginResources.my_icon;

            if (options.SelectedProvider == MtTranslationOptions.ProviderType.GoogleTranslate)
            {
                if (options.SelectedGoogleVersion == Enums.GoogleApiVersion.V2)
                {
                    info.Name        = PluginResources.GoogleBasic;
                    info.TooltipText = PluginResources.GoogleBasic;
                }
                else
                {
                    info.Name        = PluginResources.GoogleAdvanced;
                    info.TooltipText = PluginResources.GoogleAdvanced;
                }
                info.SearchResultImage = PluginResources.my_image;
            }
            else if (options.SelectedProvider == MtTranslationOptions.ProviderType.MicrosoftTranslator)
            {
                info.Name              = PluginResources.Microsoft_NiceName;
                info.TooltipText       = PluginResources.Microsoft_Tooltip;
                info.SearchResultImage = PluginResources.microsoft_image;
            }
            else
            {
                info.Name        = PluginResources.Plugin_NiceName;
                info.TooltipText = PluginResources.Plugin_Tooltip;
            }
            return(info);
        }
        /// <summary>
        /// Used for displaying the plug-in info such as the plug-in name,
        /// tooltip, and icon.
        /// </summary>
        /// <param name="translationProviderUri"></param>
        /// <param name="translationProviderState"></param>
        /// <returns></returns>
        #region "GetDisplayInfo"
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            TranslationProviderDisplayInfo info    = new TranslationProviderDisplayInfo();
            MtTranslationOptions           options = new MtTranslationOptions(translationProviderUri);

            info.TranslationProviderIcon = PluginResources.my_icon;

            if (options.SelectedProvider == MtTranslationOptions.ProviderType.GoogleTranslate)
            {
                info.Name              = PluginResources.Google_NiceName;
                info.TooltipText       = PluginResources.Google_Tooltip;
                info.SearchResultImage = PluginResources.my_image;
            }
            else if (options.SelectedProvider == MtTranslationOptions.ProviderType.MicrosoftTranslator)
            {
                info.Name              = PluginResources.Microsoft_NiceName;
                info.TooltipText       = PluginResources.Microsoft_Tooltip;
                info.SearchResultImage = PluginResources.microsoft_image;
            }
            else
            {
                info.Name        = PluginResources.Plugin_NiceName;
                info.TooltipText = PluginResources.Plugin_Tooltip;
            }
            return(info);
        }
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            TranslationProviderDisplayInfo translationProviderDisplayInfo = new TranslationProviderDisplayInfo();

            translationProviderDisplayInfo.Name = PluginResources.Plugin_NiceName;
            translationProviderDisplayInfo.TranslationProviderIcon = PluginResources.Icon;
            translationProviderDisplayInfo.SearchResultImage       = PluginResources.Icon.ToBitmap();
            return(translationProviderDisplayInfo);
        }
Exemplo n.º 4
0
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var info = new TranslationProviderDisplayInfo
            {
                Name = "DeepL Translation provider"
            };

            return(info);
        }
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            TranslationProviderDisplayInfo info = new TranslationProviderDisplayInfo();

            info.Name = PluginResources.Plugin_NiceName;
            info.TranslationProviderIcon = PluginResources.band_aid_icon;
            info.SearchResultImage       = PluginResources.band_aid_symbol;

            return(info);
        }
Exemplo n.º 6
0
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            TranslationProviderDisplayInfo info = new TranslationProviderDisplayInfo
            {
                Name                    = "Controlled MT Providers",
                TooltipText             = "Controlled MT Providers",
                TranslationProviderIcon = PluginResources.icon
            };

            return(info);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Used for displaying the plug-in info such as the plug-in name,
        /// tooltip, and icon.
        /// </summary>
        /// <param name="translationProviderUri"></param>
        /// <param name="translationProviderState"></param>
        /// <returns></returns>
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            Log.logger.Trace("");
            TranslationProviderDisplayInfo info = new TranslationProviderDisplayInfo();

            info.Name = PluginResources.Plugin_NiceName;
            info.TranslationProviderIcon = PluginResources.icon_icon;
            info.TooltipText             = PluginResources.Plugin_Tooltip;
            info.SearchResultImage       = PluginResources.icon_symbol;
            return(info);
        }
Exemplo n.º 8
0
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var info = new TranslationProviderDisplayInfo
            {
                Name        = "DeepL Translation provider",
                TooltipText = "DeepL Translation provider",
                //SearchResultImage = PluginResources.DeepL,
                TranslationProviderIcon = PluginResources.deepLIcon
            };

            return(info);
        }
Exemplo n.º 9
0
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var info = new TranslationProviderDisplayInfo
            {
                Name                    = Constants.PluginName,
                TooltipText             = Constants.PluginName,
                TranslationProviderIcon = PluginResources.global,
                SearchResultImage       = PluginResources.global1,
            };

            return(info);
        }
Exemplo n.º 10
0
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var options = new TartuNLPOptions(translationProviderUri);
            var info    = new TranslationProviderDisplayInfo();

            info.Name                    = String.Format("{0} ({1})", TypeName, options.SelectedDomainName);
            info.TooltipText             = TypeDescription;
            info.TranslationProviderIcon = PluginResources.icon;
            info.SearchResultImage       = PluginResources.symbol;

            return(info);
        }
Exemplo n.º 11
0
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var info = new TranslationProviderDisplayInfo
            {
                Name                    = "SDL BeGlobal (NMT) Translation provider",
                TooltipText             = "SDL BeGlobal (NMT) Translation provider",
                SearchResultImage       = PluginResources.logoRes,
                TranslationProviderIcon = PluginResources.global
            };

            return(info);
        }
Exemplo n.º 12
0
        /// <summary>
        /// Used for displaying the plug-in info such as the plug-in name,
        /// tooltip, and icon.
        /// </summary>
        /// <param name="translationProviderUri"></param>
        /// <param name="translationProviderState"></param>
        /// <returns></returns>
        #region "GetDisplayInfo"
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            TranslationProviderDisplayInfo info = new TranslationProviderDisplayInfo();

            info.Name = PluginResources.Plugin_NiceName;
            info.TranslationProviderIcon = PluginResources.fiskmo_zIQ_icon;
            info.TooltipText             = PluginResources.Plugin_Tooltip;

            info.SearchResultImage = PluginResources.fiskmo;

            return(info);
        }
Exemplo n.º 13
0
        /// <summary>
        /// Used for displaying the plug-in info such as the plug-in name,
        /// tooltip, and icon.
        /// </summary>
        /// <param name="translationProviderUri"></param>
        /// <param name="translationProviderState"></param>
        /// <returns></returns>
        #region "GetDisplayInfo"
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var info = new TranslationProviderDisplayInfo
            {
                Name = PluginResources.Plugin_NiceName,
                TranslationProviderIcon = PluginResources.TausIcon,
                TooltipText             = PluginResources.Plugin_Tooltip,
                SearchResultImage       = PluginResources.TausImage
            };


            return(info);
        }
        /// <summary>
        /// Used for displaying the plug-in info such as the plug-in name,
        /// tooltip, and icon.
        /// </summary>
        /// <param name="translationProviderUri"></param>
        /// <param name="translationProviderState"></param>
        /// <returns></returns>

        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var info    = new TranslationProviderDisplayInfo();
            var options = new MtTranslationOptions(translationProviderUri);

            info.TranslationProviderIcon = PluginResources.ArgosMT;

            info.Name              = PluginResources.Plugin_NiceName;
            info.TooltipText       = PluginResources.Plugin_Tooltip;
            info.SearchResultImage = PluginResources.argos_small;
            //TODO: update icon
            return(info);
        }
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            //throw new NotImplementedException();
            TranslationProviderDisplayInfo info = new TranslationProviderDisplayInfo();

            info.Name = PluginResources.Plugin_NiceName;
            info.TranslationProviderIcon = PluginResources.band_aid_icon;
            info.TooltipText             = PluginResources.Plugin_Tooltip;

            info.SearchResultImage = PluginResources.band_aid_symbol;

            return(info);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Used for displaying the plug-in info such as the plug-in name,
        /// tooltip, and icon.
        /// </summary>
        /// <param name="translationProviderUri"></param>
        /// <param name="translationProviderState"></param>
        /// <returns></returns>
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            Log.Logger.Trace("");
            var info = new TranslationProviderDisplayInfo
            {
                Name = PluginResources.Plugin_NiceName,
                TranslationProviderIcon = PluginResources.icon1,
                TooltipText             = PluginResources.Plugin_Tooltip,
                SearchResultImage       = PluginResources.icon,
            };

            return(info);
        }
Exemplo n.º 17
0
        /// <summary>
        /// Gets display information for the specified translation provider.
        /// </summary>
        /// <param name="translationProviderUri">A translation provider URI, representing the translation provider.</param>
        /// <param name="translationProviderState">Optional translation provider state information, which can be used to determine
        /// certain aspects of the display information.</param>
        /// <returns>
        /// A <see cref="T:Sdl.LanguagePlatform.TranslationMemoryApi.TranslationProviderDisplayInfo"/> object, containing display information that allows
        /// an application to represent the translation provider without having to instantiate it.
        /// </returns>
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var settings = new TranslationProviderSettings(translationProviderUri);

            // this have to be improved by adding a readonly property to TranslationProviderSettings class which will indicate the type of TM: file or server based.
            bool isServerBased = !string.IsNullOrEmpty(settings.Container);

            TranslationProviderDisplayInfo info = new TranslationProviderDisplayInfo()
            {
                Name              = settings.TranslationMemoryName,
                TooltipText       = PluginResources.Trados2007_ToolTip,
                SearchResultImage = isServerBased ?
                                    PluginResources.Trados2007_ServerBased_Image_little : PluginResources.Trados2007_FileBased_Image_little,
                TranslationProviderIcon = isServerBased ?
                                          PluginResources.Trados2007_ServerBased_Icon : PluginResources.Trados2007_FileBased_Icon
            };

            return(info);
        }
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            var translationProviderDisplayInfo = new TranslationProviderDisplayInfo();

            if (string.IsNullOrEmpty(translationProviderUri.UserInfo))
            {
                translationProviderDisplayInfo.Name = GoogleTranslationProvider.GetTranslationProviderName();
            }
            else
            {
                translationProviderDisplayInfo.Name = string.Concat(
                    GoogleTranslationProvider.GetTranslationProviderName(),
                    " (",
                    translationProviderUri.UserInfo.Substring(0, translationProviderUri.UserInfo.Length - 1),
                    ")");
            }

            translationProviderDisplayInfo.SearchResultImage = PluginResources.google_alpha_studio;

            // TODO: _translationProviderDisplayInfo.TooltipText = ???
            translationProviderDisplayInfo.TranslationProviderIcon = PluginResources.favicon;
            return(translationProviderDisplayInfo);
        }
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            TranslationProviderDisplayInfo info = new TranslationProviderDisplayInfo();
            MtTranslationOptions options = new MtTranslationOptions(translationProviderUri);
            info.TranslationProviderIcon = PluginResources.my_icon;

            if (options.SelectedProvider == MtTranslationOptions.ProviderType.GoogleTranslate)
            {
                info.Name = PluginResources.Google_NiceName;
                info.TooltipText = PluginResources.Google_Tooltip;
                info.SearchResultImage = PluginResources.my_image;
            }
            else if (options.SelectedProvider == MtTranslationOptions.ProviderType.MicrosoftTranslator)
            {
                info.Name = PluginResources.Microsoft_NiceName;
                info.TooltipText = PluginResources.Microsoft_Tooltip;
                info.SearchResultImage = PluginResources.microsoft_image;
            }
            else
            {
                info.Name = PluginResources.Plugin_NiceName;
                info.TooltipText = PluginResources.Plugin_Tooltip;
            }
            return info;
        }
        public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState)
        {
            TranslationProviderDisplayInfo info = new TranslationProviderDisplayInfo
            {
                 Name = "Controlled MT Providers",
                 TooltipText = "Controlled MT Providers",
                 TranslationProviderIcon = PluginResources.icon
            };

            return info;
        }