<commit_before>{% import '@SyliusUi/Macro/flags.html.twig' as flags %}

<div id="attributes">
    <h4 class="ui top attached large header">{{ 'sylius.ui.attributes'|trans }}</h4>
    <div class="ui attached segment">
        <div class="ui top attached tabular menu">
            {% set setLocales = [] %}
            {% for attributeValue in product.attributes %}
                {% if attributeValue.localeCode not in setLocales %}
                    {% set localeCode = attributeValue.localeCode %}
                    <a class="item{% if loop.first %} active {% endif %}" {% if loop.first %}{{ sylius_test_html_attribute('active') }}{% endif %} data-tab="{{ localeCode|sylius_locale_name }}" {{ sylius_test_html_attribute('tab', localeCode|sylius_locale_name) }}>{{ flags.fromLocaleCode(localeCode)}} {{ localeCode|sylius_locale_name }}</a>
                    {%  set setLocales = setLocales|merge([localeCode]) %}
                {% endif %}
            {% endfor %}
        </div>
        {% for locale in setLocales %}
            <div class="ui bottom attached tab segment{% if loop.first %} active{% endif %}" data-tab="{{ locale|sylius_locale_name }}" {{ sylius_test_html_attribute('tab', locale|sylius_locale_name) }}>
                <table class="ui very basic celled table">
                    <tbody>
                    {% for attributeValue in product.attributes|filter(attributeValue => attributeValue.localeCode == locale) %}
                        <tr>
                            <td class="five wide">
                                <strong class="gray text">{{ attributeValue.name }}</strong>
                            </td>
                            <td>
                                {% include [
                                    '@SyliusAdmin/Product/Show/Types/'~attributeValue.type~'.html.twig',
                                    '@SyliusAttribute/Types/'~attributeValue.type~'.html.twig',
                                    '@SyliusAdmin/Product/Show/Types/default.html.twig'
                                ] with {
                                    'attribute': attributeValue,
                                    'locale': configuration.request.locale,
                                    'fallbackLocale': configuration.request.defaultLocale
                                } %}
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        {% endfor %}
    </div>
</div><commit_msg>[UI][Admin] fix non translatable attributes on show product<commit_after>{% import '@SyliusUi/Macro/flags.html.twig' as flags %}

<div id="attributes">
    <h4 class="ui top attached large header">{{ 'sylius.ui.attributes'|trans }}</h4>
    <div class="ui attached segment">
        <div class="ui top attached tabular menu">
            {% set setLocales = [] %}
            {% for attributeValue in product.attributes %}
                {% if attributeValue.localeCode not in setLocales %}
                    {% set localeCode = attributeValue.localeCode %}
                    {% if attributeValue.localeCode is not null  %}
                        <a class="item{% if loop.first %} active {% endif %}" {% if loop.first %}{{ sylius_test_html_attribute('active') }}{% endif %} data-tab="{{ localeCode|sylius_locale_name }}" {{ sylius_test_html_attribute('tab', localeCode|sylius_locale_name) }}>{{ flags.fromLocaleCode(localeCode)}} {{ localeCode|sylius_locale_name }}</a>
                    {% else %}
                        <a class="item{% if loop.first %} active {% endif %}" {% if loop.first %}{{ sylius_test_html_attribute('active') }}{% endif %} data-tab="{{ 'global' }}" {{ sylius_test_html_attribute('tab', 'global') }}><i class="globe icon"></i></a>
                    {% endif %}
                    {%  set setLocales = setLocales|merge([localeCode]) %}
                {% endif %}
            {% endfor %}
        </div>
        {% for locale in setLocales %}
            {% set data_tab = (locale is not null ? locale|sylius_locale_name : 'global') %}
            <div class="ui bottom attached tab segment{% if loop.first %} active{% endif %}" data-tab="{{ data_tab }}" {{ sylius_test_html_attribute('tab', data_tab) }}>
                <table class="ui very basic celled table">
                    <tbody>
                    {% for attributeValue in product.attributes|filter(attributeValue => attributeValue.localeCode == locale) %}
                        <tr>
                            <td class="five wide">
                                <strong class="gray text">{{ attributeValue.name }}</strong>
                            </td>
                            <td>
                                {% include [
                                    '@SyliusAdmin/Product/Show/Types/'~attributeValue.type~'.html.twig',
                                    '@SyliusAttribute/Types/'~attributeValue.type~'.html.twig',
                                    '@SyliusAdmin/Product/Show/Types/default.html.twig'
                                ] with {
                                    'attribute': attributeValue,
                                    'locale': configuration.request.locale,
                                    'fallbackLocale': configuration.request.defaultLocale
                                } %}
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        {% endfor %}
    </div>
</div>
{'fraction_non_alphanumeric': 0.1325, 'fraction_numerical': 0.0007142857142857143, 'mean_word_length': 1.4926568758344458, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7663563', 'n_tokens_mistral': 1505, 'n_tokens_neox': 1368, 'n_words': 286}