The problem is that blank lines in strings get doubled (one becomes two) every time you open the language editor, and then get saved into the language file each time you save. The result for language translators was that longish strings (such as the confirmation email) keep doubling and doubling until they become hundreds of lines long.
To check if it affects you, open moodle.php of your language in a text editor and scroll down to, say, 'emailconfirmation'.
I've just fixed this bug in CVS - it seems to work OK in the tests I did on a Windows machine using Dutch files.
I'd appreciate more testing and even better, fixed checkins for languages that may have this problem. I'll be fixing anything I come across as I get time.
Thanks!
Hi Martin,
I have a problem with the emailconfirmation.
When a new user is announced he gets a email to confirm tha account. In these mail is only the firstname displayed.
The lastname is missing there. Have a look at my /lang/de/moodle.php:
$string['emailconfirmation'] = 'Guten Tag $a->firstname $a->lastname,
unter Verw.......";
You can see that there is the variable "$a->lastname" . I don't know where is the error.
The database field "lastname" is filled correctly.
I hope you can help me.
With kind regards
Sven
It should be
$string['emailconfirmation'] = 'Guten Tag $a->firstname,
unter Verwendung Ihrer ...
I fixed it in CVS, so tomorow it should be in the downloadable de lang pack.
can you explain why you deleted this? I think I added this string, but I don't know why it must be deleted.
I tested it on my system. In both cases only the Firstname is printed in the mail. Your tipp seem not to be the solution
Ralf
hallo ralf,
erst treffen wir uns im deutschen forum und jetzt auch noch hier :~)
es ist wohl nun doch ein bug - oder ?
ich habe es mit unterschiedlichen installationen getestet. immer das gleiche ergebnis. ich würde es auch im source-code ändern. aber bei den eingriffen, die ich bisher gemacht habe, verbaue ich mir langsam die updatefähigkeit.
Vielleicht hat ja doch noch jemand eine lösung.
schönen abend noch
mfg sven
in this forum we write in english. Then other user can read the text when they have the same problem.
I change in the next day the german conformation text so that we didn't use a name field.
Ralf
(from moodlelib.php)
}
/**
* Send email to specified user with confirmation text and activation link.
*
* @uses $CFG
* @param user $user A {@link $USER} object
* @return boolean|string Returns "true" if mail was sent OK, "emailstop" if email
* was blocked by user and "false" if there was another sort of error.
*/
function send_confirmation_email($user) {
global $CFG;
$site = get_site();
$from = get_admin();
$data->firstname = $user->firstname;
$data->sitename = $site->fullname;
$data->link = $CFG->wwwroot .'/login/confirm.php?p='. $user->secret .'&s='. $user->username;
$data->admin = fullname($from) .' ('. $from->email .')';
$message = get_string('emailconfirmation', '', $data);
$subject = get_string('emailconfirmationsubject', '', $site->fullname);
$messagehtml = text_to_html($message, false, false, true);
return email_to_user($user, $from, $subject, $message, $messagehtml);
}
I don't speak php. So I don't understood the content of this code.
I think the code should be changed that the confirmation text can be used with firtsname and last name of the user.
An alternative is to change the german text, that we didn't use a name field. That is not the best solution, but I can accept it.
Ralf
Hi Koen,
here a suggestion. It's a quick and dirty - solution but I can't wait for a bug fixing:
function send_confirmation_email($user) {
global
With kind regards
Sven
$site = get_site();
$from = get_admin();
$user_address= $user->firstname." ".$user->lastname;
$data->firstname = $user_address;
...
}