1 <& /elements/header-popup.html, emt("Edit Message catalog") &>
4 <& /elements/error.html &>
14 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
16 my $widget = new HTML::Widgets::SelectLayers(
17 'selected_layer' => 'en_US',
18 'options' => { 'en_US'=>'en_US', 'iw_IL' => 'iw_IL', },
19 'form_action' => 'process/msgcat.cgi',
20 'layer_callback' => sub {
22 my $html = qq!<INPUT TYPE="hidden" NAME="locale" VALUE="$layer">!.
23 "<BR>".emt("Messages for locale [_1]",$layer)."<BR>". table().
24 "<TR><TH COLSPAN=2>".emt('Code')."</TH>".
25 "<TH>".emt('Message')."</TH>";
26 $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US';
29 #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode }
30 # qsearch('msgcat', { 'locale' => $layer } ) ) {
31 foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) {
33 '<TR><TD>'. $msgcat->msgnum. '</TD><TD>'. $msgcat->msgcode. '</TD>'.
34 '<TD><INPUT TYPE="text" SIZE=32 '.
35 qq! NAME="!. $msgcat->msgnum. '" '.
36 qq!VALUE="!. ($cgi->param($msgcat->msgnum)||$msgcat->msg). qq!"></TD>!;
37 unless ( $layer eq 'en_US' ) {
38 my $en_msgcat = qsearchs('msgcat', {
40 'msgcode' => $msgcat->msgcode,
42 $html .= '<TD>'. $en_msgcat->msg. '</TD>' if $en_msgcat;
47 $html .= '</TABLE><BR><INPUT TYPE="submit" VALUE="'.emt('Apply changes').'">';