<commit_before>{% set value = (value is null ? field.default : value) %}
{% set name = scope ~ field.name %}
{% set btnLabel = field.btnLabel is defined ? field.btnLabel : "PLUGIN_ADMIN.ADD_ITEM" %}

<div class="form-field grid pure-g">
    <div class="form-label block size-1-4 pure-u-1-4">
        <label>
            {% if field.help %}
            <span class="tooltip" data-asTooltip-position="w" title="{{ field.help|e|tu }}">{{ field.label|tu }}</span>
            {% else %}
            {{ field.label|tu }}
            {% endif %}
            {{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
        </label>
    </div>
    <div class="form-data block size-3-4 pure-u-3-4">
        <div class="form-list-wrapper {{ field.size }}" data-type="collection">
            <ul data-collection-holder="{{ name }}">
                {% if field.fields %}
                {% for key, val in value %}
                    {% set itemName = name ~ '.' ~ key %}
                    <li data-collection-item="{{ itemName }}" data-collection-key="{{ key }}">
                        {% for childName, child in field.fields %}
                            {% if childName starts with '.' %}
                                {% set childKey = childName|trim('.') %}
                                {% set childValue = val[childName[1:]] %}
                                {% set childName = itemName ~ childName %}
                            {% else %}
                                {% set childKey = childName %}
                                {% set childValue = data.value(scope ~ childName) %}
                                {% set childName = childName|replace({'*': key}) %}
                            {% endif %}
                            {% set child = child|merge({ name: childName }) %}

                            {% if child.type == 'key' %}<commit_msg>Fix help tooltip for list items<commit_after>{% set value = (value is null ? field.default : value) %}
{% set name = scope ~ field.name %}
{% set btnLabel = field.btnLabel is defined ? field.btnLabel : "PLUGIN_ADMIN.ADD_ITEM" %}

<div class="form-field grid pure-g">
    <div class="form-label block size-1-4 pure-u-1-4">
        <label>
            {% if field.help %}
            <span class="hint--bottom" data-hint="{{ field.help|e|tu }}">{{ field.label|tu }}</span>
            {% else %}
            {{ field.label|tu }}
            {% endif %}
            {{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
        </label>
    </div>
    <div class="form-data block size-3-4 pure-u-3-4">
        <div class="form-list-wrapper {{ field.size }}" data-type="collection">
            <ul data-collection-holder="{{ name }}">
                {% if field.fields %}
                {% for key, val in value %}
                    {% set itemName = name ~ '.' ~ key %}
                    <li data-collection-item="{{ itemName }}" data-collection-key="{{ key }}">
                        {% for childName, child in field.fields %}
                            {% if childName starts with '.' %}
                                {% set childKey = childName|trim('.') %}
                                {% set childValue = val[childName[1:]] %}
                                {% set childName = itemName ~ childName %}
                            {% else %}
                                {% set childKey = childName %}
                                {% set childValue = data.value(scope ~ childName) %}
                                {% set childName = childName|replace({'*': key}) %}
                            {% endif %}
                            {% set child = child|merge({ name: childName }) %}

                            {% if child.type == 'key' %}
{'fraction_non_alphanumeric': 0.16056857067649383, 'fraction_numerical': 0.0052645433008686494, 'mean_word_length': 1.3929471032745593, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6341832', 'n_tokens_mistral': 1086, 'n_tokens_neox': 978, 'n_words': 240}