[Rt-commit] rt branch, 4.0/misc-localization-fixes, created. rt-4.0.10-90-gc37fcfa

Emannuel Lacour elacour at bestpractical.com
Thu Mar 14 13:04:50 EDT 2013


The branch, 4.0/misc-localization-fixes has been created
        at  c37fcfa7e38b73c263e3d9ce208156b3d4b64190 (commit)

- Log -----------------------------------------------------------------
commit a3216a02d775885503a2f569b6f5b0debbd91f22
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date:   Thu Mar 14 18:02:51 2013 +0100

    Localize "dashboard" word in result of a dashboard creation

diff --git a/lib/RT/Dashboard.pm b/lib/RT/Dashboard.pm
index 80a68be..e7f24a8 100644
--- a/lib/RT/Dashboard.pm
+++ b/lib/RT/Dashboard.pm
@@ -109,7 +109,7 @@ An object of this class is called "dashboard"
 
 =cut
 
-sub ObjectName { "dashboard" }
+sub ObjectName { "dashboard" } #loc
 
 sub SaveAttribute {
     my $self   = shift;
diff --git a/lib/RT/SharedSetting.pm b/lib/RT/SharedSetting.pm
index 6dd21cb..3467167 100644
--- a/lib/RT/SharedSetting.pm
+++ b/lib/RT/SharedSetting.pm
@@ -210,11 +210,11 @@ sub Save {
         $self->{'Attribute'} = $object->Attributes->WithId($att_id);
         $self->{'Id'}        = $att_id;
         $self->{'Privacy'}   = $privacy;
-        return ( 1, $self->loc( "Saved [_1] [_2]", $self->ObjectName, $name ) );
+        return ( 1, $self->loc( "Saved [_1] [_2]", $self->loc( $self->ObjectName ), $name ) );
     }
     else {
         $RT::Logger->error($self->ObjectName . " save failure: $att_msg");
-        return ( 0, $self->loc("Failed to create [_1] attribute", $self->ObjectName) );
+        return ( 0, $self->loc("Failed to create [_1] attribute", $self->loc( $self->ObjectName ) ) );
     }
 }
 

commit c37fcfa7e38b73c263e3d9ce208156b3d4b64190
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date:   Thu Mar 14 18:03:23 2013 +0100

    Localize saved searches in "Settings->Saved Searches" menu

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 77f49b1..c8d29d1 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -491,7 +491,7 @@ my $build_main_nav = sub {
 
         for my $search (@$searches) {
             $search_menu->child( "search-" . $i++ =>
-                title => $search->[0],
+                title => loc($search->[0]),
                 path  => "/Prefs/Search.html?"
                        . $query_string->( name => ref( $search->[1] ) . '-' . $search->[1]->Id ),
             );

-----------------------------------------------------------------------


More information about the Rt-commit mailing list