string translation

moshub - May 14, 2008 - 13:29
Project:E-Publish
Version:6.x-1.0-beta1
Component:Code
Category:feature request
Priority:critical
Assigned:Unassigned
Status:closed
Description

i want to translate the strings "Published in", "Next story" and "Previous story" into local language. I cannot find the strings in the drupal interface translator, which should i find these strings?

thanks

#1

Asif99 - May 21, 2008 - 12:11

I have same problem with Druapl 5 which is due to epublish.module. Next story/Previous story links are hard coded without using t(). I changed the following to fix it:

function theme_epublish_navigation($node, $eid) {
  if ($node->nid) {
    $output .= '<div class="epublish_navigation">';

$edition = epublish_get_edition($eid);
$publication = epublish_get_pub($edition->pid);
$sid = epublish_assign_section($edition);
$topics = epublish_section_topics($sid, $edition->eid);
  // Construct the breadcrumb:
$node->breadcrumb = array();
$node->breadcrumb[] = array('path' => "epublish/$publication->pid", 'title' => $publication->name);
$node->breadcrumb[] = array('path' => "epublish/$edition->pid/$edition->eid", 'title' => theme('epublish_edition_reference', $edition));
$node->breadcrumb[] = array('path' => "node/$node->nid", 'title' => $node->title);
menu_set_location($node->breadcrumb);

    if ($prev = epublish_prev($node, $topics)) {
$links[1] = t("Previous story").": " . l($prev->title, 'node/'. $prev->nid);  // modify by Asif
    }
    if ($next = epublish_next($node, $topics)) {
$links[2] = t("Next story").": " . l($next->title, 'node/'. $next->nid);   // modify by Asif
    }
$output .= "<h3>Published in " . l("$publication->name", "epublish/$publication->pid") . ", " .l(theme('epublish_edition_reference', $edition), "epublish/$publication->pid/$edition->eid") . "</h3><br/>\n";
$output .= theme('item_list', $links);
    $output .= '</div>';
  }
  $node->content['body']['#value'] = $node->body.$output;
  return $node;
}

You can try above with epublish 6 and let us know if it works.

Asif Hisam

#2

moshub - May 22, 2008 - 08:47
Category:support request» feature request

Thanks Asif
It worked on D6. I just fixed the "Published in" string. I'm moving this to be a feature request

Mo

        if ($prev = epublish_prev($node, $topics)) {
$links[1] = t("Previous story").": " . l($prev->title, 'node/'. $prev->nid);  // modify by Asif
    }
    if ($next = epublish_next($node, $topics)) {
$links[2] = t("Next story").": " . l($next->title, 'node/'. $next->nid);   // modify by Asif
    }
$output .= "<h3>". t("Published in").": " .l("$publication->name", "epublish/$publication->pid") . ", " .l(theme('epublish_edition_reference', $edition), "epublish/$publication->pid/$edition->eid") . "</h3><br/>\n";   // modify by moshub
$output .= theme('item_list', $links);
    $output .= '</div>';
  }
  $node->content['body']['#value'] = $node->body.$output;
  return $node;

}

#3

gloscon - June 10, 2008 - 08:10
Status:active» fixed

fixed in 6.x beta2

#4

Anonymous (not verified) - June 24, 2008 - 08:12
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.