Some strings in Settings - Messages and Email Options could not be translated because t-functions not used for output.
To correct this just change the following function (add t-function for #title generation):
/**
* Helper function to build the settings form for the notification messages
*/
function _user_relationships_message_settings_form(&$form, $defaults = array()) {
foreach ($defaults as $key => $value) {
if (is_array($value)) {
$form[$key] = array(
'#type' => 'fieldset',
'#title' => t(ucfirst(str_replace('_',' ',$key))),
'#collapsible' => TRUE,
'#collapsed' => TRUE
);
_user_relationships_message_settings_form($form[$key], $value);
}
else {
$form["user_relationships_msg_{$key}"] = array(
'#type' => 'textfield',
'#title' => t(ucfirst(str_replace('_',' ',$key))),
'#default_value' => variable_get("user_relationships_msg_{$key}", $value)
);
}
}
}
Comments
Comment #1
jaydub commentedComment #2
jaydub commentedComment #3
avpadernoIt's not possible to translate strings that are not constant. Who wants to translate the module should know all the value got from
$keyswhich gets its value from the$defaultarray keys. I don't think it's possible.Comment #4
alex.k commented@jaydub, looks good thank you. Please commit when you have a moment.
@Kiam considering this is 5.x there aren't many new translations taking place for this version.
Comment #5
berdirSorry for pinging the participants.
Now that Drupal 7 is out, there is no support for Drupal 5 and the corresponding modules anymore. Therefore, I'm closing all old issues which are still open.
I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature is still needed or the bug still exists and open a new issue in that case.