%
print header("Edit Message catalog", menubar(
# 'Main Menu' => $p,
)), '
';
print qq!Error: !. $cgi->param('error').
'
'
if $cgi->param('error');
my $widget = new HTML::Widgets::SelectLayers(
'selected_layer' => 'en_US',
'options' => { 'en_US'=>'en_US' },
'form_action' => 'process/msgcat.cgi',
'layer_callback' => sub {
my $layer = shift;
my $html = qq!!.
"
Messages for locale $layer
". table().
"
Code | ".
"Message | ";
$html .= "en_US Message | " unless $layer eq 'en_US';
$html .= '
';
#foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode }
# qsearch('msgcat', { 'locale' => $layer } ) ) {
foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) {
$html .=
''. $msgcat->msgnum. ' | '. $msgcat->msgcode. ' | '.
'param($msgcat->msgnum)||$msgcat->msg). qq!"> | !;
unless ( $layer eq 'en_US' ) {
my $en_msgcat = qsearchs('msgcat', {
'locale' => 'en_US',
'msgcode' => $msgcat->msgcode,
} );
$html .= ''. $en_msgcat->msg. ' | ';
}
$html .= '
';
}
$html .= '
';
$html;
},
);
print $widget->html;
print <