Interface IOutputTranslationMemory
Represents an output translation memory to be created within a migration project, to which the contents of one or more legacy translation memories (or language directions within such TMs) will be migrated. Holds settings required to create the new translation memory (InputLanguageDirections, TranslationMemoryCreator and Setup) and provides status information on the migration process.
Namespace: SdlSdl.LanguagePlatformTranslationMemoryApiUpgrade
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public interface IOutputTranslationMemory
Properties
ExpectedTUCount
Gets the estimated number of translation units this output translation memory will contains after the migration is complete. Can be used for progress notifications. This is
-1
if this number
is not available (or cannot easily be obtained).
Declaration
int ExpectedTUCount { get; }
Property Value
Type | Description |
---|---|
int |
InputLanguageDirections
The collection of input language direction data, from which content should be imported into the output translation memory.
Declaration
IInputLanguageDirectionDataCollection InputLanguageDirections { get; }
Property Value
Type | Description |
---|---|
IInputLanguageDirectionDataCollection |
Setup
Gets the setup information to be used for creating the output translation memory.
Declaration
ITranslationMemorySetupOptions Setup { get; }
Property Value
Type | Description |
---|---|
ITranslationMemorySetupOptions |
TranslationMemory
Gets the newly created translation memory. Returns null before the translation memory has been created.
Declaration
ITranslationMemory TranslationMemory { get; }
Property Value
Type | Description |
---|---|
ITranslationMemory |
TranslationMemoryCreator
Gets or sets a ITranslationMemoryCreator object, which should be usd for creating the output translation memory.
Declaration
ITranslationMemoryCreator TranslationMemoryCreator { get; set; }
Property Value
Type | Description |
---|---|
ITranslationMemoryCreator |
Methods
CreateTranslationMemory()
Creates the output translation memory if it has not been created yet.
Declaration
void CreateTranslationMemory()
Import(IInputLanguageDirectionData, EventHandler<ProgressEventArgs>)
Imports the content of the specified input language direction data sets into the output TM.
Declaration
void Import(IInputLanguageDirectionData languageDirectionData, EventHandler<ProgressEventArgs> progressEventHandler)
Parameters
Type | Name | Description |
---|---|---|
IInputLanguageDirectionData | languageDirectionData | The input language direction data to import. |
EventHandlerProgressEventArgs | progressEventHandler | Progress delegate; can be null. |
IsValid(out string)
Determines whether the output translation memory is valid. It returns false and a user-friendly localised error message if it is not.
Declaration
bool IsValid(out string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
string | errorMessage | error message |
Returns
Type | Description |
---|---|
bool | whether output translation memory valid |
PopulateSetup()
Automatically populate the setup information based on the language directions currently present in InputLanguageDirections.
This will reset any setup information in the output translation memory that is currently present.
Declaration
void PopulateSetup()
Process(EventHandler<ProgressEventArgs>)
Creates the output translation memory and import all content.
Declaration
void Process(EventHandler<ProgressEventArgs> progressEventHandler)
Parameters
Type | Name | Description |
---|---|---|
EventHandlerProgressEventArgs | progressEventHandler | A delegate which can be used to monitor progress and to cancel the migration process. May be null. |
Remarks
This method assumes that all the input translation memories have been exported to TMX and will throw an exception if this is not the case.
Validate()
Validates whether this output translation memory is ready to be processed. Throws an xception if it is not.
Declaration
void Validate()