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)
      );
    }
  }
}
CommentFileSizeAuthor
#1 user_relationships.module.265642.patch1.15 KBjaydub

Comments

jaydub’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB
jaydub’s picture

Assigned: Unassigned » jaydub
avpaderno’s picture

Status: Needs review » Needs work

It's not possible to translate strings that are not constant. Who wants to translate the module should know all the value got from $keys which gets its value from the $default array keys. I don't think it's possible.

alex.k’s picture

Status: Needs work » Reviewed & tested by the community

@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.

berdir’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Sorry 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.