core/i18n.js
function translate(singular, plural) {
    if (!locales[currentLocale]) {
        read(currentLocale);
    }

    if (plural) {
        if (!locales[currentLocale][singular]) {
            locales[currentLocale][singular] = {
                'one': singular,
                'other': plural
            };
            write(currentLocale);
        }
    }

    if (!locales[currentLocale][singular]) {
        locales[currentLocale][singular] = singular;
        write(currentLocale);
    }
    return locales[currentLocale][singular];
}
function translate(singular, plural) {
    if (!locales[currentLocale]) {
        read(currentLocale);
    }

    if (plural) {
        if (!locales[currentLocale][singular]) {
            locales[currentLocale][singular] = {
                'one': singular,
                'other': plural
            };
            write(currentLocale);
        }
    }

    if (!locales[currentLocale][singular]) {
        locales[currentLocale][singular] = singular;
        write(currentLocale);
    }
    return locales[currentLocale][singular];
}
function translate ( singular , plural ) { if ( ! locales [ currentLocale ] ) { read ( currentLocale ) ; } if ( plural ) { if ( ! locales [ currentLocale ] [ singular ] ) { locales [ currentLocale ] [ singular ] = { 'one' : singular , 'other' : plural } ; write ( currentLocale ) ; } } if ( ! locales [ currentLocale ] [ singular ] ) { locales [ currentLocale ] [ singular ] = singular ; write ( currentLocale ) ; } return locales [ currentLocale ] [ singular ] ; }
read currentLocale file, translate a msg and write to fs if new QUI!!! metodo che usa currentLocale globale
read currentLocale file translate a msg and write to fs if new QUI!!! metodo che usa currentLocale globale