6.0.0-alpha10
5/14/25

[#10718] Cli scripts, using the user_admin param on appInit resets language setting
Summary Cli scripts, using the user_admin param on appInit resets language setting
Queue Kronolith
Queue Version Git master
Type Bug
State Assigned
Priority 1. Low
Owners jan (at) horde (dot) org
Requester goncalo.queiros (at) portugalmail (dot) net
Created 11/07/2011 (4937 days ago)
Due
Updated 08/27/2013 (4278 days ago)
Assigned 08/27/2013 (4278 days ago)
Resolved
Milestone
Patch No

History
08/27/2013 11:28:40 AM Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
11/14/2011 11:10:59 AM goncalo (dot) queiros (at) portugalmail (dot) net Comment #7 Reply to this comment
Wouldn't it work if you set the default language in the preferences too?
No
11/13/2011 08:25:38 PM Jan Schneider Comment #6 Reply to this comment
Wouldn't it work if you set the default language in the preferences too?
11/09/2011 02:47:00 PM goncalo (dot) queiros (at) portugalmail (dot) net Comment #5
New Attachment: app_init.diff Download
Reply to this comment
It is, I was wondering why you would do this with kronolith-agenda though.

That options sets the current user to the first admin user. That 
user probably doesn't have a language set in his prefs, that's why 
you don't get translated strings.
Just used kronolith-agenda as an example ;-)
I don't think its a question of prefs since if i swap the code flow 
(as shown in the patch attached), it works fine.

I didn't propose the patch in the first place, because i don't think 
this is the correct way to fix it.

11/09/2011 10:53:12 AM Jan Schneider Comment #4 Reply to this comment
It is, I was wondering why you would do this with kronolith-agenda though.

That options sets the current user to the first admin user. That user 
probably doesn't have a language set in his prefs, that's why you 
don't get translated strings.
11/09/2011 01:02:11 AM goncalo (dot) queiros (at) portugalmail (dot) net Comment #3 Reply to this comment
Then why do you add it?
Because i need to run a script from command line has a privileged user.
Isn't this the correct way?
11/08/2011 05:26:35 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Then why do you add it?
11/07/2011 04:07:34 PM goncalo (dot) queiros (at) portugalmail (dot) net Comment #1
Milestone ⇒
State ⇒ Unconfirmed
Patch ⇒ No
Queue ⇒ Kronolith
Summary ⇒ Cli scripts, using the user_admin param on appInit resets language setting
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
Using kronolith/bin/kronolith_agenda as an example, if after the 
appInit call you add

var_dump(_("on the same weekday"));die();

the sentence is correctly translated.

Althoug, if you add the option 'user_admin' => true to 
Horde_Registry::appInit call, the sentence will no longer be translated

Saved Queries