1 <& elements/browse.html,
2 title => mt('Translation strings'),
3 name_singular => 'string', #mt? no, we need to do it through the quant/PL stuff
4 query => { 'table' => 'msgcat',
5 'hashref' => { 'locale' => $locale, },
7 count_query => $count_query,
8 header => [ mt('Message code'), mt('Message string') ],
9 fields => [ 'msgcode', 'msg' ],
10 links => $locale eq 'en_US' ? [] : [ $link, $link ],
11 html_init => $html_init,
15 my $curuser = $FS::CurrentUser::CurrentUser;
18 unless $curuser->access_right('Configuration');
20 my $locale = $cgi->param('locale') || 'en_US';
21 die "invalid locale" unless $locale =~ /^[A-Za-z_]+$/;
23 my $count_query = "SELECT COUNT(*) FROM msgcat where locale = '$locale'";
25 my $link = [ "${p}edit/msgcat.html?", 'msgnum' ];
28 foreach my $alocale ( FS::Locales->locales ) {
29 my %info = FS::Locales->locale_info($alocale);
30 my $selectedstart = $alocale eq $locale ? '<B>' : '';
31 my $selectedend = $alocale eq $locale ? '</B>' : '';
32 $html_init .= qq!<A HREF="msgcat.html?locale=$alocale">$selectedstart$info{name} ($info{country})$selectedend</A> !;
34 $html_init .= '<BR><BR>';