<commit_before>var ActionTypes = require('butter-component-action-types')

function arrayToi18nHash(a) {
    return a.reduce((a, c) => {
        a[c] = c;
        return a;
    }, {});
}

export default {
    "tabs": [{
        title: "General",
        id: "general",
        items: [{
            id: "activateTorrentCollection",
            icon: "collections_bookmark",
            title: "Torrent Collection",
            helper: "Display a view with your Torrent Collection",
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "activateWatchlist",
            icon: "remove_red_eye",
            title: "Watchlist",
            helper: "Display a view with your Watchlist",
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "activateRandomize",
            icon: "shuffle",
            title: "Randomize Button",
            helper: "Display a button to select a Random Movie in the Current View",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "movies_quality",
            icon: "sort",
            title: "Content Quality",
            helper: "Only show content in this quality",
            advanced: true,
            action: {
                type: ActionTypes.DROPDOWN,
                options: arrayToi18nHash(["all", "1080p", "720p"])
            }
        }, {
            id: "moviesShowQuality",
            icon: "high_quality",
            title: "Show Quality",
            helper: "Display Content Quality in List view",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "alwaysFullscreen",
            icon: "fullscreen",
            title: "Fullscreen",
            helper: "Always start playback in FullScreen mode",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "playNextEpisodeAuto",
            icon: "queue_play_next",
            title: "Play Next",
            helper: "Automatically play next Episode",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "connectionLimit",
            icon: "settings_applications",
            title: "Connection Limit",
            helper: "Limit the amount of Outbound Connection Butter will open",
            advanced: true,
            action: {
                type: ActionTypes.TEXT
            }
        }, {
            id: "streamPort",
            icon: "settings_applications",
            title: "Stream Port",
            helper: "Port to stream on, randomlly choosen if 0",
            advanced: true,
            action: {
                type: ActionTypes.TEXT
            }
        }, {
            id: "overallRatio",
            icon: "settings_applications",
            title: "Overall Ratio",
            helper: "Downloaded so far:",
            advanced: true,
            action: {
                type: ActionTypes.TEXT
            }
        }, {
            id: "cache-directory",
            icon: "folder",
            title: "Cache Directory",
            helper: "Open the Directory where Butter keeps it's Cache",
            advanced: true,
            action: {
                type: ActionTypes.BUTTON,
                title: "Open"
            }
        }, {
            id: "deleteTmpOnClose",
            icon: "delete",
            title: "Clear Cache",
            helper: "Delete temp folder after closing the App",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }]
    }, {
        title: "Interface",
        id: "interface",
        items: [{
            icon: "collections_bookmark",
            title: "Torrent Collection",
            helper: "Display a view with your Torrent Collection",
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            icon: "folder",
            title: "Cache Directory",
            helper: "Open the Directory where Butter keep it's cache",
            action: {
                type: ActionTypes.BUTTON,
                title: "Open"
            }
        }, {
            icon: "format_paint",
            title: "Theme",
            helper: "Select a different Look&Feel for the App",
            action: {
                type: ActionTypes.DROPDOWN,
                options: arrayToi18nHash(["dark", "pink"]),
                apply: (theme) =>
                    (document.getElementById('root').className = `theme-${theme}`)
            }
        }, {
            icon: "location_on",
            title: "IP Adress",
            helper: "Set this machine's IP Adress",
            action: {
                type: ActionTypes.TEXT
            }
        }]
    }, {
        title: "Subtitles",
        id: "subtitles",
        items: []
    }, {
        title: "Extensions",
        id: "extensions",
        items: []
    }, {
        title: "Providers",
        id: "providers",
        items: []
    }],
    settings: new Object({
        set: function () {console.log(arguments)},
        get: function () {return this[arguments[0]]},
        "projectName": "Butter",
        "projectUrl": "http://butterproject.org",
        "projectTwitter": "butterproject",
        "projectFacebook": "ButterProjectOrg",
        "projectGooglePlus": "ButterProject",
        "projectBlog": "http://blog.butterproject.org/",
        "projectForum": "https://www.reddit.com/r/ButterProject",
        "statusUrl": "https://status.butterproject.org",
        "changelogUrl": "https://github.com/butterproject/butter-desktop/commits/master",
        "issuesUrl": "https://github.com/butterproject/butter-desktop/issues",
        "sourceUrl": "https://github.com/butterproject/butter-desktop/",
        "commitUrl": "https://github.com/butterproject/butter-desktop/commit",
        "updateKey": "-----<KEY>",
    "opensubtitles": {<commit_msg>test sections<commit_after>var ActionTypes = require('butter-component-action-types')

function arrayToi18nHash(a) {
    return a.reduce((a, c) => {
        a[c] = c;
        return a;
    }, {});
}

var i18n = {
    __: (a) => (a)
}

export default {
    "tabs": [{
        title: "General",
        id: "general",
        items: [{
            id: "activateTorrentCollection",
            icon: "collections_bookmark",
            title: "Torrent Collection",
            helper: "Display a view with your Torrent Collection",
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "activateWatchlist",
            icon: "remove_red_eye",
            title: "Watchlist",
            helper: "Display a view with your Watchlist",
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "activateRandomize",
            icon: "shuffle",
            title: "Randomize Button",
            helper: "Display a button to select a Random Movie in the Current View",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "movies_quality",
            icon: "sort",
            title: "Content Quality",
            helper: "Only show content in this quality",
            advanced: true,
            action: {
                type: ActionTypes.DROPDOWN,
                options: arrayToi18nHash(["all", "1080p", "720p"])
            }
        }, {
            id: "moviesShowQuality",
            icon: "high_quality",
            title: "Show Quality",
            helper: "Display Content Quality in List view",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "alwaysFullscreen",
            icon: "fullscreen",
            title: "Fullscreen",
            helper: "Always start playback in FullScreen mode",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "playNextEpisodeAuto",
            icon: "queue_play_next",
            title: "Play Next",
            helper: "Automatically play next Episode",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            id: "connectionLimit",
            icon: "settings_applications",
            title: "Connection Limit",
            helper: "Limit the amount of Outbound Connection Butter will open",
            advanced: true,
            action: {
                type: ActionTypes.TEXT
            }
        }, {
            id: "streamPort",
            icon: "settings_applications",
            title: "Stream Port",
            helper: "Port to stream on, randomlly choosen if 0",
            advanced: true,
            action: {
                type: ActionTypes.TEXT
            }
        }, {
            id: "overallRatio",
            icon: "settings_applications",
            title: "Overall Ratio",
            helper: "Downloaded so far:",
            advanced: true,
            action: {
                type: ActionTypes.TEXT
            }
        }, {
            id: "cache-directory",
            icon: "folder",
            title: "Cache Directory",
            helper: "Open the Directory where Butter keeps it's Cache",
            advanced: true,
            action: {
                type: ActionTypes.BUTTON,
                title: "Open"
            }
        }, {
            id: "deleteTmpOnClose",
            icon: "delete",
            title: "Clear Cache",
            helper: "Delete temp folder after closing the App",
            advanced: true,
            action: {
                type: ActionTypes.SWITCH
            }
        }]
    }, {
        title: "Interface",
        id: "interface",
        items: [{
            icon: "collections_bookmark",
            title: "Torrent Collection",
            helper: "Display a view with your Torrent Collection",
            action: {
                type: ActionTypes.SWITCH
            }
        }, {
            icon: "folder",
            title: "Cache Directory",
            helper: "Open the Directory where Butter keep it's cache",
            action: {
                type: ActionTypes.BUTTON,
                title: "Open"
            }
        }, {
            icon: "format_paint",
            title: "Theme",
            helper: "Select a different Look&Feel for the App",
            action: {
                type: ActionTypes.DROPDOWN,
                options: arrayToi18nHash(["dark", "pink"]),
                apply: (theme) =>
                    (document.getElementById('root').className = `theme-${theme}`)
            }
        }, {
            icon: "location_on",
            title: "IP Adress",
            helper: "Set this machine's IP Adress",
            action: {
                type: ActionTypes.TEXT
            }
        }]
    }, {
        title: "Subtitles",
        id: "subtitles",
        items: []
    }, {
        id: 'extensions',
        title: i18n.__('Extensions'),
        sections: [{
            id: 'remote-control',
            title: i18n.__('Remote Control'),
            advanced: true,
            items: [{
                id: 'settingsIpAddress',
                title: i18n.__('IP Address'),
                helper: i18n.__('Set this machine\'s IP Address'),
                icon: 'location_on',
                action: {
                    type: ActionTypes.TEXT,
                }
            }, {
                id: 'httpApiPort',
                title: i18n.__('%s Port', 'HTTP API'),
                helper: i18n.__('Port to use for %s', 'HTTP API'),
                icon: 'http',
                action: {
                    type: ActionTypes.NUMBER,
                }
            }, {
                id: 'httpApiUsername',
                title: i18n.__('%s Username', 'HTTP API'),
                helper: i18n.__('Username To use for %s', 'HTTP API'),
                icon: 'account_box',
                action: {
                    type: ActionTypes.TEXT,
                }
            }, {
                id: 'httpApiUsername',
                title: i18n.__('%s Username', 'HTTP API'),
                helper: i18n.__('Username To use for %s', 'HTTP API'),
                icon: 'account_box',
                action: {
                    type: ActionTypes.PASSWORD,
                }
            }, {
                id: 'qrCodeGen',
                title: i18n.__('QR Code'),
                helper: i18n.__('Generate Pairing QR Code'),
                icon: 'lock',
                action: {
                    type: ActionTypes.BUTTON,
                    title: i18n.__('Get Code')
                }
            }]
        }, {
            id: 'trakt-connected',
            title: 'Trakt.tv',
            showIf: (() => (App.Trakt.authenticated)),
            items: [{
                id: 'trakt-connected',
                title: i18n.__('You are currently connected to %s', 'Trakt.tv'),
                helper: i18n.__('%s connection state', 'Trakt.tv'),
                icon: 'verified_user',
                action: {
                    type: ActionTypes.BUTTON,
                    title: 'Disconnect Account'
                }
            }, {
                id: 'traktSyncOnStart',
                title: i18n.__('Sync on Start'),
                helper: i18n.__('Automatically sync %s on App Start', 'Trakt.tv'),
                icon: 'settings_applications',
                action: {
                    type: ActionTypes.SWITCH
                },
            }, {
                id: 'traktPlayback',
                title: i18n.__('Resume Playback'),
                helper: i18n.__('Restart your %s tracked media from where you left them', 'Trakt.tv'),
                icon: 'settings_applications',
                action: {
                    type: ActionTypes.SWITCH
                },
            }, {
                id: 'traktSync',
                title: i18n.__('Sync with %s', 'Trakt.tv'),
                helper: i18n.__('%s sync master switch', 'Trakt.tv'),
                icon: 'sync',
                action: {
                    type: ActionTypes.SWITCH
                },
            }]
        }, {
            id: 'trakt-not-connected',
            title: 'Trakt.tv',
            showIf: (() => (! App.Trakt.authenticated)),
            items: [{
                id: 'traktConnectTo',
                title: i18n.__('Connect to %s', 'Trakt.tv'),
                helper: i18n.__('Use OAuth to authenticate'),
                icon: 'insert_link',
                action: {
                    type: ActionTypes.BUTTON,
                    title: 'Connect'
                }
            }]
        }, {
            id: 'tvshowtime-connected',
            title: 'TVShow Time',
            showIf: (() => (App.TVShowTime.authenticated)),
            items: [{
                id: 'tvshowtime-connected',
                title: i18n.__('You are currently connected to %s', 'TVShow Time'),
                helper: i18n.__('%s connection state', 'TVShow Time'),
                icon: 'verified_user',
                action: {
                    type: ActionTypes.BUTTON,
                    title: 'Disconnect Account'
                }
            }]
        }, {
            id: 'tvshowtime-not-connected',
            title: 'TVShow Time',
            showIf: (() => (! App.TVShowTime.authenticated)),
            items: [{
                id: 'tvshowtime-connect',
                title: i18n.__('Connect to %s', 'TVShow Time'),
                helper: i18n.__('Use OAuth to authenticate'),
                icon: 'insert_link',
                action: {
                    type: ActionTypes.BUTTON,
                    title: 'Connect'
                }
            }]
        }, {
            id: 'opensubtitles-connected',
            title: 'Open Subtitles',
            showIf: (() => (Settings.opensubtitlesAuthenticated)),
            items: [{
                id: 'opensubtitles-connected',
                title: i18n.__('You are currently connected to %s', 'OpenSubtitles'),
                helper: i18n.__('%s connection state', 'OpenSubtitles'),
                icon: 'verified_user',
                action: {
                    type: ActionTypes.BUTTON,
                    title: 'Disconnect Account'
                }
            }, {
                id: 'opensubtitlesAutoUpload',
                title: i18n.__('Subtitle Upload'),
                helper: i18n.__('Automatically upload user-selected subtitles to %s', 'OpenSubtitles'),
                icon: 'verified_user',
                action: {
                    type: ActionTypes.BUTTON,
                    title: 'Disconnect Account'
                }
            }]
        }, {
            id: 'opensubtitles-not-connected',
            title: 'TVShow Time',
            showIf: (() => (! Settings.opensubtitlesAuthenticated)),
            items: [{
                id: 'opensubtitles-username',
                title: i18n.__('%s Username', 'OpenSubtitles'),
                helper: i18n.__('Username you use to connect to %s', 'OpenSubtitles'),
                icon: 'account_box',
                action: {
                    type: ActionTypes.TEXT,
                }
            }, {
                id: 'opensubtitles-password',
                title: i18n.__('%s Password', 'OpenSubtitles'),
                helper: i18n.__('Password you use to connect to %s', 'OpenSubtitles'),
                icon: 'lock',
                action: {
                    type: ActionTypes.PASSWORD,
                }
            }, {
                id: 'opensubtitles-connect',
                title: i18n.__('Connect to %s', 'OpenSubtitles'),
                helper: i18n.__('%s stores an encrypted hash of your password in your local database', 'Butter'),
                icon: 'link',
                action: {
                    type: ActionTypes.BUTTON,
                    title: 'Connect'
                }
            }]
        }]
    }, {
        title: "Providers",
        id: "providers",
        items: []
    }],
    settings: new Object({
        set: function () {console.log(arguments)},
        get: function () {return this[arguments[0]]},
        "projectName": "Butter",
        "projectUrl": "http://butterproject.org",
        "projectTwitter": "butterproject",
        "projectFacebook": "ButterProjectOrg",
        "projectGooglePlus": "ButterProject",
        "projectBlog": "http://blog.butterproject.org/",
        "projectForum": "https://www.reddit.com/r/ButterProject",
        "statusUrl": "https://status.butterproject.org",
        "changelogUrl": "https://github.com/butterproject/butter-desktop/commits/master",
        "issuesUrl": "https://github.com/butterproject/butter-desktop/issues",
        "sourceUrl": "https://github.com/butterproject/butter-desktop/",
        "commitUrl": "https://github.com/butterproject/butter-desktop/commit",
        "updateKey": "-----<KEY>",
    "opensubtitles": {
{'fraction_non_alphanumeric': 0.11949718069422172, 'fraction_numerical': 0.005483420412808442, 'mean_word_length': 1.2861873226111638, 'pattern_counts': {'":': 30, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5234241', 'n_tokens_mistral': 5202, 'n_tokens_neox': 4898, 'n_words': 1183}