summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevinse <levinse>2011-05-22 20:23:21 +0000
committerlevinse <levinse>2011-05-22 20:23:21 +0000
commit7c4a50d23058e764d9bb905df21d9ae6f7f01a4f (patch)
tree5d8c661ff9a628e3b1b47be3a1743f2844addd16
parent78ad530afc8cd865655dd86b249112f15fccdcf1 (diff)
internationalization/localization, RT12515
-rw-r--r--httemplate/elements/dashboard-toplist.html10
-rw-r--r--httemplate/elements/error.html2
-rw-r--r--httemplate/elements/errorpage.html3
-rw-r--r--httemplate/elements/input-date-field.html2
-rw-r--r--httemplate/elements/searchbar-cust_main.html6
-rw-r--r--httemplate/elements/searchbar-ticket.html6
-rw-r--r--httemplate/elements/select-agent.html7
-rw-r--r--httemplate/elements/select-part_referral.html7
-rw-r--r--httemplate/elements/select-terms.html6
-rw-r--r--httemplate/elements/tr-input-money.html5
-rw-r--r--httemplate/elements/tr-search-cust_main.html4
-rw-r--r--httemplate/elements/tr-select-from_to.html63
-rw-r--r--httemplate/elements/tr-select-svc_acct-domain.html7
13 files changed, 59 insertions, 69 deletions
diff --git a/httemplate/elements/dashboard-toplist.html b/httemplate/elements/dashboard-toplist.html
index 6e250b6a3..72f596f4a 100644
--- a/httemplate/elements/dashboard-toplist.html
+++ b/httemplate/elements/dashboard-toplist.html
@@ -1,6 +1,6 @@
% if ( $conf->exists('dashboard-toplist') ) {
- <% include('/elements/table-grid.html') %>
+ <& /elements/table-grid.html &>
% my $bgcolor1 = '#eeeeee';
% my $bgcolor2 = '#ffffff';
@@ -24,11 +24,11 @@
<A HREF="view/cust_main.cgi?<% $custnum %>"><% $cust_main->name %></A>
</TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- <% include('/elements/mcp_lint.html', 'cust_main'=>$cust_main) %>
+ <& /elements/mcp_lint.html, 'cust_main'=>$cust_main &>
</TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>" ALIGN="right">
<FONT SIZE="-1">
- <A HREF="<% FS::TicketSystem->href_new_ticket($cust_main) %>">(new ticket)</A>
+ <A HREF="<% FS::TicketSystem->href_new_ticket($cust_main) %>"><% mt('(new ticket)') |h %></A>
</FONT>
</TD>
@@ -51,7 +51,7 @@
<TR>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- Unknown customer number <% $custnum %>
+ <% mt("Unknown customer number [_1]", $custnum) |h %>
</TD>
</TR>
@@ -75,7 +75,7 @@
<TR>
<TH CLASS="grid" BGCOLOR="#cccccc"><% $line %></TH>
- <TH CLASS="grid" BGCOLOR="#cccccc">Lint</TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Lint') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"></TH>
% foreach my $priority ( @custom_priorities, '' ) {
<TH CLASS="grid" BGCOLOR="#cccccc">
diff --git a/httemplate/elements/error.html b/httemplate/elements/error.html
index f467de2a3..f65785d10 100644
--- a/httemplate/elements/error.html
+++ b/httemplate/elements/error.html
@@ -1,4 +1,4 @@
% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') |h %></FONT>
+ <FONT SIZE="+1" COLOR="#ff0000"><% mt("Error: [_1]", $cgi->param('error')) |h %></FONT>
<BR><BR>
% }
diff --git a/httemplate/elements/errorpage.html b/httemplate/elements/errorpage.html
index 76a0bf32e..f3794cc13 100644
--- a/httemplate/elements/errorpage.html
+++ b/httemplate/elements/errorpage.html
@@ -1,4 +1,4 @@
-<% include("/elements/header.html", "Error") %>
+<& /elements/header.html, emt("Error") &>
% while (@_) {
@@ -8,4 +8,3 @@
% $m->flush_buffer();
% $HTML::Mason::Commands::m->abort();
-% #die "shouldn't fall through to here (mason \$m->abort didn't)";
diff --git a/httemplate/elements/input-date-field.html b/httemplate/elements/input-date-field.html
index 2a9bc1d53..182efbb93 100644
--- a/httemplate/elements/input-date-field.html
+++ b/httemplate/elements/input-date-field.html
@@ -6,7 +6,7 @@
% }
<INPUT TYPE="text" NAME="<% $name %>" ID="<% $name %>_text" VALUE="<% $value %>">
-<IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $name %>_button" STYLE="cursor: pointer" TITLE="Select date">
+<IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $name %>_button" STYLE="cursor: pointer" TITLE="<% mt('Select date') |h %>">
<SCRIPT TYPE="text/javascript">
Calendar.setup({
diff --git a/httemplate/elements/searchbar-cust_main.html b/httemplate/elements/searchbar-cust_main.html
index e910681dc..5d79aaa5e 100644
--- a/httemplate/elements/searchbar-cust_main.html
+++ b/httemplate/elements/searchbar-cust_main.html
@@ -2,8 +2,8 @@
<FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
<INPUT NAME="search_cust" TYPE="text" VALUE="<% $cust_label |n %>" STYLE="width:<%$width%>" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" CLASS="fstext"><BR>
- <A HREF="<%$fsurl%>search/report_cust_main.html" CLASS="fslink" STYLE="font-size: 11px">Advanced</A>
- <INPUT TYPE="submit" VALUE="Search customers" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
+ <A HREF="<%$fsurl%>search/report_cust_main.html" CLASS="fslink" STYLE="font-size: 11px"><% mt('Advanced') |h %></A>
+ <INPUT TYPE="submit" VALUE="<% mt('Search customers') |h %>" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
</FORM>
<% $menu_position eq 'left' ? '<BR>' : '' %>
@@ -33,6 +33,8 @@ if ( $conf->exists('address1-search') ) {
}
$cust_label .= ' or contact phone)';
+$cust_label = emt($cust_label);
+
my $width = $menu_position eq 'left' ? '190px' : $cust_width.'px';
</%init>
diff --git a/httemplate/elements/searchbar-ticket.html b/httemplate/elements/searchbar-ticket.html
index 0907a8924..774ca9875 100644
--- a/httemplate/elements/searchbar-ticket.html
+++ b/httemplate/elements/searchbar-ticket.html
@@ -2,8 +2,8 @@
<FORM ACTION="<% FS::TicketSystem->baseurl %>index.html" METHOD="GET" STYLE="margin:0">
<INPUT NAME="q" TYPE="text" VALUE="<% $ticketing_label |n %>" STYLE="width:<% $width %>" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" CLASS="fstext"><BR>
- <A HREF="<% FS::TicketSystem->baseurl %>Search/Build.html" CLASS="fslink" STYLE="font-size:11px">Advanced</A>
- <INPUT TYPE="submit" VALUE="Search tickets" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
+ <A HREF="<% FS::TicketSystem->baseurl %>Search/Build.html" CLASS="fslink" STYLE="font-size:11px"><% mt('Advanced') |h %></A>
+ <INPUT TYPE="submit" VALUE="<% mt('Search tickets') |h %>" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
</FORM>
<% $menu_position eq 'left' ? '<BR>' : '' %>
@@ -19,7 +19,7 @@
</SCRIPT>
<%once>
-my $ticketing_label = '(ticket #, subject, email or fulltext:text)';
+my $ticketing_label = emt('(ticket #, subject, email or fulltext:text)');
</%once>
<%init>
diff --git a/httemplate/elements/select-agent.html b/httemplate/elements/select-agent.html
index 897c98248..fd2c57eac 100644
--- a/httemplate/elements/select-agent.html
+++ b/httemplate/elements/select-agent.html
@@ -1,15 +1,14 @@
-<% include( '/elements/select-table.html',
+<& /elements/select-table.html,
'table' => 'agent',
'name_col' => 'agent',
'value' => $agentnum || '',
'agent_virt' => 1,
- 'empty_label' => 'all',
+ 'empty_label' => emt('all'),
'hashref' => { 'disabled' => '' },
'order_by' => ' ORDER BY agent',
'disable_empty' => $disable_empty,
%opt,
- )
-%>
+&>
<%init>
my %opt = @_;
diff --git a/httemplate/elements/select-part_referral.html b/httemplate/elements/select-part_referral.html
index c4b8829c8..114d147ce 100644
--- a/httemplate/elements/select-part_referral.html
+++ b/httemplate/elements/select-part_referral.html
@@ -1,14 +1,13 @@
-<% include( '/elements/select-table.html',
+<& /elements/select-table.html,
'table' => 'part_referral',
'name_col' => 'referral',
'value' => $refnum,
- 'empty_label' => 'Select advertising source',
+ 'empty_label' => emt('Select advertising source'),
'hashref' => { 'disabled' => '' },
'extra_sql' => ' AND '.
FS::part_referral->acl_agentnum_sql(1),
%opt,
- )
-%>
+&>
<%init>
my %opt = @_;
diff --git a/httemplate/elements/select-terms.html b/httemplate/elements/select-terms.html
index 417c30fda..d63c49219 100644
--- a/httemplate/elements/select-terms.html
+++ b/httemplate/elements/select-terms.html
@@ -26,13 +26,13 @@ my $conf = new FS::Conf;
my $empty_label =
$opt{'empty_label'}
- || 'Default ('.
- ($conf->config('invoice_default_terms') || 'Payable upon receipt').
+ || emt('Default').' ('.
+ ($conf->config('invoice_default_terms') || emt('Payable upon receipt')).
')';
my $empty_value = $opt{'empty_value'} || '';
-my @terms = ( 'Payable upon receipt',
+my @terms = ( emt('Payable upon receipt'),
( map "Net $_", 0, 3, 9, 10, 15, 20, 30, 45, 60, 90 ),
);
diff --git a/httemplate/elements/tr-input-money.html b/httemplate/elements/tr-input-money.html
index 88014192d..f5749ed08 100644
--- a/httemplate/elements/tr-input-money.html
+++ b/httemplate/elements/tr-input-money.html
@@ -1,9 +1,8 @@
-<% include('tr-input-text.html', @_,
+<& tr-input-text.html, @_,
'type' => 'text',
'prefix' => $money_char,
'size' => 8,
- )
-%>
+&>
<%once>
my $conf = new FS::Conf;
diff --git a/httemplate/elements/tr-search-cust_main.html b/httemplate/elements/tr-search-cust_main.html
index 9df91a18f..031df7c3d 100644
--- a/httemplate/elements/tr-search-cust_main.html
+++ b/httemplate/elements/tr-search-cust_main.html
@@ -1,6 +1,6 @@
-<% include('tr-td-label.html', @_ ) %>
+<& tr-td-label.html, @_ &>
- <TD <% $colspan %> <% $cell_style %> ID="<% $opt{input_id} || $opt{id}.'_input0' %>"><% include('search-cust_main.html', @_ ) %></TD>
+ <TD <% $colspan %> <% $cell_style %> ID="<% $opt{input_id} || $opt{id}.'_input0' %>"><& search-cust_main.html, @_ &></TD>
</TR>
diff --git a/httemplate/elements/tr-select-from_to.html b/httemplate/elements/tr-select-from_to.html
index 083243d40..100381234 100644
--- a/httemplate/elements/tr-select-from_to.html
+++ b/httemplate/elements/tr-select-from_to.html
@@ -1,52 +1,45 @@
-%
-%
-% #my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
-% my ($curmon,$curyear) = (localtime(time))[4,5];
-%
-% #find first month
-% my $syear = 1899+$curyear;
-% my $smonth = $curmon+1;
-%
-% #want 12 month by default, not 13
-% $smonth++;
-% if ( $smonth > 12 ) { $smonth-=12; $syear++ }
-%
-% #find last month
-% my $eyear = 1900+$curyear;
-% my $emonth = $curmon+1;
-%
-% my %hash = (
-% 'show_month_abbr' => 1,
-% 'start_year' => '1999',
-% 'end_year' => '2012', #haha, well...
-% @_,
-% );
-%
-%
-
-
<TR>
- <TD ALIGN="right">From: </TD>
+ <TD ALIGN="right"><% mt('From: ') |h %></TD>
<TD>
- <% include('/elements/select-month_year.html',
+ <& /elements/select-month_year.html,
'prefix' => 'start',
'selected_mon' => $smonth,
'selected_year' => $syear,
%hash,
- )
- %>
+ &>
</TD>
</TR>
<TR>
- <TD ALIGN="right">To: </TD>
+ <TD ALIGN="right"><% mt('To: ') |h %></TD>
<TD>
- <% include('/elements/select-month_year.html',
+ <& /elements/select-month_year.html,
'prefix' => 'end',
'selected_mon' => $emonth,
'selected_year' => $eyear,
%hash,
- )
- %>
+ &>
</TD>
</TR>
+<%init>
+ my ($curmon,$curyear) = (localtime(time))[4,5];
+
+ #find first month
+ my $syear = 1899+$curyear;
+ my $smonth = $curmon+1;
+
+ #want 12 month by default, not 13
+ $smonth++;
+ if ( $smonth > 12 ) { $smonth-=12; $syear++ }
+
+ #find last month
+ my $eyear = 1900+$curyear;
+ my $emonth = $curmon+1;
+
+ my %hash = (
+ 'show_month_abbr' => 1,
+ 'start_year' => '1999',
+ 'end_year' => '2012', #haha, well...
+ @_,
+ );
+</%init>
diff --git a/httemplate/elements/tr-select-svc_acct-domain.html b/httemplate/elements/tr-select-svc_acct-domain.html
index 9d1a4b678..94196ad48 100644
--- a/httemplate/elements/tr-select-svc_acct-domain.html
+++ b/httemplate/elements/tr-select-svc_acct-domain.html
@@ -3,14 +3,13 @@
% } else {
<TR>
- <TD ALIGN="right"><% $opt{'label'} || 'Domain' %></TD>
+ <TD ALIGN="right"><% $opt{'label'} || emt('Domain') %></TD>
<TD>
- <% include('/elements/select-svc_acct-domain.html',
+ <& /elements/select-svc_acct-domain.html,
'curr_value' => $domsvc,
'part_svc' => $part_svc,
'cust_pkg' => $cust_pkg,
- )
- %>
+ &>
</TD>
</TR>
% }