1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/plugins/Installation/templates/getSystemCheckWidget.twig
Stefan Giehl 7c61ec7297 Make system check warning message translatable (#21632)
* Make system check warning message translatable

* add some new lines for better readability
2023-12-04 12:46:22 +01:00

45 خطوط
2.4 KiB
Twig

<div class="widgetBody system-check" vue-directive="CoreHome.Tooltips" vue-directive-value="{&quot;show&quot;: {&quot;delay&quot;: 200, &quot;duration&quot;: 100}}">
{% if not numErrors and not numWarnings %}
<p class="system-success"><span class="icon-ok"></span> {{ 'Installation_SystemCheckNoErrorsOrWarnings'|translate }}</p>
{% endif %}
{% if numErrors %}
<ul>
{% for thisResult in errors %}
{% set checkItemMessages = '' %}
{% if thisResult.getLongErrorMessage is empty and thisResult.getItems()|length > 1 %}
{% for checkItem in thisResult.getItems() %}
{% if checkItem.getStatus is same as('warning') %}
{% set checkItemMessages = checkItemMessages ~ checkItem.getComment() ~ "\n" %}
{% endif %}
{% endfor %}
{% endif %}
<li title="{{ checkItemMessages|default(thisResult.getLongErrorMessage)|default(thisResult.getItems()[0].getComment())|preg_replace('/<br.*?>/', "\n")|striptags }}" class="system-check-widget-error"><span class="icon-error"></span> {{ thisResult.getLabel }}</li>
{% endfor %}
</ul>
{% endif %}
{% if numWarnings %}
<ul>
{% for thisResult in warnings %}
{% set checkItemMessages = '' %}
{% if thisResult.getLongErrorMessage is empty and thisResult.getItems()|length > 1 %}
{% for checkItem in thisResult.getItems() %}
{% if checkItem.getStatus is same as('warning') %}
{% set checkItemMessages = checkItemMessages ~ checkItem.getComment() ~ "\n" %}
{% endif %}
{% endfor %}
{% endif %}
<li title="{{ checkItemMessages|default(thisResult.getLongErrorMessage)|default(thisResult.getItems()[0].getComment())|preg_replace('/<br.*?>/', "\n")|striptags }}" class="system-check-widget-warning"><span class="icon-warning"></span> {{ thisResult.getLabel }}</li>
{% endfor %}
</ul>
{% endif %}
{% if numErrors or numWarnings %}
<p>
<br />
<a href="{{ linkTo({'module': 'Installation', 'action': 'systemCheckPage'}) }}"
>{{ 'Installation_SystemCheckViewFullSystemCheck'|translate }}</a>
</p>
{% endif %}
</div>