Overview
The Sdl.Community.UsefulTips.Service is a service provider for updating the Useful Tips that are displayed in SDL Trados Studio 2019.
Add Sdl.Community.UsefulTips.Service to your project
Package Manager UI
1. In Solution Explorer, right-click References and choose Manage NuGet Packages
2. Choose nuget.org as the Package source, select the Browse tab, search for Sdl.Community.UsefulTips.Service, select that package in the list, and select Install:
3. Accept any license prompts.
Package Manager Console
1. Select the Tools > NuGet Package Manager > Package Manager Console menu command.
2. From the Package Manager Console, enter the command:
Install-Package Sdl.Community.
UsefulTips.Service -Version 1.1.5
Examples
The following example creates an instance of the TipsProvider and adds a new Tip for a single language (i.e. en).
using System.Collections.Generic;
using
Sdl.Community.UsefulTipsService;
using
Sdl.Community.UsefulTipsService.Model;
using
Sdl.Community.UsefulTipsService.Services;
namespace Sdl.Community.Example.Services
{
public class UsefulTipsService
{
public void AddUsefulTips()
{
var tipContexts = GetTipContexts();
var tipsProvider = new TipsProvider(new PathService());
tipsProvider.AddTips(tipContexts, "[My Plugin Name]");
}
private static List<TipContext> GetTipContexts()
{
var tipContexts = new List<TipContext>
{
new TipContext
{
LanguageId = "en",
Tips = new List<Tip>
{
new Tip
{
Category = "[the plugin name]",
Context = "[the Id associated wth the plugin View]",
Content = "[full path to the Markdown File]",
Title = "My Tip",
Description = "This is an awesome Tip",
DescriptionImage = "[full path to the image file]"
}
}
}
};
return tipContexts;
}
}
}
API
Model
public class TipContext
{
/// <summary>
/// The UI language Id supported by SDL Trados Studio [de, en, es, fr, it, ja, ko, ru, zh]
/// </summary>
public string LanguageId { get; set; }
/// <summary>
/// Tips available in the current language context
/// </summary>
public List<Tip> Tips { get; set; }
}
public class Tip
{
public string Id { get; set; }
/// <summary>
/// The title displayed in the 'Useful Tips' view part
/// </summary>
public string Title { get; set; }
/// <summary>
/// The description displayed in the 'Useful Tips' view part
/// </summary>
public string Description { get; set; }
/// <summary>
/// // The link text displayed in the 'Useful Tips' view part
/// </summary>
public string LinkText { get; set; }
/// <summary>
/// The View Id
/// </summary>
public string Context { get; set; }
/// <summary>
/// The category used to group the Tips; appropriate to the plugin or view name
/// </summary>
public string Category { get; set; }
/// <summary>
/// Full path to the icon
/// </summary>
public string Icon { get; set; }
/// <summary>
/// Full path to the description image that is displayed in the 'Useful Tips' view
/// </summary>
public string DescriptionImage { get; set; }
/// <summary>
/// Full path to the Markdown file that is loaded when the user clicks on the 'Link Text' link
/// </summary>
public string Content { get; set; }
public bool IsNew { get; set; }
public bool ShowOnWelcomeWizard { get; set; }
}
Methods