[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.12-62-gefa5499
? sunnavy
sunnavy at bestpractical.com
Wed Oct 7 14:30:10 EDT 2015
The branch, 4.2-trunk has been updated
via efa549951b8a906deceb8face6cb35ca164bac9b (commit)
via d18b08e4fee0f619f20c447903c0fb1e9c04a6b8 (commit)
from 0d81b058d5af67525cf2b71f1f1dc8e86263eb48 (commit)
Summary of changes:
lib/RT/Graph/Tickets.pm | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit d18b08e4fee0f619f20c447903c0fb1e9c04a6b8
Author: Christian Loos <cloos at netcologne.de>
Date: Fri Jun 19 17:02:27 2015 +0200
slightly change label string and mark for translation
'Custom Fields' is used in other places, reuse this string for
translations.
diff --git a/lib/RT/Graph/Tickets.pm b/lib/RT/Graph/Tickets.pm
index 6fc5310..30033f9 100644
--- a/lib/RT/Graph/Tickets.pm
+++ b/lib/RT/Graph/Tickets.pm
@@ -163,7 +163,8 @@ sub TicketProperties {
next if $seen{ lc $cf->Name }++;
next if $cf->Type eq 'Image';
if ( $first ) {
- push @res, 'CustomFields', [];
+ push @res, 'Custom Fields', # loc
+ [];
$first = 0;
}
push @{ $res[-1] }, 'CF.{'. $cf->Name .'}';
commit efa549951b8a906deceb8face6cb35ca164bac9b
Author: Christian Loos <cloos at netcologne.de>
Date: Fri Jun 19 16:32:46 2015 +0200
display translated ticket properties and status values
diff --git a/lib/RT/Graph/Tickets.pm b/lib/RT/Graph/Tickets.pm
index 30033f9..d6176c9 100644
--- a/lib/RT/Graph/Tickets.pm
+++ b/lib/RT/Graph/Tickets.pm
@@ -104,16 +104,19 @@ sub gv_escape($) {
return $value;
}
+sub loc { return HTML::Mason::Commands::loc(@_) };
+
our (%fill_cache, @available_colors) = ();
our %property_cb = (
- Queue => sub { return $_[0]->QueueObj->Name || $_[0]->Queue },
- CF => sub {
+ Queue => sub { return $_[0]->QueueObj->Name || $_[0]->Queue },
+ Status => sub { return loc($_[0]->Status) },
+ CF => sub {
my $values = $_[0]->CustomFieldValues( $_[1] );
return join ', ', map $_->Content, @{ $values->ItemsArrayRef };
},
);
-foreach my $field (qw(Subject Status TimeLeft TimeWorked TimeEstimated)) {
+foreach my $field (qw(Subject TimeLeft TimeWorked TimeEstimated)) {
$property_cb{ $field } = sub { return $_[0]->$field },
}
foreach my $field (qw(Creator LastUpdatedBy Owner)) {
@@ -204,7 +207,8 @@ sub _PropertiesToFields {
$RT::Logger->error("Couldn't find property handler for '$key' and '@subkeys' subkeys");
next;
}
- push @fields, ($subkeys[0] || $key) .': '. $property_cb{ $key }->( $args{'Ticket'}, @subkeys );
+ my $label = $key eq 'CF' ? $subkeys[0] : loc($key);
+ push @fields, $label .': '. $property_cb{ $key }->( $args{'Ticket'}, @subkeys );
}
return @fields;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list