1 <& /elements/header.html, mt("View Message catalog"), menubar(
2 emt('Edit message catalog') => $p. "edit/msgcat.cgi",
5 <& /elements/footer.html &>
9 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
11 my $widget = new HTML::Widgets::SelectLayers(
12 'selected_layer' => 'en_US',
13 'options' => { 'en_US'=>'en_US', 'iw_IL' => 'iw_IL', },
14 'layer_callback' => sub {
16 my $html = "<BR>".emt("Messages for locale [_1]",$layer)."<BR>". table().
17 "<TR><TH COLSPAN=2>".emt('Code')."</TH>".
18 "<TH>".emt('Message')."</TH>";
19 $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US';
22 foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) {
23 $html .= '<TR><TD>'. $msgcat->msgnum. '</TD>'.
24 '<TD>'. $msgcat->msgcode. '</TD>'.
25 '<TD>'. $msgcat->msg. '</TD>';
26 unless ( $layer eq 'en_US' ) {
27 my $en_msgcat = qsearchs('msgcat', {
29 'msgcode' => $msgcat->msgcode,
31 $html .= '<TD>'. $en_msgcat->msg. '</TD>' if $en_msgcat;