← Back to team overview

mahara-contributors team mailing list archive

[Bug 557873] [NEW] Configure Site > Site options > Anti-spam needs to show translated strings.

 

Public bug reported:

Now we can see only English pull-down on "Configure Site > Site options > Anti-spam".
So we needs to show translated strings in pull-down by the following modification.

Program: lib/antispam.php
Line: 51

[before]
function available_spam_traps() {
    $results = array();
    $handle = opendir(get_config('docroot') . 'lib/antispam');
    while ($file = readdir($handle)) {
        preg_match("/(.+)SpamTrap\.php/", $file, $name);
        if ($name) {
            $results[strtolower($name[1])] = $name[1];
        }
    }
    return $results;
}
[after]
function available_spam_traps() {
    $results = array();
    $handle = opendir(get_config('docroot') . 'lib/antispam');
    while ($file = readdir($handle)) {
        preg_match("/(.+)SpamTrap\.php/", $file, $name);
        if ($name) {
            $results[strtolower($name[1])] = get_string(strtolower($name[1]), 'admin');
        }
    }
    return $results;
}

** Affects: mahara
     Importance: Undecided
         Status: New

-- 
Configure Site > Site options > Anti-spam needs to show translated strings.
https://bugs.launchpad.net/bugs/557873
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: New

Bug description:
Now we can see only English pull-down on "Configure Site > Site options > Anti-spam".
So we needs to show translated strings in pull-down by the following modification.

Program: lib/antispam.php
Line: 51

[before]
function available_spam_traps() {
    $results = array();
    $handle = opendir(get_config('docroot') . 'lib/antispam');
    while ($file = readdir($handle)) {
        preg_match("/(.+)SpamTrap\.php/", $file, $name);
        if ($name) {
            $results[strtolower($name[1])] = $name[1];
        }
    }
    return $results;
}
[after]
function available_spam_traps() {
    $results = array();
    $handle = opendir(get_config('docroot') . 'lib/antispam');
    while ($file = readdir($handle)) {
        preg_match("/(.+)SpamTrap\.php/", $file, $name);
        if ($name) {
            $results[strtolower($name[1])] = get_string(strtolower($name[1]), 'admin');
        }
    }
    return $results;
}





Follow ups

References