<commit_before>Ext.namespace('ui','ui.cmp','ui.cmp._EditorConf');

//------------------------------------------------------------------------------
// EditorConf Win internals

// EditorConf Win-Menu template
ui.cmp._EditorConf.tplMenu = new Ext.XTemplate(
    '<tpl for=".">',
        '<div class="menu-wrap" id="tplMenu-{id}">',
            '<div class="menu {card}"></div>',
            '<span>{label}</span>',
        '</div>',
    '</tpl>'
);
ui.cmp._EditorConf.tplMenu.compile();

// EditorConf Win-Menu items definition for EN
ui.cmp._EditorConf.menuDefEn = [
    ['1', 'card1', _('Main')],
    ['4', 'card4', _('Module "Files with error"')],
    ['6', 'card6', _('Module "All files"')]
];

// EditorConf Win-Menu items definition for Non-EN
ui.cmp._EditorConf.menuDefNonEn = [
    ['1', 'card1', _('Main')],
    ['2', 'card2', _('Module "Files need translate"')],
    ['3', 'card3', _('Module "Files need update"')],
    ['4', 'card4', _('Module "Files with error"')],
    ['5', 'card5', _('Module "Files need reviewed"')],
    ['6', 'card6', _('Module "All files"')]
];

// EditorConf Win-Menu items store
ui.cmp._EditorConf.menuStore = new Ext.data.SimpleStore({
    id     : 0,
    fields : [
        { name : 'id'},
        { name : 'card'},
        { name : 'label'}
    ]
});

// EditorConf Win-Menu view
ui.cmp._EditorConf.viewMenu = Ext.extend(Ext.DataView,
{
    id           : 'conf-menu-view',
    tpl          : ui.cmp._EditorConf.tplMenu,
    singleSelect : true,
    overClass    : 'x-view-over',
    itemSelector : 'div.menu-wrap',
    store        : ui.cmp._EditorConf.menuStore,
    listeners : {
        selectionchange : function(view)
        {
            var r = view.getSelectedRecords();
            Ext.getCmp('confCard').layout.setActiveItem('conf-card-' + r[0].data.id);
        }
    }
});

// doc-editor Theme datastore
ui.cmp._EditorConf.themeStore = new Ext.data.SimpleStore({
    fields : ['themeFile', {
        name : 'themeName',
        type : 'string'
    }],
    data : [
        ['themes/ExtJsThemes/black/css/xtheme-black.css',                     _('Black')],
        ['themes/empty.css',                                                  _('Default')],
        ['themes/ExtJsThemes/darkgray/css/xtheme-darkgray.css',               _('DarkGray')],
        ['js/ExtJs/resources/css/xtheme-gray.css',                            _('Gray')],
        ['themes/ExtJsThemes/gray-extend/css/xtheme-gray-extend.css',         _('Gray Extend')],
        ['themes/ExtJsThemes/indigo/css/xtheme-indigo.css',                   _('Indigo')],
        ['themes/ExtJsThemes/midnight/css/xtheme-midnight.css',               _('Midnight')],
        ['themes/ExtJsThemes/olive/css/xtheme-olive.css',                     _('Olive')],
        ['themes/ExtJsThemes/purple/css/xtheme-purple.css',                   _('Purple')],
        ['themes/ExtJsThemes/silverCherry/css/xtheme-silverCherry.css',       _('SilverCherry')],
        ['themes/ExtJsThemes/ubuntu_human/css/xtheme-human.css',              _('Ubuntu Human')]
    ]
});

// doc-editor UI Lang datastore
ui.cmp._EditorConf.uiLangStore = new Ext.data.SimpleStore({
    fields : ['uiLang', {
        name : 'uiLangName',
        type : 'string'
    }],
    data : [
        ['default', _('Default language, if available')],
        ['en',      _('English')],
        ['fr',      _('French')],
        ['ru',      _('Russian')],
        ['es',      _('Spanish')]
    ]
});

