Issue on backlog: Country string mismatch between login/signup_form.php and user/editlib.php

Issue on backlog: Country string mismatch between login/signup_form.php and user/editlib.php

by Ravi Murugesan -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Testers

Hello everyone,

I recently noticed that in login/signup_form.php (which produces the user registration page), the following line appears:

$mform->addElement('select', 'country', get_string('country'), $country);

The default text string for 'country' is, simply, Country. An admin who wants to clarify what 'Country' means (eg, country of residence or citizenship?) can use Language Customisation to change the 'country' string.

However, in user/editlib.php (which produces the edit profile page), the get_string element contains 'selectacountry' instead of 'country':

$mform->addElement('select', 'country', get_string('selectacountry'), $choices, $purpose);

So any Language Customisation made to the 'country' string will not be reflected in the edit profile form, which will continue to have the string for 'selectacountry', which is 'Select a country'.

Suggested solution: I think the get_string() element should be consistent in signup_form.php and editlib.php, so I'd like to suggest that the above line in user/editlib.php be changed to:

$mform->addElement('select', 'country', get_string('country'), $choices, $purpose);

I have posted this issue on the Moodle Tracker: MDL-71594. I would welcome your comments or votes, or even better if you can come up with a patch!

Best wishes,

Ravi

Average of ratings: -