public TranslationProviderInfo GetTranslationProviderInfo(Uri translationProviderUri, string translationProviderState) { var innerFactory = TranslationProviderManager.GetTranslationProviderFactory(translationProviderUri.GetInnerProviderUri()); var info = innerFactory.GetTranslationProviderInfo(translationProviderUri.GetInnerProviderUri(), translationProviderState); return new TranslationProviderInfo() { Name = "Add Source TM", TranslationMethod = TranslationMethod.TranslationMemory }; }
public SourceTmConfiguration(Uri providerUri) { InitializeComponent(); _providerUri = providerUri.GetInnerProviderUri(); _isUsed = false; }
public bool SupportsTranslationProviderUri(Uri translationProviderUri) { return translationProviderUri.Scheme.StartsWith(RecordSourceTuTmTranslationProvider.ProviderUriScheme, StringComparison.InvariantCultureIgnoreCase) && FileBasedTranslationProviderUi.SupportsTranslationProviderUri(translationProviderUri.GetInnerProviderUri()); }
public ITranslationProvider CreateTranslationProvider(Uri translationProviderUri, string translationProviderState, ITranslationProviderCredentialStore credentialStore) { var fileBasedUri = translationProviderUri.GetInnerProviderUri(); var tProviderFactory = TranslationProviderManager.GetTranslationProviderFactory(fileBasedUri); var tProvider = tProviderFactory.CreateTranslationProvider(fileBasedUri, translationProviderState, credentialStore); return new RecordSourceTuTmTranslationProvider(tProvider); }
public TranslationProviderDisplayInfo GetDisplayInfo(Uri translationProviderUri, string translationProviderState) { var displayInfo = FileBasedTranslationProviderUi.GetDisplayInfo(translationProviderUri.GetInnerProviderUri(), translationProviderState); displayInfo.Name = "Record Source TU: " + displayInfo.Name; displayInfo.TooltipText = "Record Source TU: " + displayInfo.TooltipText; displayInfo.TranslationProviderIcon = PluginResources.Approved; return displayInfo; }