{if $queue_apps}

{_w('Installing the application','Installing applications',count($queue_apps))} {foreach $queue_apps as $item}{$item.name|string_format:'[`"%s"`]'}{if !$item@last}, {/if}{/foreach}

{/if}
{{if result}} {{if result.success}}

${result.success} {{if result.success_plural == 0}}{/literal}{_w('application successfully installed','applications successfully installed',1)}{literal} {{/if}}{{if result.success_plural == 1}}{/literal}{_w('application successfully installed','applications successfully installed',2)}{literal} {{/if}}{{if result.success_plural == 2}}{/literal}{_w('application successfully installed','applications successfully installed',5)}{literal} {{/if}}

{{/if}} {{if result.fail}}

${result.fail} {{if result.fail_plural == 0}}{/literal}{_w('application failed to install','applications failed to install',1)}{literal} {{/if}}{{if result.fail_plural == 1}}{/literal}{_w('application failed to install','applications failed to install',2)}{literal} {{/if}}{{if result.fail_plural == 2}}{/literal}{_w('application failed to install','applications failed to install',5)}{literal} {{/if}}

{{/if}} {{else}} {{if current_state.stage_status == 'error'}}

[`An error occurred during installation`]

{{html current_state.error}}

{{else}} {/literal}{if !empty($return_url)} {if empty($additional_updates)}

[`Finalizing the installation and redirecting back to the app...`]

{else}

[`Gathering information about available updates...`]

{/if} {else}{literal}

[`Installation has been successfully completed`]

{/literal}{/if}{literal} {{/if}} {{/if}} {/literal}{if !empty($return_url)}{literal} {{if result && result.success}} {/literal} {if empty($additional_updates)}

[`Installation completed`]

{else}

[`Gathering information about available updates...`]

{/if} {literal} {{/if}} {/literal}{/if}{literal}

${timestamp} [`Current version`]: x.x.x.x

${timestamp} [`New version`]: x.x.x.x

{{each stages}}

${$value.datetime} ${$value.stage_name.translate()} {{if $value.stage_status == 'heartbeat'}} {{if $value.stage_progress}} ${$value.stage_progress}%{{/if}} ${$value.stage_status.translate()} {{else}}{{if $value.stage_status == 'error'}} {{html $value.error}} {{else}} ${$value.stage_status.translate()} {{/if}} {{/if}}

{{/each}}

{{if apps.length>1}} {/literal}{_w('Installing the application','Installing applications',2)}{literal} {{else}} [`Installing the application`] {{/if}} {{each(app_index, app_slug) apps}}${'[`"%s"`]'.replace(/%s/,app_slug.slug.translate())}{{if app_index < apps.length - 1}}, {{/if}}{{/each}} {{if (state_class!=null)}}{{/if}}

{{each stages}}{{if ($value) && ($value.chunk_id)}}

${$value.datetime} ${$value.chunk_id.translate()} ${$value.stage_name.translate()} {{if $value.stage_status == 'heartbeat'}} {{if $value.stage_progress}} ${$value.stage_progress}%{{/if}} ${$value.stage_status.translate()} {{else}}{{if $value.stage_status == 'error'}} ${$value.stage_status.translate()} {{html $value.error}} {{else}} ${$value.stage_status.translate()} {{/if}} {{/if}}

{{/if}}{{/each}}