[Rt-commit] rt branch, 4.2/language-change-results, created. rt-4.0.0rc7-248-g6e83a72
Shawn Moore
sartak at bestpractical.com
Fri Apr 29 12:58:22 EDT 2011
The branch, 4.2/language-change-results has been created
at 6e83a725013cb70fbd716f7fa4e7e15a2e10e897 (commit)
- Log -----------------------------------------------------------------
commit 6e83a725013cb70fbd716f7fa4e7e15a2e10e897
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Fri Apr 29 12:47:55 2011 -0400
Update language handle *before* generating results messages
With this change, RT will display results in the same language as
the rest of the page, instead of whatever your old language was.
Before, when switching from (say) JA to EN, the entire page is EN
except for the the result messages being in JA, and vice versa
diff --git a/share/html/User/Prefs.html b/share/html/User/Prefs.html
index 0ace58a..2b4dadd 100755
--- a/share/html/User/Prefs.html
+++ b/share/html/User/Prefs.html
@@ -225,6 +225,11 @@ $m->callback(
ARGSRef => \%ARGS,
);
+if ( $Lang ) {
+ $session{'CurrentUser'}->LanguageHandle($Lang);
+ $session{'CurrentUser'} = $session{'CurrentUser'}; # force writeback
+}
+
push @results, UpdateRecordObject (
AttributesRef => \@fields,
Object => $UserObj,
@@ -233,11 +238,6 @@ push @results, UpdateRecordObject (
push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj );
-if ( $Lang ) {
- $session{'CurrentUser'}->LanguageHandle($Lang);
- $session{'CurrentUser'} = $session{'CurrentUser'}; # force writeback
-}
-
# Deal with special fields: Privileged, Enabled, and Password
if ( $SetPrivileged and $Privileged != $UserObj->Privileged ) {
my ($code, $msg) = $UserObj->SetPrivileged( $Privileged );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list