<% if (state === "success") { %>
<%- _t('dataset.sync.synced', { ranAt: ranAt }) %>.
<% } else if (state === "syncing") { %>
<%- _t('dataset.sync.syncing') %>...
<% } else if (state === "failure") { %>
<%- _t('dataset.sync.sync-failed') %>.
<% } %>
<% if (state === "success") { %>
<%- _t('dataset.sync.next', { runAt: runAt }) %>.
<% } else if (state === "syncing") { %>
<% /* There's no need to add extra text in this case. */ %>
<% } else if (errorCode || errorMessage) { %>
<%- _t('dataset.sync.error-code', { errorCode: errorCode }) %>: <%- errorMessage %>.
<% } %>
<% if (!fromExternalSource) { %>
<% if (state !== "syncing") { %>
.
<% } %>
<% } %>
<% if (state !== "syncing") { %>
.
<% } %>