<commit_before>﻿using System.Text.RegularExpressions;
using System.Globalization;

using UnityEngine;
using ColossalFramework.Globalization;

namespace BuildingThemes.GUI
{
    public enum Category
    {
        None = -1,
        ResidentialLow = 0,
        ResidentialHigh,
        CommercialLow,
        CommercialHigh,
        Industrial,
        Farming,
        Forestry,
        Oil,
        Ore,
        Office
    }

    public class BuildingItem
    {
        private string m_displayName;
        private string m_steamID;
        private string m_level = "-";
        private string m_size = "-";

        public BuildingInfo prefab;
        public Configuration.Building building;

        public bool included
        {
            get { return building != null && (!building.isBuiltIn || building.include); }
        }

        public string name
        {
            get
            {
                if (prefab != null) return prefab.name;
                if (building != null) return building.name;
                return string.Empty;
            }
        }

        public string displayName
        {
            get
            {
                if (m_displayName != null) return m_displayName;

                m_displayName = Locale.GetUnchecked("BUILDING_TITLE", name);
                if (m_displayName.StartsWith("BUILDING_TITLE"))
                {
                    m_displayName = name.Substring(m_displayName.IndexOf('.') + 1).Replace("_Data", "");
                }

                if (prefab == null) m_displayName += " (not loaded)";

                CleanDisplayName();

                return m_displayName;
            }
        }

        public Category category<commit_msg>add m_name field<commit_after>﻿using System.Text.RegularExpressions;
using System.Globalization;

using UnityEngine;
using ColossalFramework.Globalization;

namespace BuildingThemes.GUI
{
    public enum Category
    {
        None = -1,
        ResidentialLow = 0,
        ResidentialHigh,
        CommercialLow,
        CommercialHigh,
        Industrial,
        Farming,
        Forestry,
        Oil,
        Ore,
        Office
    }

    public class BuildingItem
    {
        private string m_name;
        private string m_displayName;
        private string m_steamID;
        private string m_level = "-";
        private string m_size = "-";

        public BuildingInfo prefab;
        public Configuration.Building building;

        public bool included
        {
            get { return building != null && (!building.isBuiltIn || building.include); }
        }

        public string name
        {
            get
            {
                if (m_name == null)
                {
                    if (prefab != null) m_name = prefab.name;
                    else if (building != null) m_name = building.name;
                    else m_name = string.Empty;
                }
                return m_name;
            }
        }

        public string displayName
        {
            get
            {
                if (m_displayName != null) return m_displayName;

                m_displayName = Locale.GetUnchecked("BUILDING_TITLE", name);
                if (m_displayName.StartsWith("BUILDING_TITLE"))
                {
                    m_displayName = name.Substring(m_displayName.IndexOf('.') + 1).Replace("_Data", "");
                }

                if (prefab == null) m_displayName += " (not loaded)";

                CleanDisplayName();

                return m_displayName;
            }
        }

        public Category category
{'fraction_non_alphanumeric': 0.08081088586503749, 'fraction_numerical': 0.0016662038322688142, 'mean_word_length': 1.4453496266123558, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7371207', 'n_tokens_mistral': 951, 'n_tokens_neox': 908, 'n_words': 213}