C# Class SubLib.Core.Translations

Allows to import translation subtitles into existing subtitles.
Show file Open project: GNOME/gnome-subtitles Class Usage Examples

Public Methods

Method Description
Clear ( Subtitles subtitles ) : void

Removes the entire translation from existing subtitles.

Import ( Subtitles subtitles, Subtitles translation, int timeBetweenSubtitles ) : void

Imports translated subtitles into existing subtitles.

Translations ( ) : SubLib.Core.Domain

Creates a new instance of the Translations class.

Private Methods

Method Description
AddExtraSubtitles ( Subtitles subtitles, Subtitles translation ) : void

Adds the number of subtitles that the translation has more than the original subtitles.

A gap between subtitles of SubtitleConstants.MinTimeBetweenSubtitles will be used.

AddExtraSubtitles ( Subtitles subtitles, Subtitles translation, int timeBetweenSubtitles ) : void

Adds the number of subtitles missing comparing to the translation.

CopyTranslation ( Subtitles subtitles, Subtitles translation ) : void

Copies the translation to the subtitles.

Method Details

Clear() public method

Removes the entire translation from existing subtitles.
public Clear ( Subtitles subtitles ) : void
subtitles SubLib.Core.Domain.Subtitles The subtitles to remove the translation from.
return void

Import() public method

Imports translated subtitles into existing subtitles.
public Import ( Subtitles subtitles, Subtitles translation, int timeBetweenSubtitles ) : void
subtitles SubLib.Core.Domain.Subtitles The subtitles to import the translation to.
translation SubLib.Core.Domain.Subtitles The translated subtitles.
timeBetweenSubtitles int
return void

Translations() public method

Creates a new instance of the Translations class.
public Translations ( ) : SubLib.Core.Domain
return SubLib.Core.Domain