ui.cmp._EditorConf.CommitChange = new Ext.util.DelayedTask(function()
{
    new ui.task.UpdateConfTask({
        module   : this.module,
        itemName : this.itemName,
        value    : this.getValue()
    });<commit_msg>Added Arabic language as an option<commit_after>Ext.namespace('ui','ui.cmp','ui.cmp._EditorConf');

//------------------------------------------------------------------------------
// EditorConf Win internals

// EditorConf Win-Menu template
ui.cmp._EditorConf.tplMenu = new Ext.XTemplate(
    '<tpl for=".">',
        '<div class="menu-wrap" id="tplMenu-{id}">',
            '<div class="menu {card}"></div>',
            '<span>{label}</span>',
        '</div>',
    '</tpl>'
);
ui.cmp._EditorConf.tplMenu.compile();

// EditorConf Win-Menu items definition for EN
ui.cmp._EditorConf.menuDefEn = [
    ['1', 'card1', _('Main')],
    ['4', 'card4', _('Module "Files with error"')],
    ['6', 'card6', _('Module "All files"')]
];

// EditorConf Win-Menu items definition for Non-EN
ui.cmp._EditorConf.menuDefNonEn = [
    ['1', 'card1', _('Main')],
    ['2', 'card2', _('Module "Files need translate"')],
    ['3', 'card3', _('Module "Files need update"')],
    ['4', 'card4', _('Module "Files with error"')],
    ['5', 'card5', _('Module "Files need reviewed"')],
    ['6', 'card6', _('Module "All files"')]
];

// EditorConf Win-Menu items store
ui.cmp._EditorConf.menuStore = new Ext.data.SimpleStore({
    id     : 0,
    fields : [
        { name : 'id'},
        { name : 'card'},
        { name : 'label'}
    ]
});

// EditorConf Win-Menu view
ui.cmp._EditorConf.viewMenu = Ext.extend(Ext.DataView,
{
    id           : 'conf-menu-view',
    tpl          : ui.cmp._EditorConf.tplMenu,
    singleSelect : true,
    overClass    : 'x-view-over',
    itemSelector : 'div.menu-wrap',
    store        : ui.cmp._EditorConf.menuStore,
    listeners : {
        selectionchange : function(view)
        {
            var r = view.getSelectedRecords();
            Ext.getCmp('confCard').layout.setActiveItem('conf-card-' + r[0].data.id);
        }
    }
});

// doc-editor Theme datastore
ui.cmp._EditorConf.themeStore = new Ext.data.SimpleStore({
    fields : ['themeFile', {
        name : 'themeName',
        type : 'string'
    }],
    data : [
        ['themes/ExtJsThemes/black/css/xtheme-black.css',                     _('Black')],
        ['themes/empty.css',                                                  _('Default')],
        ['themes/ExtJsThemes/darkgray/css/xtheme-darkgray.css',               _('DarkGray')],
        ['js/ExtJs/resources/css/xtheme-gray.css',                            _('Gray')],
        ['themes/ExtJsThemes/gray-extend/css/xtheme-gray-extend.css',         _('Gray Extend')],
        ['themes/ExtJsThemes/indigo/css/xtheme-indigo.css',                   _('Indigo')],
        ['themes/ExtJsThemes/midnight/css/xtheme-midnight.css',               _('Midnight')],
        ['themes/ExtJsThemes/olive/css/xtheme-olive.css',                     _('Olive')],
        ['themes/ExtJsThemes/purple/css/xtheme-purple.css',                   _('Purple')],
        ['themes/ExtJsThemes/silverCherry/css/xtheme-silverCherry.css',       _('SilverCherry')],
        ['themes/ExtJsThemes/ubuntu_human/css/xtheme-human.css',              _('Ubuntu Human')]
    ]
});

// doc-editor UI Lang datastore
ui.cmp._EditorConf.uiLangStore = new Ext.data.SimpleStore({
    fields : ['uiLang', {
        name : 'uiLangName',
        type : 'string'
    }],
    data : [
        ['default', _('Default language, if available')],
        ['en',      _('English')],
        ['fr',      _('French')],
        ['ru',      _('Russian')],
        ['es',      _('Spanish')],
	    ['ar',      _('Arabic')],
    ]
});

ui.cmp._EditorConf.CommitChange = new Ext.util.DelayedTask(function()
{
    new ui.task.UpdateConfTask({
        module   : this.module,
        itemName : this.itemName,
        value    : this.getValue()
    });
{'fraction_non_alphanumeric': 0.20506943508156936, 'fraction_numerical': 0.005393016044222732, 'mean_word_length': 2.0426579163248566, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1967259', 'n_tokens_mistral': 2449, 'n_tokens_neox': 2409, 'n_words': 403}