<commit_before>(function() {
    var fr_FR = obviel.i18n.create_translation_source(
        {'Hello world!': 'Bonjour monde!'});
    obviel.i18n.register_translation('app', 'fr_FR', fr_FR);

    $(document).ready(function() {
        // will not be translated as no locale has yet been set
        $('#untranslated').text(_("Hello world!"));
        
        // now set the locale and the domain
        obviel.i18n.set_locale('fr_FR', 'app');
        // this will be translated
        $('#translated').text(_("Hello world!"));<commit_msg>fix to use new API.<commit_after>(function() {
    var fr_FR = obviel.i18n.create_translation_source(
        {'Hello world!': 'Bonjour monde!'});
    obviel.i18n.register_translation('fr_FR', fr_FR, 'app');

    $(document).ready(function() {
        // will not be translated as no locale has yet been set
        $('#untranslated').text(_("Hello world!"));
        
        // now set the locale and the domain
        obviel.i18n.set_locale('fr_FR', 'app');
        // this will be translated
        $('#translated').text(_("Hello world!"));
{'fraction_non_alphanumeric': 0.16114180478821363, 'fraction_numerical': 0.011049723756906077, 'mean_word_length': 2.854609929078014, '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': '6781424', 'n_tokens_mistral': 335, 'n_tokens_neox': 326, 'n_words': 83}