<commit_before>﻿@using System.Globalization
@using System.Text
@model Orchard.Localization.ViewModels.AddLocalizationViewModel
@{
    Style.Require("LocalizationAdmin");
}
<fieldset class="localization culture-selection">
    <label for="SelectedCulture">@T("Content Localization")</label>
    <div>
        @T("This is the <em>{0}</em> variation of {1}",
            BuildSelectedCultureList(Html.FieldIdFor(m => m.SelectedCulture), Model.MissingCultures, Model.SelectedCulture),
            Html.ItemEditLink(Model.Content))
    </div>
</fieldset>
@functions{
    private string BuildSelectedCultureList(string name, IEnumerable<string> siteCultures, string culture) {
        TagBuilder selectTag = new TagBuilder("select");
        selectTag.Attributes["id"] = name;
        selectTag.Attributes["name"] = name;

        foreach (var siteCulture in siteCultures) {
            TagBuilder optionTag = new TagBuilder("option");
            optionTag.Attributes["data-content-dir"] = CultureInfo.GetCultureInfo(siteCulture).TextInfo.IsRightToLeft ? "rtl" : "ltr";
            optionTag.Attributes["value"] = siteCulture;
            optionTag.SetInnerText(siteCulture);
            selectTag.InnerHtml += optionTag.ToString();
        }
        
        return selectTag.ToString();
    }
}<commit_msg>Making sure ID and name are different<commit_after>﻿@using System.Globalization
@using System.Text
@model Orchard.Localization.ViewModels.AddLocalizationViewModel
@{
    Style.Require("LocalizationAdmin");
}
<fieldset class="localization culture-selection">
    <label for="SelectedCulture">@T("Content Localization")</label>
    <div>
        @T("This is the <em>{0}</em> variation of {1}",
                     BuildSelectedCultureList(Html.FieldIdFor(m => m.SelectedCulture), Html.FieldNameFor(m => m.SelectedCulture), Model.MissingCultures, Model.SelectedCulture),
            Html.ItemEditLink(Model.Content))
    </div>
</fieldset>
@functions{
    private string BuildSelectedCultureList(string id, string name, IEnumerable<string> siteCultures, string culture) {
        TagBuilder selectTag = new TagBuilder("select");
        selectTag.Attributes["id"] = id;
        selectTag.Attributes["name"] = name;

        foreach (var siteCulture in siteCultures) {
            TagBuilder optionTag = new TagBuilder("option");
            optionTag.Attributes["data-content-dir"] = CultureInfo.GetCultureInfo(siteCulture).TextInfo.IsRightToLeft ? "rtl" : "ltr";
            optionTag.Attributes["value"] = siteCulture;
            optionTag.SetInnerText(siteCulture);
            selectTag.InnerHtml += optionTag.ToString();
        }
        
        return selectTag.ToString();
    }
}
{'fraction_non_alphanumeric': 0.12411742846525456, 'fraction_numerical': 0.0014864362690449647, 'mean_word_length': 3.539629005059022, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2563656', 'n_tokens_mistral': 738, 'n_tokens_neox': 724, 'n_words': 140}