<commit_before>/*
    A script that initializes l10n. This must be done before the consuming app
    is initialized because we want to have l10n set up so translations load
    correctly. A promise is exposed to be further exposed by core/init.

    - Uses the list of languages passed in by Zamboni and set on body to
      determine whether we support that locale / have a script for that locale.
    - Injects script tag for the locale file respective of the user's language.
    - If locale file 404s, then it falls back to en-US.
    - Falling back to en-US leads to trying to load en-US.js. If that fails,
      then we manually set window.navigator.l10n.
    - Injected script tag is a JS file that sets window.navigator.l10n with
      a locale obj populated with a script via .po files.
    - The promise resolves once the locale script loads (or errors).
*/
define('core/l10n_init',
    ['core/defer', 'core/l10n', 'core/z'],
    function(defer, l10n, z) {
    var languages;
    var bodyLangs = document.body.getAttribute('data-languages');
    if (bodyLangs) {
        languages = JSON.parse(bodyLangs);
    } else {
        languages = [
            'bg', 'bn-BD', 'ca', 'cs', 'da', 'de', 'el', 'en-US', 'es', 'eu',
            'fr', 'ga-IE', 'hr', 'hu', 'it', 'ja', 'ko', 'mk', 'nb-NO', 'nl',
            'pa', 'pl', 'pt-BR', 'ro', 'rtl', 'ru', 'sk', 'sq', 'sr',
            'sr-Latn', 'ta', 'tr', 'xh', 'zh-CN', 'zh-TW', 'zu', 'dbg'
        ];
    }

    function injectLocaleScript(l10nInitialized, locale) {
        // Inject script to load locale file that populates w.navigator.1l0n.<commit_msg>Make ar a default language<commit_after>/*
    A script that initializes l10n. This must be done before the consuming app
    is initialized because we want to have l10n set up so translations load
    correctly. A promise is exposed to be further exposed by core/init.

    - Uses the list of languages passed in by Zamboni and set on body to
      determine whether we support that locale / have a script for that locale.
    - Injects script tag for the locale file respective of the user's language.
    - If locale file 404s, then it falls back to en-US.
    - Falling back to en-US leads to trying to load en-US.js. If that fails,
      then we manually set window.navigator.l10n.
    - Injected script tag is a JS file that sets window.navigator.l10n with
      a locale obj populated with a script via .po files.
    - The promise resolves once the locale script loads (or errors).
*/
define('core/l10n_init',
    ['core/defer', 'core/l10n', 'core/z'],
    function(defer, l10n, z) {
    var languages;
    var bodyLangs = document.body.getAttribute('data-languages');
    if (bodyLangs) {
        languages = JSON.parse(bodyLangs);
    } else {
        languages = [
            'ar', 'bg', 'bn-BD', 'ca', 'cs', 'da', 'de', 'el', 'en-US', 'es',
            'eu', 'fr', 'ga-IE', 'hr', 'hu', 'it', 'ja', 'ko', 'mk', 'nb-NO',
            'nl', 'pa', 'pl', 'pt-BR', 'ro', 'rtl', 'ru', 'sk', 'sq', 'sr',
            'sr-Latn', 'ta', 'tr', 'xh', 'zh-CN', 'zh-TW', 'zu', 'dbg'
        ];
    }

    function injectLocaleScript(l10nInitialized, locale) {
        // Inject script to load locale file that populates w.navigator.1l0n.
{'fraction_non_alphanumeric': 0.1333538651062519, 'fraction_numerical': 0.012935016938712659, 'mean_word_length': 2.67420814479638, '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': '3662083', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1032, 'n_words': 408}