4 %print header("Edit Message catalog", menubar(
8 %print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !. $cgi->param('error').
10 % if $cgi->param('error');
12 %my $widget = new HTML::Widgets::SelectLayers(
13 % 'selected_layer' => 'en_US',
14 % 'options' => { 'en_US'=>'en_US' },
15 % 'form_action' => 'process/msgcat.cgi',
16 % 'layer_callback' => sub {
18 % my $html = qq!<INPUT TYPE="hidden" NAME="locale" VALUE="$layer">!.
19 % "<BR>Messages for locale $layer<BR>". table().
20 % "<TR><TH COLSPAN=2>Code</TH>".
22 % $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US';
25 % #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode }
26 % # qsearch('msgcat', { 'locale' => $layer } ) ) {
27 % foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) {
29 % '<TR><TD>'. $msgcat->msgnum. '</TD><TD>'. $msgcat->msgcode. '</TD>'.
30 % '<TD><INPUT TYPE="text" SIZE=32 '.
31 % qq! NAME="!. $msgcat->msgnum. '" '.
32 % qq!VALUE="!. ($cgi->param($msgcat->msgnum)||$msgcat->msg). qq!"></TD>!;
33 % unless ( $layer eq 'en_US' ) {
34 % my $en_msgcat = qsearchs('msgcat', {
35 % 'locale' => 'en_US',
36 % 'msgcode' => $msgcat->msgcode,
38 % $html .= '<TD>'. $en_msgcat->msg. '</TD>';
43 % $html .= '</TABLE><BR><INPUT TYPE="submit" VALUE="Apply changes">';