[Rt-commit] rt branch, 3.8-trunk, updated. 55cdb51b664db55e231085c71e2140a81a91a512
Ruslan Zakirov
ruz at bestpractical.com
Tue Aug 11 12:18:50 EDT 2009
The branch, 3.8-trunk has been updated
via 55cdb51b664db55e231085c71e2140a81a91a512 (commit)
via 38489563292eb4723c71daee0082a4c56fa38897 (commit)
via fea07707f1d66e9f3bdde61db5f606bfb0d6c936 (commit)
from d48f87625bb39b459370c11711f7e68fddb07ca2 (commit)
Summary of changes:
lib/RT/I18N/ru.pm | 2 +-
lib/RT/I18N/ru.po | 6 +++---
share/html/Search/Chart | 40 +++++++++++++++++++---------------------
3 files changed, 23 insertions(+), 25 deletions(-)
- Log -----------------------------------------------------------------
commit fea07707f1d66e9f3bdde61db5f606bfb0d6c936
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date: Tue Aug 11 20:13:02 2009 +0400
fix localization of pie charts
labels for pie charts were not properly localized because of dash
diff --git a/share/html/Search/Chart b/share/html/Search/Chart
index c24e07d..59e9fc6 100644
--- a/share/html/Search/Chart
+++ b/share/html/Search/Chart
@@ -52,8 +52,6 @@ $SecondaryGroupBy => undef
$ChartStyle => 'bars'
</%args>
<%init>
-my @keys;
-my @values;
my $chart_class;
use GD;
use GD::Text;
@@ -122,21 +120,26 @@ my %class = (
);
my $class = $class{ $PrimaryGroupBy };
+my %data;
while ( my $entry = $tix->Next ) {
+ my $key;
if ( $class ) {
my $q = $class->new( $session{'CurrentUser'} );
$q->Load( $entry->__Value( $value_name ) );
- push @keys, $q->Name;
+ $key = $q->Name;
}
else {
- push @keys, $entry->__Value($value_name);
+ $key = $entry->__Value($value_name);
}
-
- $keys[-1] ||= loc('(no value)');
+ $key ||= '(no value)';
+
+ my $value = $entry->__Value( $count_name );
if ($chart_class eq 'GD::Graph::pie') {
- $keys[-1] .= " - ". $entry->__Value( $count_name );
+ $key = loc($key) ." - ". $value;
+ } else {
+ $key = loc($key);
}
- push @values, $entry->__Value($count_name);
+ $data{ $key } = $value;
}
# XXX: Convert 1970-01-01 date to the 'Not Set'
@@ -146,23 +149,18 @@ if ( $PrimaryGroupBy =~ /(Daily|Monthly|Annually)$/ ) {
$re = qr{1970-01-01} if $PrimaryGroupBy =~ /Daily$/;
$re = qr{1970-01} if $PrimaryGroupBy =~ /Monthly$/;
$re = qr{1970} if $PrimaryGroupBy =~ /Annually$/;
- foreach (@keys) {
- s/^$re/loc('Not Set')/e;
- }
+ foreach my $k (keys %data) {
+ my $tmp = $k;
+ $tmp =~ s/^$re/loc('Not Set')/e or next;
+ $data{$tmp} = delete $data{$k};
+ }
}
-unless (@keys && @values) {
- @keys = ('');
- @values = (0);
+unless (keys %data) {
+ $data{''} = 0;
}
-my %data;
-my %loc_keys;
-foreach my $key (@keys) { $data{$key} = shift @values; $loc_keys{$key} = loc($key); }
-my @sorted_keys = map { $loc_keys{$_}} sort { $loc_keys{$a} cmp $loc_keys{$b} } keys %loc_keys;
-my @sorted_values = map { $data{$_}} sort { $loc_keys{$a} cmp $loc_keys{$b} } keys %loc_keys;
-
-my $plot = $chart->plot( [ [@sorted_keys], [@sorted_values] ] ) or die $chart->error;
+my $plot = $chart->plot( [ [sort keys %data], [map $data{$_}, sort keys %data] ] ) or die $chart->error;
$m->comp( 'SELF:Plot', plot => $plot, %ARGS );
</%init>
commit 38489563292eb4723c71daee0082a4c56fa38897
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date: Tue Aug 11 20:16:48 2009 +0400
Fix russian quant logic, thanks to Max Kosmach
diff --git a/lib/RT/I18N/ru.pm b/lib/RT/I18N/ru.pm
index 5898b47..963553c 100755
--- a/lib/RT/I18N/ru.pm
+++ b/lib/RT/I18N/ru.pm
@@ -63,7 +63,7 @@ sub numerate {
my $form = 0;
if ( $n%10 == 1 && $n%100 != 11 ) {
$form = 0;
- } elsif ( $n%10 <=4 && ($n%100 < 10 || $n%100 >= 20) ) {
+ } elsif ( $n%10 >= 2 && $n%10 <= 4 && ($n%100 < 10 || $n%100 >= 20) ) {
$form = 1;
} else {
$form = 2;
commit 55cdb51b664db55e231085c71e2140a81a91a512
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date: Tue Aug 11 20:18:24 2009 +0400
* updates for Ru translation from Max Kosmach
diff --git a/lib/RT/I18N/ru.po b/lib/RT/I18N/ru.po
index 5002118..f8894ad 100755
--- a/lib/RT/I18N/ru.po
+++ b/lib/RT/I18N/ru.po
@@ -2876,7 +2876,7 @@ msgstr ""
#: lib/RT/Config.pm:251
msgid "Home page refresh interval"
-msgstr ""
+msgstr "ÐнÑеÑвал Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð¾Ð¼Ð°Ñней ÑÑÑаниÑÑ"
#: share/html/Elements/RT__User/ColumnMap:86
msgid "HomePhone"
@@ -5081,7 +5081,7 @@ msgstr "ÐбновлÑÑÑ"
#: share/html/Elements/Refresh:59
#. ($value/60)
msgid "Refresh this page every %1 minutes."
-msgstr "ÐбновлÑÑÑ ÑÑÑ ÑÑÑаниÑÑ ÐºÐ°Ð¶Ð´Ñе %1 минÑÑ."
+msgstr "ÐбновлÑÑÑ ÑÑÑ ÑÑÑаниÑÑ ÐºÐ°Ð¶Ð´Ñе %quant(%1,минÑÑа,минÑÑÑ,минÑÑ)."
#: lib/RT/Transaction_Overlay.pm:839
#. ($ticket->Subject)
@@ -5402,7 +5402,7 @@ msgstr "СгÑÑппиÑоваÑÑ ÑезÑлÑÑаÑÑ Ð¿Ð¾Ð¸Ñка по %1"
#: lib/RT/Config.pm:221
msgid "Search results refresh interval"
-msgstr ""
+msgstr "ÐнÑеÑвал Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÑÑÑаниÑÑ ÑезÑлÑÑаÑов поиÑка"
#: share/html/Search/Simple.html:61
msgid "Searching the full text of every ticket can take a long time, but if you need to do it, you can search for any word in full ticket history for any word by typing <b>fulltext:<i>word</i></b>."
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list