<commit_before>﻿/// <reference path="../mz.ts" />

module mz {
    export interface I18nTranslate {
        ( claveIdioma: string, defaultValue?: string ): string;
    }

    export interface I18nTranslate {
        faltantes?: any;
        idioma?: any;
    }

    var mzLang = ( <any>mz ).mzLang || {};

    var idioma = globalContext.idioma = globalContext.idioma || {};

    var erroresEncontradosIdioma = {};

    export var translate: I18nTranslate = function ( claveIdioma: string, defaultValue?: string ) {
        if ( !( claveIdioma in idioma ) ) {
            if ( claveIdioma in mzLang )
                return idioma[claveIdioma] = mzLang[claveIdioma];
            if ( !( claveIdioma in erroresEncontradosIdioma ) ) {
                ( <any>mz )._debug && console.warn( 'ñ: ' + claveIdioma, defaultValue );
                erroresEncontradosIdioma[claveIdioma] = defaultValue || claveIdioma;
                idioma[claveIdioma] = defaultValue || claveIdioma;
            }
        }
        return idioma[claveIdioma];
    }

    translate.faltantes = erroresEncontradosIdioma;
    translate.idioma = idioma;

    globalContext["ñ"] = translate;
} 
<commit_msg>Translated I18n vars<commit_after>﻿/// <reference path="../mz.ts" />

module mz {
    export interface I18nTranslate {
        ( localeId: string, defaultValue?: string ): string;
    }

    export interface I18nTranslate {
        missing?: any;
        dictionary?: any;
    }

    var mzLang = ( <any>mz ).mzLang || {};

    var dictionary = globalContext.idioma = globalContext.idioma || {};

    var erroresEncontradosIdioma = {};

    export var translate: I18nTranslate = function ( localeId: string, defaultValue?: string ) {
        if ( !( localeId in dictionary ) ) {
            if ( localeId in mzLang )
                return dictionary[localeId] = mzLang[localeId];
            if ( !( localeId in erroresEncontradosIdioma ) ) {
                ( <any>mz )._debug && console.warn( 'Missing translation: ' + localeId, defaultValue );
                erroresEncontradosIdioma[localeId] = defaultValue || localeId;
                dictionary[localeId] = defaultValue || localeId;
            }
        }
        return dictionary[localeId];
    }

    translate.missing = erroresEncontradosIdioma;
    translate.dictionary = dictionary;

    globalContext["ñ"] = translate;
} 

{'fraction_non_alphanumeric': 0.11505922165820642, 'fraction_numerical': 0.005922165820642978, 'mean_word_length': 2.4077809798270895, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4354884', 'n_tokens_mistral': 753, 'n_tokens_neox': 724, 'n_words': 151}