define('helpers/linkStatus', ['underscore', 'handlebars', 'utils/apitypes', 'utils/i18n'], function(_, Handlebars, Api, i18n) { 'use strict'; function linkStatus(status) { var s; if (status === Api.DownloadStatus.Online) s = '' + i18n.gettext('online') + ''; else if (status === Api.DownloadStatus.Offline) s = '' + i18n.gettext('offline') + ''; else s = '' + i18n.gettext('unknown') + ''; return new Handlebars.SafeString(s); } Handlebars.registerHelper('linkStatus', linkStatus); return linkStatus; });