<commit_before><?php
/**
* phpCan - http://idc.anavallasuiza.com/
*
* phpCan is released under the GNU Affero GPL version 3
*
* More information at license.txt
*/

defined('ANS') or die();

/*
 * function __ ($text, [$args = null], [$null = false], [$settings = array])
 *
 * return string
 */
function __ ($text, $args = null, $null = false, $settings = array())
{
    static $Gettext;

    if (!is_object($Gettext) || (is_array($settings) && isset($settings['language']))) {
        $Gettext = getGettextObject($args['language']);
        $text = is_object($Gettext) ? $Gettext->translate($text, $null) : $text;
    } else {
        $text = $Gettext->translate($text, $null);
    }

    if (is_null($args)) {
        return $text;
    } else if (is_array($args)) {
        return vsprintf($text, $args);<commit_msg>Fixed gettext load<commit_after><?php
/**
* phpCan - http://idc.anavallasuiza.com/
*
* phpCan is released under the GNU Affero GPL version 3
*
* More information at license.txt
*/

defined('ANS') or die();

/*
 * function __ ($text, [$args = null], [$null = false], [$settings = array])
 *
 * return string
 */
function __ ($text, $args = null, $null = false, $settings = array())
{
    static $Gettext;

    if (!is_object($Gettext) || (is_array($settings) && isset($settings['language']))) {
        $Gettext = getGettextObject($settings['language']);
        $text = is_object($Gettext) ? $Gettext->translate($text, $null) : $text;
    } else {
        $text = $Gettext->translate($text, $null);
    }

    if (is_null($args)) {
        return $text;
    } else if (is_array($args)) {
        return vsprintf($text, $args);
{'fraction_non_alphanumeric': 0.19111381618989653, 'fraction_numerical': 0.0012172854534388314, 'mean_word_length': 3.4075067024128685, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '112271', 'n_tokens_mistral': 554, 'n_tokens_neox': 539, 'n_words': 131}