[Rt-commit] r15602 - in rt/branches/3.999-DANGEROUS: . lib/RT lib/RT/Interface/Web/QueryBuilder sbin share/html/Admin/Global/CustomFields share/html/Dashboards share/html/Dashboards/Elements share/html/Elements share/html/Elements/GnuPG share/html/Elements/RT__Model__Scrip share/html/Ticket share/html/Ticket/Elements share/html/Ticket/Graphs share/html/Ticket/Graphs/Elements share/html/Widgets share/html/Widgets/Form
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Aug 28 11:13:53 EDT 2008
Author: sunnavy
Date: Thu Aug 28 11:13:48 2008
New Revision: 15602
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/lib/RT/Condition.pm
rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm
rt/branches/3.999-DANGEROUS/lib/RT/ScripAction.pm
rt/branches/3.999-DANGEROUS/lib/RT/Search.pm
rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm
rt/branches/3.999-DANGEROUS/sbin/rt-email-dashboards
rt/branches/3.999-DANGEROUS/share/html/Admin/Global/CustomFields/Queues.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/ShowDashboards
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/ShowSubscription
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/Tabs
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Modify.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/index.html
rt/branches/3.999-DANGEROUS/share/html/Elements/CollectionListPaging
rt/branches/3.999-DANGEROUS/share/html/Elements/Dashboards
rt/branches/3.999-DANGEROUS/share/html/Elements/GnuPG/KeyIssues
rt/branches/3.999-DANGEROUS/share/html/Elements/RT__Model__Scrip/ColumnMap
rt/branches/3.999-DANGEROUS/share/html/Elements/ShowSearch
rt/branches/3.999-DANGEROUS/share/html/Ticket/Create.html
rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/Bookmark
rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowSummary
rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties
rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/ShowLegends
rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/index.html
rt/branches/3.999-DANGEROUS/share/html/Ticket/ModifyLinks.html
rt/branches/3.999-DANGEROUS/share/html/Widgets/FinalizeWidgetArguments
rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/String
rt/branches/3.999-DANGEROUS/share/html/Widgets/SavedSearch
rt/branches/3.999-DANGEROUS/share/html/index.html
Log:
r16261 at sunnavys-mb: sunnavy | 2008-08-28 23:11:29 +0800
loc => _
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Condition.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Condition.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Condition.pm Thu Aug 28 11:13:48 2008
@@ -201,7 +201,7 @@
# {{{ sub describe
sub describe {
my $self = shift;
- return ( $self->loc( "No description for %1", ref $self ) );
+ return ( _( "No description for %1", ref $self ) );
}
# }}}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm Thu Aug 28 11:13:48 2008
@@ -269,7 +269,7 @@
}
unless ($class) {
push @results,
- [ $args{'current_user'}->loc( "Unknown field: %1", $key ), -1 ];
+ [ _( "Unknown field: %1", $key ), -1 ];
}
$value =~ s/'/\\'/g;
Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction.pm Thu Aug 28 11:13:48 2008
@@ -180,7 +180,7 @@
# {{{ sub commit
sub commit {
my $self = shift;
- return ( 0, $self->loc("Commit Stubbed") );
+ return ( 0, _("Commit Stubbed") );
}
# }}}
@@ -190,7 +190,7 @@
# {{{ sub describe
sub describe {
my $self = shift;
- return $self->loc( "No description for %1", ref $self );
+ return _( "No description for %1", ref $self );
}
# }}}
@@ -200,7 +200,7 @@
# {{{ sub prepare
sub prepare {
my $self = shift;
- return ( 0, $self->loc("Prepare Stubbed") );
+ return ( 0, _("Prepare Stubbed") );
}
# }}}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Search.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Search.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Search.pm Thu Aug 28 11:13:48 2008
@@ -132,7 +132,7 @@
# {{{ sub describe
sub describe {
my $self = shift;
- return ( $self->loc( "No description for %1", ref $self ) );
+ return ( _( "No description for %1", ref $self ) );
}
# }}}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm Thu Aug 28 11:13:48 2008
@@ -108,12 +108,12 @@
$self->{'privacy'} = $privacy;
$self->post_load();
- return ( 0, $self->loc("Permission denied") )
+ return ( 0, _("Permission denied") )
unless $self->current_user_can_see;
return (
1,
- $self->loc(
+ _(
"Loaded %1 %2", $self->object_name, $self->name
)
);
@@ -123,7 +123,7 @@
"Could not load attribute " . $id . " for object " . $privacy );
return (
0,
- $self->loc(
+ _(
"Failed to load %1 %2", $self->object_name, $id
)
);
@@ -132,7 +132,7 @@
else {
Jifty->log->warn( "Could not load object $privacy when loading "
. $self->object_name );
- return ( 0, $self->loc( "Could not load object for %1", $privacy ) );
+ return ( 0, _( "Could not load object for %1", $privacy ) );
}
}
@@ -154,7 +154,7 @@
if ( !$ok ) {
return (
0,
- $self->loc(
+ _(
"Failed to load %1 %2: %3", $self->object_name,
$id, $msg
)
@@ -162,7 +162,7 @@
}
my $privacy = $self->_build_privacy( $attr->object_type, $attr->object_id );
- return ( 0, $self->loc( "Bad privacy for attribute %1", $id ) )
+ return ( 0, _( "Bad privacy for attribute %1", $id ) )
if !$privacy;
return $self->load( $privacy, $id );
@@ -201,10 +201,10 @@
my $privacy = $args{'privacy'};
my $name = $args{'name'}, my $object = $self->_get_object($privacy);
- return ( 0, $self->loc( "Failed to load object for %1", $privacy ) )
+ return ( 0, _( "Failed to load object for %1", $privacy ) )
unless $object;
- return ( 0, $self->loc("Permission denied") )
+ return ( 0, _("Permission denied") )
unless $self->current_user_can_create($privacy);
my ( $att_id, $att_msg ) = $self->save_attribute( $object, \%args );
@@ -213,12 +213,12 @@
$self->{'attribute'} = $object->attributes->with_id($att_id);
$self->{'id'} = $att_id;
$self->{'privacy'} = $privacy;
- return ( 1, $self->loc( "Saved %1 %2", $self->object_name, $name ) );
+ return ( 1, _( "Saved %1 %2", $self->object_name, $name ) );
}
else {
Jifty->log->error( $self->object_name . " save failure: $att_msg" );
return ( 0,
- $self->loc( "Failed to create %1 attribute", $self->object_name )
+ _( "Failed to create %1 attribute", $self->object_name )
);
}
}
@@ -243,31 +243,31 @@
my $self = shift;
my %args = @_;
- return ( 0, $self->loc( "No %1 loaded", $self->object_name ) )
+ return ( 0, _( "No %1 loaded", $self->object_name ) )
unless $self->id;
return ( 0,
- $self->loc( "Could not load %1 attribute", $self->object_name ) )
+ _( "Could not load %1 attribute", $self->object_name ) )
unless $self->{'attribute'}->id;
- return ( 0, $self->loc("Permission denied") )
+ return ( 0, _("Permission denied") )
unless $self->current_user_can_modify;
my ( $status, $msg ) = $self->update_attribute( \%args );
return (
1,
- $self->loc(
+ _(
"%1 update: Nothing changed",
ucfirst( $self->object_name )
)
) if !defined $msg;
# prevent useless warnings
- return ( 1, $self->loc("%1 updated"), ucfirst( $self->object_name ) )
+ return ( 1, _("%1 updated"), ucfirst( $self->object_name ) )
if $msg =~ /That is already the current value/;
return ( $status,
- $self->loc( "%1 update: %2", ucfirst( $self->object_name ), $msg ) );
+ _( "%1 update: %2", ucfirst( $self->object_name ), $msg ) );
}
=head2 update_attribute
@@ -288,15 +288,15 @@
sub delete {
my $self = shift;
- return ( 0, $self->loc("Permission denied") )
+ return ( 0, _("Permission denied") )
unless $self->current_user_can_delete;
my ( $status, $msg ) = $self->{'attribute'}->delete;
if ($status) {
- return ( 1, $self->loc( "Deleted %1", $self->object_name ) );
+ return ( 1, _( "Deleted %1", $self->object_name ) );
}
else {
- return ( 0, $self->loc( "Delete failed: %1", $msg ) );
+ return ( 0, _( "Delete failed: %1", $msg ) );
}
}
Modified: rt/branches/3.999-DANGEROUS/sbin/rt-email-dashboards
==============================================================================
--- rt/branches/3.999-DANGEROUS/sbin/rt-email-dashboards (original)
+++ rt/branches/3.999-DANGEROUS/sbin/rt-email-dashboards Thu Aug 28 11:13:48 2008
@@ -78,7 +78,7 @@
use RT::Interface::Web;
use RT::Interface::Web::Handler;
use RT::Dashboard;
-use RT::Interface::CLI qw{ CleanEnv loc };
+use RT::Interface::CLI qw{ CleanEnv };
use Getopt::Long;
use HTML::Mason;
@@ -114,10 +114,10 @@
}
# helper functions
-sub verbose { print loc(@_), "\n" if $opts{verbose} || $opts{verbose}; 1 }
-sub debug { print loc(@_), "\n" if $opts{debug}; 1 }
-sub error { Jifty->log->error(loc(@_)); verbose(@_); 1 }
-sub warning { Jifty->log->warn(loc(@_)); verbose(@_); 1 }
+sub verbose { print _(@_), "\n" if $opts{verbose} || $opts{verbose}; 1 }
+sub debug { print _(@_), "\n" if $opts{debug}; 1 }
+sub error { Jifty->log->error(_(@_)); verbose(@_); 1 }
+sub warning { Jifty->log->warn(_(@_)); verbose(@_); 1 }
my $now = $opts{epoch} || time;
verbose "Using time %1", scalar localtime($now);
Modified: rt/branches/3.999-DANGEROUS/share/html/Admin/Global/CustomFields/Queues.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Admin/Global/CustomFields/Queues.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Admin/Global/CustomFields/Queues.html Thu Aug 28 11:13:48 2008
@@ -53,6 +53,6 @@
&>
<& /Admin/Elements/EditCustomFields, %ARGS, title => $title, object_type => 'RT::Model::Queue', object=> $object &>
<%INIT>
- my $title = loc( 'Edit Custom Fields for all queues');
+ my $title = _( 'Edit Custom Fields for all queues');
my $object = RT::Model::Queue->new( current_user => Jifty->web->current_user );
</%INIT>
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/ShowDashboards
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/ShowDashboards (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/ShowDashboards Thu Aug 28 11:13:48 2008
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&| /Widgets/TitleBox, title => loc("%1 Dashboards", $type) &>
+<&| /Widgets/TitleBox, title => _("%1 Dashboards", $type) &>
<& SELF:table, %ARGS &>
</&>
<%ARGS>
@@ -68,16 +68,16 @@
% if (@$dashboards == 0) {
% if ($verbose) {
- <p><% loc("No dashboards.") %></p>
+ <p><% _("No dashboards.") %></p>
% }
% } else {
<table class="collection-as-table">
<tr class="collection-as-table">
% if ($verbose) {
- <th class="collection-as-table"><% loc("#") %></th>
+ <th class="collection-as-table"><% _("#") %></th>
% }
- <th class="collection-as-table"><% loc("Name") %></th>
- <th class="collection-as-table"><% loc("Subscription") %></th>
+ <th class="collection-as-table"><% _("Name") %></th>
+ <th class="collection-as-table"><% _("Subscription") %></th>
</tr>
% my $i = 0;
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/ShowSubscription
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/ShowSubscription (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/ShowSubscription Thu Aug 28 11:13:48 2008
@@ -55,7 +55,7 @@
RT->config->get('WebPath'),
$dashboard->id,;
-my $frequency = loc("None");
+my $frequency = _("None");
if (defined $subscription) {
my $freq = $subscription->sub_value('Frequency');
@@ -63,13 +63,13 @@
if ($freq eq 'weekly') {
my $day = (qw/Monday Tuesday Wednesday Thursday Friday Saturday Sunday/)[$subscription->sub_value('Dow')];
- $frequency = loc("%1 (on %2) at %3", $freq, $day, $hour);
+ $frequency = _("%1 (on %2) at %3", $freq, $day, $hour);
}
elsif ($freq eq 'monthly') {
- $frequency = loc("%1 (day %2) at %3", $freq, $subscription->sub_value('Dom'), $hour);
+ $frequency = _("%1 (day %2) at %3", $freq, $subscription->sub_value('Dom'), $hour);
}
elsif ($freq eq 'daily') {
- $frequency = loc("%1 at %2", $freq, $hour);
+ $frequency = _("%1 at %2", $freq, $hour);
}
}
</%INIT>
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/Tabs
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/Tabs (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/Tabs Thu Aug 28 11:13:48 2008
@@ -67,21 +67,21 @@
path => $modify,
current_subtab => $current_subtab,
subtabs => {
- a_Basics => { title => loc('Basics'),
+ a_Basics => { title => _('Basics'),
path => $modify,
},
- b_Queries => { title => loc('Queries'),
+ b_Queries => { title => _('Queries'),
path => $queries,
},
- c_Subscription => { title => loc('Subscription'),
+ c_Subscription => { title => _('Subscription'),
path =>
"Dashboards/Subscription.html?dashboard_id=" . $dashboard_obj->id
},
- z_Preview => { title => loc('Show'),
+ z_Preview => { title => _('Show'),
path => $render,
},
}
@@ -97,14 +97,14 @@
$current_subtab = $modify;
}
-$tabs->{"A"} = { title => loc('Select dashboard'),
+$tabs->{"A"} = { title => _('Select dashboard'),
path => "Dashboards/index.html" };
my $dashboard = RT::Dashboard->new( current_user => Jifty->web->current_user );
my @objects = $dashboard->_privacy_objects(create => 1);
if (@objects) {
- $tabs->{"B"} = { title => loc('New dashboard'),
+ $tabs->{"B"} = { title => _('New dashboard'),
path => "Dashboards/Modify.html?create=1",
separator => 1 };
}
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Modify.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Modify.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Modify.html Thu Aug 28 11:13:48 2008
@@ -72,9 +72,9 @@
<& /Dashboards/Elements/SelectPrivacy, name => "privacy", objects => \@privacies, default => $Dashboard->privacy &>
</td></tr>
</table>
-<& /Elements/Submit, name => 'save', label => loc('Save Changes') &>
+<& /Elements/Submit, name => 'save', label => _('Save Changes') &>
% if ($Dashboard->id && $can_delete) {
-<& /Elements/Submit, name => 'delete', label => loc('Delete') &>
+<& /Elements/Submit, name => 'delete', label => _('Delete') &>
% }
</form>
<%INIT>
@@ -91,11 +91,11 @@
my $Dashboard = RT::Dashboard->new( current_user => Jifty->web->current_user );
my @privacies = $Dashboard->_privacy_objects(($create ? 'create' : 'modify') => 1);
-abort(loc("Permission denied")) if @privacies == 0;
+abort(_("Permission denied")) if @privacies == 0;
if ($create) {
$current_subtab = 'Dashboards/Modify.html?create=1';
- $title = loc("Create a new dashboard");
+ $title = _("Create a new dashboard");
}
else {
if ($id eq 'new') {
@@ -107,7 +107,7 @@
);
if (!$val) {
- abort(loc("Dashboard could not be created: %1", $msg));
+ abort(_("Dashboard could not be created: %1", $msg));
}
push @results, $msg;
@@ -119,14 +119,14 @@
}
if ($id) {
- $title = loc("Modify the dashboard %1", $Dashboard->name);
+ $title = _("Modify the dashboard %1", $Dashboard->name);
$current_subtab = 'Dashboards/Modify.html?id=' . $id;
}
# If the create failed
else {
$create = 1;
$current_subtab = 'Dashboards/Modify.html?create=1';
- $title = loc("Create a new dashboard");
+ $title = _("Create a new dashboard");
}
}
@@ -135,10 +135,10 @@
name => $ARGS{'name'});
if ($ok) {
- push @results, loc("Dashboard updated");
+ push @results, _("Dashboard updated");
}
else {
- push @results, loc("Dashboard could not be updated: %1", $msg);
+ push @results, _("Dashboard could not be updated: %1", $msg);
}
}
@@ -147,7 +147,7 @@
if (!$create && !$tried_create && $id && $ARGS{'delete'}) {
my ($ok, $msg) = $Dashboard->delete();
- $ok || abort(loc("Couldn't delete dashboard %1: %2", $id, $msg));
+ $ok || abort(_("Couldn't delete dashboard %1: %2", $id, $msg));
# put the user back into a useful place with a message
RT::Interface::Web::redirect(RT->config->get('WebURL')."Dashboards/index.html?deleted=$id");
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html Thu Aug 28 11:13:48 2008
@@ -62,7 +62,7 @@
<tr>
<td valign="top" class="boxcontainer">
-<&| /Widgets/TitleBox, title => loc('Queries') &>
+<&| /Widgets/TitleBox, title => _('Queries') &>
<table>
<tr><td>
<& /Widgets/SelectionBox:show, self => $sel, nojs => 1 &>
@@ -84,8 +84,8 @@
use RT::Dashboard;
my $Dashboard = new RT::Dashboard( current_user => Jifty->web->current_user );
my ($ok, $msg) = $Dashboard->load_by_id($id);
-$ok || abort(loc("Couldn't load dashboard %1: %2", $id, $msg));
-my $title = loc("Modify the queries of dashboard %1", $Dashboard->name);
+$ok || abort(_("Couldn't load dashboard %1: %2", $id, $msg));
+my $title = _("Modify the queries of dashboard %1", $Dashboard->name);
my %desc_of;
my @items;
@@ -137,10 +137,10 @@
my ($ok, $msg) = $Dashboard->update(searches => $searches);
if ($ok) {
- push @results, loc("Dashboard updated");
+ push @results, _("Dashboard updated");
}
else {
- push @results, loc("Dashboard could not be updated: %1", $msg);
+ push @results, _("Dashboard could not be updated: %1", $msg);
}
},
);
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html Thu Aug 28 11:13:48 2008
@@ -80,7 +80,7 @@
use RT::Dashboard;
my $DashboardObj = RT::Dashboard->new( current_user => Jifty->web->current_user );
my ($ok, $msg) = $DashboardObj->load_by_id($id);
-abort(loc("Couldn't load dashboard %1: %2", $id, $msg)) if !$ok;
+abort(_("Couldn't load dashboard %1: %2", $id, $msg)) if !$ok;
my $SubscriptionObj = RT::Model::Attribute->new( current_user => Jifty->web->current_user );
my $Loaded = 0;
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html Thu Aug 28 11:13:48 2008
@@ -59,7 +59,7 @@
<tr>
<td valign="top" class="boxcontainer">
-<&| /Widgets/TitleBox, title => loc('Dashboard') &>
+<&| /Widgets/TitleBox, title => _('Dashboard') &>
<table>
<tr><td class="label">
@@ -84,7 +84,7 @@
% $name = $query->name;
% }
<li>
- <% loc($name, $fields{'rows'}) %>
+ <% _($name, $fields{'rows'}) %>
</li>
% }
</ol>
@@ -94,7 +94,7 @@
</table>
</&>
-<&| /Widgets/TitleBox, title => loc('Subscription') &>
+<&| /Widgets/TitleBox, title => _('Subscription') &>
<table>
<tr><td class="label">
@@ -109,7 +109,7 @@
<select name="dow">
% for my $dow (qw/Monday Tuesday Wednesday Thursday Friday Saturday Sunday/) {
<option value="<% $dow %>" <% $fields{'dow'} eq $dow ?
-'selected="selected"' : '' |n %>><% loc($dow) %></option>
+'selected="selected"' : '' |n %>><% _($dow) %></option>
% }
</select>
<br />
@@ -120,7 +120,7 @@
<select name="dom">
% for my $dom (1..31) {
<option value="<% $dom %>" <% $fields{'dom'} == $dom ?
-'selected="selected"' : '' |n %>><% loc($dom) %></option>
+'selected="selected"' : '' |n %>><% _($dom) %></option>
% }
</select>
<br />
@@ -148,7 +148,7 @@
</td><td class="value">
<select name="rows">
% for my $rows (1, 2, 5, 10, 15, 20, 25, 50, 75, 100, 0) {
- <option value="<% $rows %>" <% $fields{'rows'} eq $rows ? 'selected="selected"' : '' %>><% loc($rows || 'Unlimited') %></option>
+ <option value="<% $rows %>" <% $fields{'rows'} eq $rows ? 'selected="selected"' : '' %>><% _($rows || 'Unlimited') %></option>
% }
</select>
</td></tr>
@@ -159,9 +159,9 @@
</table>
% if ($SubscriptionObj->id) {
- <& /Elements/Submit, name => "save", label => loc('Save Changes') &>
+ <& /Elements/Submit, name => "save", label => _('Save Changes') &>
% } else {
- <& /Elements/Submit, name => "save", label => loc('Subscribe') &>
+ <& /Elements/Submit, name => "save", label => _('Subscribe') &>
% }
</form>
@@ -191,7 +191,7 @@
: $ARGS{'dashboard_id'};
($val, $msg) = $DashboardObj->load_by_id($dashboard_id);
-$val || abort(loc("Couldn't load dashboard %1: %2.", $dashboard_id, $msg));
+$val || abort(_("Couldn't load dashboard %1: %2.", $dashboard_id, $msg));
my %fields = (
dashboard_id => $dashboard_id,
@@ -234,7 +234,7 @@
}
# create
else {
- abort(loc("Unable to subscribe to dashboard %1: Permission denied", $dashboard_id))
+ abort(_("Unable to subscribe to dashboard %1: Permission denied", $dashboard_id))
unless $DashboardObj->current_user_can_subscribe;
my ($val, $msg) = $SubscriptionObj->create(
@@ -245,21 +245,21 @@
content => \%fields,
);
if ($val) {
- push @results, loc("Subscribed to dashboard %1", $DashboardObj->name);
- push @results, loc("Warning: you have no email address set, so you will not receive this dashboard until you have it set")
+ push @results, _("Subscribed to dashboard %1", $DashboardObj->name);
+ push @results, _("Warning: you have no email address set, so you will not receive this dashboard until you have it set")
unless Jifty->web->current_user->email;
}
else {
- push @results, loc('Subscription could not be created: %1', $msg);
+ push @results, _('Subscription could not be created: %1', $msg);
}
}
}
if ($SubscriptionObj->id) {
- $title = loc("Modify the subscription to dashboard %1", $DashboardObj->name);
+ $title = _("Modify the subscription to dashboard %1", $DashboardObj->name);
}
else {
- $title = loc("Subscribe to dashboard %1", $DashboardObj->name);
+ $title = _("Subscribe to dashboard %1", $DashboardObj->name);
}
</%INIT>
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/index.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/index.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/index.html Thu Aug 28 11:13:48 2008
@@ -70,7 +70,7 @@
% }
<%INIT>
-my $title = loc("Dashboards");
+my $title = _("Dashboards");
use RT::Dashboard;
my @objs = RT::Dashboard->new( current_user => Jifty->web->current_user )->_privacy_objects;
@@ -78,7 +78,7 @@
my @actions;
if (defined $deleted) {
- push @actions, loc("Deleted dashboard %1", $deleted);
+ push @actions, _("Deleted dashboard %1", $deleted);
}
</%INIT>
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/CollectionListPaging
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/CollectionListPaging (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/CollectionListPaging Thu Aug 28 11:13:48 2008
@@ -57,10 +57,10 @@
<%INIT>
$m->out(qq{<div class="paging">});
if ($pages == 1) {
- $m->out(loc('Page 1 of 1'));
+ $m->out(_('Page 1 of 1'));
}
else{
-$m->out(loc('Page') . ' ');
+$m->out(_('Page') . ' ');
my $prev = $m->comp(
'/Elements/QueryString',
%$url_params,
@@ -98,10 +98,10 @@
}
if ($current_page > 1) {
- $m->out(qq{<a href="$base_url$prev" class="nav">}.loc('Previous') . qq{</a>});
+ $m->out(qq{<a href="$base_url$prev" class="nav">}._('Previous') . qq{</a>});
}
if (($current_page * $rows) < $total_found) {
- $m->out(qq{<a href="$base_url$next" class="nav">}.loc('Next').qq{</a>});
+ $m->out(qq{<a href="$base_url$next" class="nav">}._('Next').qq{</a>});
}
}
$m->out(qq{</div>});
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/Dashboards
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/Dashboards (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/Dashboards Thu Aug 28 11:13:48 2008
@@ -46,8 +46,8 @@
%#
%# END BPS TAGGED BLOCK }}}
<div class="dashboards">
-<&|/Widgets/TitleBox, title => loc("Dashboards"), bodyclass => "",
- titleright => loc("Edit"), titleright_href => RT->config->get('WebPath').'/Dashboards' &>
+<&|/Widgets/TitleBox, title => _("Dashboards"), bodyclass => "",
+ titleright => _("Edit"), titleright_href => RT->config->get('WebPath').'/Dashboards' &>
<& /Dashboards/Elements/ShowDashboards:table,
dashboards => \@dashboards,
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/GnuPG/KeyIssues
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/GnuPG/KeyIssues (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/GnuPG/KeyIssues Thu Aug 28 11:13:48 2008
@@ -46,10 +46,10 @@
%#
%# END BPS TAGGED BLOCK }}}
% if ( @$issues || @$sign_addresses ) {
-<&| /Widgets/TitleBox, title => loc('GnuPG issues') &>
+<&| /Widgets/TitleBox, title => _('GnuPG issues') &>
% if ( @$sign_addresses ) {
-<% loc("The system is unable to sign outgoing email messages. This usually indicates that the passphrase was mis-set, or that GPG Agent is down. Please alert your system administrator immediately. The problem addresses are:") %>
+<% _("The system is unable to sign outgoing email messages. This usually indicates that the passphrase was mis-set, or that GPG Agent is down. Please alert your system administrator immediately. The problem addresses are:") %>
<ul>
% for my $address (@$sign_addresses) {
<li><% $address %></li>
@@ -58,9 +58,9 @@
% }
% if (@$issues == 1) {
-<% loc("You are going to encrypt outgoing email messages, but there is a problem with a recipient's public key. You have to fix the problem with the key, disable sending a message to that recipient, or disable encryption.") %>
+<% _("You are going to encrypt outgoing email messages, but there is a problem with a recipient's public key. You have to fix the problem with the key, disable sending a message to that recipient, or disable encryption.") %>
% } elsif (@$issues > 1) {
-<% loc("You are going to encrypt outgoing email messages, but there are problems with recipients' public keys. You have to fix the problems with the keys, disable sending a message to the recipients with key problems, or disable encryption.") %>
+<% _("You are going to encrypt outgoing email messages, but there are problems with recipients' public keys. You have to fix the problems with the keys, disable sending a message to the recipients with key problems, or disable encryption.") %>
% }
<ul>
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/RT__Model__Scrip/ColumnMap
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/RT__Model__Scrip/ColumnMap (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/RT__Model__Scrip/ColumnMap Thu Aug 28 11:13:48 2008
@@ -61,27 +61,27 @@
title => 'Queue',
value => sub {
return $_[0]->queue_obj->name if $_[0]->queue;
- return $_[0]->loc('Global');
+ return $_[0]->_('Global');
},
},
condition => {
title => 'Condition',
- value => sub { return $_[0]->loc( $_[0]->scrip_condition_obj->name ) },
+ value => sub { return $_[0]->_( $_[0]->scrip_condition_obj->name ) },
},
action => {
title => 'Action',
- value => sub { return $_[0]->loc( $_[0]->scrip_action_obj->name ) },
+ value => sub { return $_[0]->_( $_[0]->scrip_action_obj->name ) },
},
template => {
title => 'Template',
- value => sub { return $_[0]->loc( $_[0]->template_obj->name ) },
+ value => sub { return $_[0]->_( $_[0]->template_obj->name ) },
},
auto_description => {
title => 'Condition, Action and Template',
- value => sub { return $_[0]->loc( "%1 %2 with template %3",
- $_[0]->loc($_[0]->condition_obj->name),
- $_[0]->loc($_[0]->action_obj->name),
- $_[0]->loc($_[0]->template_obj->name),
+ value => sub { return $_[0]->_( "%1 %2 with template %3",
+ $_[0]->_($_[0]->condition_obj->name),
+ $_[0]->_($_[0]->action_obj->name),
+ $_[0]->_($_[0]->template_obj->name),
) },
},
};
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/ShowSearch
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/ShowSearch (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/ShowSearch Thu Aug 28 11:13:48 2008
@@ -65,12 +65,12 @@
if ($saved_search) {
my ( $container_object, $search_id ) = _parse_saved_search($saved_search);
unless ( $container_object ) {
- $m->out(loc("Either you have no rights to view saved search %1 or identifier is incorrect", $saved_search));
+ $m->out(_("Either you have no rights to view saved search %1 or identifier is incorrect", $saved_search));
return;
}
$search = $container_object->attributes->with_id($search_id);
unless ( $search->id && ref( $SearchArg = $search->content ) eq 'HASH' ) {
- $m->out(loc("Saved Search %1 not found", $saved_search)) unless $ignore_missing;
+ $m->out(_("Saved Search %1 not found", $saved_search)) unless $ignore_missing;
return;
}
$SearchArg->{'search_type'} ||= 'Ticket';
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Create.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Create.html Thu Aug 28 11:13:48 2008
@@ -324,7 +324,7 @@
$m->callback( queue_obj => $queue_obj, args_ref => \%ARGS );
-$queue_obj->disabled && abort(loc("Cannot create tickets in a disabled queue."));
+$queue_obj->disabled && abort(_("Cannot create tickets in a disabled queue."));
my $CFs = $queue_obj->ticket_custom_fields();
my $TxnCFs = $queue_obj->ticket_transaction_custom_fields();
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/Bookmark
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/Bookmark (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/Bookmark Thu Aug 28 11:13:48 2008
@@ -70,9 +70,9 @@
% my $url = RT->config->get('WebPath') ."/Helpers/Toggle/TicketBookmark?id=". $id;
<a align="right" href="<% $url %>" onClick="ahah('<% $url |n %>', 'toggle-<% $id |n %>'); return false;" >
% if ( $bookmarks->{ $id } ) {
-<img src="<% RT->config->get('WebPath') %>/NoAuth/images/star.gif" alt="<% loc('Remove Bookmark') %>" style="border-style: none" />
+<img src="<% RT->config->get('WebPath') %>/NoAuth/images/star.gif" alt="<% _('Remove Bookmark') %>" style="border-style: none" />
% } else {
-<img src="<% RT->config->get('WebPath') %>/NoAuth/images/empty_star.gif" alt="<% loc('Add Bookmark') %>" style="border-style: none" />
+<img src="<% RT->config->get('WebPath') %>/NoAuth/images/empty_star.gif" alt="<% _('Add Bookmark') %>" style="border-style: none" />
% }
</a>
</span>
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowSummary
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowSummary (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowSummary Thu Aug 28 11:13:48 2008
@@ -97,7 +97,7 @@
</&>
% my (@extra);
-% push @extra, titleright_raw => '<a href="'. RT->config->get('WebPath'). '/Ticket/Graphs/index.html?id='.$ticket->id.'">'.loc('Graph').'</a>' unless RT->config->get('DisableGraphViz');
+% push @extra, titleright_raw => '<a href="'. RT->config->get('WebPath'). '/Ticket/Graphs/index.html?id='.$ticket->id.'">'._('Graph').'</a>' unless RT->config->get('DisableGraphViz');
<&| /Widgets/TitleBox, title => _('Links'),
title_href => RT->config->get('WebPath')."/Ticket/ModifyLinks.html?id=".$ticket->id,
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties Thu Aug 28 11:13:48 2008
@@ -45,34 +45,34 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&| /Widgets/TitleBox, title => loc('Graph Properties') &>
+<&| /Widgets/TitleBox, title => _('Graph Properties') &>
-<% loc('Direction') %> <select name="direction">
-<option value="TB" <% ($direction||'TB') eq 'TB'? 'selected="selected"': '' |n %>><% loc('top to bottom') %></option>
-<option value="LR" <% ($direction||'TB') eq 'LR'? 'selected="selected"': '' |n %>><% loc('left to right') %></option>
+<% _('Direction') %> <select name="direction">
+<option value="TB" <% ($direction||'TB') eq 'TB'? 'selected="selected"': '' |n %>><% _('top to bottom') %></option>
+<option value="LR" <% ($direction||'TB') eq 'LR'? 'selected="selected"': '' |n %>><% _('left to right') %></option>
%# XXX: not supported by GraphViz perl module
-%#<option value="BT" <% ($direction||'TB') eq 'BT'? 'selected="selected"': '' |n %>><% loc('bottom to top') %></option>
-%#<option value="RL" <% ($direction||'TB') eq 'RL'? 'selected="selected"': '' |n %>><% loc('right to left') %></option>
+%#<option value="BT" <% ($direction||'TB') eq 'BT'? 'selected="selected"': '' |n %>><% _('bottom to top') %></option>
+%#<option value="RL" <% ($direction||'TB') eq 'RL'? 'selected="selected"': '' |n %>><% _('right to left') %></option>
</select><br />
-<% loc('Main type of links') %> <select name="leading_link">
+<% _('Main type of links') %> <select name="leading_link">
% foreach ( @link_types ) {
-<option value="<% $_ %>" <% ($leading_link||'Members') eq $_? 'selected="selected"': '' |n %>><% loc($_) %></option>
+<option value="<% $_ %>" <% ($leading_link||'Members') eq $_? 'selected="selected"': '' |n %>><% _($_) %></option>
% }
</select>
-<% loc('maximum depth') %> <select name="max_depth">
-<option value="0"><% loc('Unlimit') %></option>
+<% _('maximum depth') %> <select name="max_depth">
+<option value="0"><% _('Unlimit') %></option>
% foreach ( 1..6 ) {
<option value="<% $_ %>" <% ($max_depth||0) == $_? 'selected="selected"': '' %>><% $_ %></option>
% }
</select><br />
-<% loc('Show as well') %>:
+<% _('Show as well') %>:
% foreach my $type ( @link_types ) {
% my $checked = '';
% $checked = 'checked="checked"' if grep $type eq $_, @show_links;
-<input type="checkbox" name="show_links" value="<% $type %>" <% $checked |n %> /><% loc($type) %>
+<input type="checkbox" name="show_links" value="<% $type %>" <% $checked |n %> /><% _($type) %>
% }
<br />
@@ -118,7 +118,7 @@
}
</%PERL>
-<& /Elements/Submit, label => loc('Update Graph'), name => 'update' &>
+<& /Elements/Submit, label => _('Update Graph'), name => 'update' &>
</&>
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/ShowLegends
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/ShowLegends (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/ShowLegends Thu Aug 28 11:13:48 2008
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&| /Widgets/TitleBox, title => loc('Legends'), hideable => $hideable &>
+<&| /Widgets/TitleBox, title => _('Legends'), hideable => $hideable &>
<table>
<tr style="height: 2.8em;"><td>Status:</td><td>
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/index.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/index.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/index.html Thu Aug 28 11:13:48 2008
@@ -64,7 +64,7 @@
<input type="hidden" class="hidden" name="saved_search_id" value="<% $saved_search->{Id} %>" />
<& /Search/Elements/EditSearches,
%$saved_search,
- title => loc('Manage saved graphs'),
+ title => _('Manage saved graphs'),
type => 'Graph',
search_fields => \@save_arguments,
current_search => { map { $_ => $ARGS{$_} } @save_arguments },
@@ -110,5 +110,5 @@
search_fields => \@save_arguments,
);
-my $title = loc( "Ticket #%1 relationships graph", $id );
+my $title = _( "Ticket #%1 relationships graph", $id );
</%INIT>
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/ModifyLinks.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/ModifyLinks.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/ModifyLinks.html Thu Aug 28 11:13:48 2008
@@ -58,7 +58,7 @@
<input type="hidden" class="hidden" name="id" value="<%$Ticket->id%>" />
% $m->callback( Callbackname => 'form_start', args_ref => \%ARGS );
% my (@extra);
-% push @extra, titleright_raw => '<a href="'. RT->config->get('WebPath') . '/Ticket/Graphs/index.html?id='.$Ticket->id.'">'.loc('Graph').'</a>' unless RT->config->get('DisableGraphViz');
+% push @extra, titleright_raw => '<a href="'. RT->config->get('WebPath') . '/Ticket/Graphs/index.html?id='.$Ticket->id.'">'._('Graph').'</a>' unless RT->config->get('DisableGraphViz');
<&| /Widgets/TitleBox, title => _('Edit Links'), class=>'ticket-info-links', @extra &>
<& /Elements/EditLinks, object => $Ticket, merge => 1 &>
</&>
Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/FinalizeWidgetArguments
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/FinalizeWidgetArguments (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/FinalizeWidgetArguments Thu Aug 28 11:13:48 2008
@@ -49,10 +49,10 @@
my %args = %$widget_arguments;
%args = (%args, %{ $args{Callback}->() }) if $args{Callback};
- $args{'description'} = loc( $args{'description'} ) if $args{'description'};
+ $args{'description'} = _( $args{'description'} ) if $args{'description'};
if ( $args{'ValuesLabel'} ) {
while (my ($k, $v) = each %{ $args{'ValuesLabel'} } ) {
- $args{'ValuesLabel'}->{$k} = loc( $args{'ValuesLabel'}->{$k} );
+ $args{'ValuesLabel'}->{$k} = _( $args{'ValuesLabel'}->{$k} );
}
}
return \%args;
Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/String
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/String (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/String Thu Aug 28 11:13:48 2008
@@ -66,7 +66,7 @@
$default => 0,
$default_value => '',
-$default_label => loc( 'Default: %1', $default_value ),
+$default_label => _( 'Default: %1', $default_value ),
</%ARGS>
<%METHOD InputOnly>
Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/SavedSearch
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/SavedSearch (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/SavedSearch Thu Aug 28 11:13:48 2008
@@ -91,7 +91,7 @@
if ( my $search = $self->{CurrentSearch}{object} ) {
# rename
$search->set_description( $args->{saved_search_description} );
- push @actions, _($self->{SearchType}).loc( ' %1 renamed to %2.', $self->{CurrentSearch}{description}, $args->{saved_search_description} );
+ push @actions, _($self->{SearchType})._( ' %1 renamed to %2.', $self->{CurrentSearch}{description}, $args->{saved_search_description} );
}
else {
# new saved search
Modified: rt/branches/3.999-DANGEROUS/share/html/index.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/index.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/index.html Thu Aug 28 11:13:48 2008
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
% $m->out('--'.'>');
-% $m->comp('/Elements/Header', title=>loc("RT at a glance"), refresh => $session{'home_refresh_interval'});
+% $m->comp('/Elements/Header', title=>_("RT at a glance"), refresh => $session{'home_refresh_interval'});
% if (0) {
%# -->
<html><head>
@@ -88,7 +88,7 @@
if ( $ARGS{'quick_create'} ) {
my $queue_obj = new RT::Model::Queue( current_user => Jifty->web->current_user );
- $queue_obj->load($ARGS{queue}) or abort(loc("Queue could not be loaded."));
+ $queue_obj->load($ARGS{queue}) or abort(_("Queue could not be loaded."));
my $CFs = $queue_obj->ticket_custom_fields();
More information about the Rt-commit
mailing list