6.0.0-git
2018-12-15

[#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 2011-11-07 (2595 days ago)
Due
Updated 2013-08-27 (1936 days ago)
Assigned 2013-08-27 (1936 days ago)
Resolved
Milestone
Patch No

History
2013-08-27 11:28:40 Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
2011-11-14 11:10:59 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
2011-11-13 20:25:38 Jan Schneider Comment #6 Reply to this comment
Wouldn't it work if you set the default language in the preferences too?
2011-11-09 14:47:00 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.

2011-11-09 10:53:12 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.
2011-11-09 01:02:11 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?
2011-11-08 17:26:35 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Then why do you add it?
2011-11-07 16:07:34 goncalo (dot) queiros (at) portugalmail (dot) net Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Cli scripts, using the user_admin param on appInit resets language setting
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
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