Home Reference Source Repository
public class | source

DownloadTask

Extends:

src/core.js~APIFileTask → DownloadTask

Downloads the message translations from the Smartling server.

Constructor Summary

Public Constructor
public

constructor(options: object)

Initializes a new instance of the class.

Member Summary

Public Members
public

The pattern indicating the target path of the downloaded files (e.g.

public get

Value indicating whether to return the original string or an empty string when no translation is available.

public set

Sets a value indicating whether to return the original string or an empty string when no translation is available.

public

The list of locales to be downloaded.

public get

The desired format for the download.

public set

retrievalType(value: string): *

Sets the desired format for the download.

Method Summary

Public Methods
public

Downloads the message translations from the Smartling server.

Inherited Summary

From class FileTask
public static

Returns the file type corresponding to the specified file URI.

public

A value that uniquely identifies the file.

Public Constructors

public constructor(options: object) source

Initializes a new instance of the class.

Override:

FileTask#constructor

Params:

NameTypeAttributeDescription
options object
  • optional

An object specifying values used to initialize this instance.

Public Members

public filePattern: string source

The pattern indicating the target path of the downloaded files (e.g. path/to/i18n/{{locale}}.json).

public get includeOriginalStrings: boolean source

Value indicating whether to return the original string or an empty string when no translation is available.

public set includeOriginalStrings(value: boolean): * source

Sets a value indicating whether to return the original string or an empty string when no translation is available.

public locales: string[] source

The list of locales to be downloaded.

public get retrievalType: string source

The desired format for the download.

public set retrievalType(value: string): * source

Sets the desired format for the download.

Public Methods

public run(): Promise source

Downloads the message translations from the Smartling server.

Return:

Promise

Completes when the message translations have been downloaded.