6.0.0-beta1
7/5/25

[#9822] Use the correct language on pages without autentication required
Summary Use the correct language on pages without autentication required
Queue Horde Base
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester rui.carneiro (at) portugalmail (dot) net
Created 04/06/2011 (5204 days ago)
Due
Updated 04/12/2011 (5198 days ago)
Assigned
Resolved 04/12/2011 (5198 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
04/12/2011 05:47:02 PM Git Commit Comment #9 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9822: Add package.xml entry

  1 files changed, 5 insertions(+), 4 deletions(-)
http://git.horde.org/horde-git/-/commit/720cd5ca6315be83839ccad827d9975adc11b7ea
04/12/2011 05:46:36 PM Michael Slusarz Comment #8
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
See Ticket #9437 - I was mistaken.  I guess we were using 
prefs->language as the default language.

But the patch provided here is still wrong.  The correct solution, 
reinitializing the language after preferences have been loaded and 
ONLY in the pre-auth situation, has been implemented.
04/12/2011 05:45:42 PM Git Commit Comment #7 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9822: Reinitialize language after loading prefs before authentication

  1 files changed, 5 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/bb1ba8c73fc18e667d70541cc25b2b7fe868275c
04/12/2011 04:53:09 PM Michael Slusarz Comment #6 Reply to this comment
I changed the default nls language to 'pt_PT', and the login and 
registry page are still in English which doesn't seem to be the 
correct behavior, because i've defined the languages everywhere i 
could imagine, and still my newcomers will have its pages in English 
until they log in.
The language is determined in Horde_Registry::preferredLang() so you 
might want to look there.  We select languages in this order:

1. Preference (but this is NOT intended to be used pre-authentication; 
in fact, there should probably be a getAuth() check there)
2. Language selected on login screen.
3. Language in session (a guest user can set a language in a session)
4. Browser's list of accepted languages
5. NLS curr_default
6. Fallback to en_US if all else fails

I tend to think that your users' browser is reporting that it wants 
English as its first option.
04/12/2011 09:22:45 AM goncalo (dot) queiros (at) portugalmail (dot) net Comment #5 Reply to this comment
Michael, i understand that our patch is not correct, but i think this 
is still a valid bug.

I changed the default nls language to 'pt_PT', and the login and 
registry page are still in English which doesn't seem to be the 
correct behavior, because i've defined the languages everywhere i 
could imagine, and still my newcomers will have its pages in English 
until they log in.
04/11/2011 07:29:47 PM Michael Slusarz State ⇒ Not A Bug
 
04/07/2011 04:39:23 PM Michael Slusarz Comment #4
Version ⇒ Git master
Reply to this comment
This is not correct.  As the notes say, we are expecting prefs not to
be set here.  We should not be hackishly grabbing the language from
the prefs file, esepcially since this does not take into effect
whether the pref is locked.
We know this is a bit hackish, but still, we thought that the 
language pref being set (locked or not), gives you the desired 
default language for the website.
The default language for the website is provided by 
$this->nlsconfig->curr_default, not prefs->language.
04/06/2011 07:03:11 PM goncalo (dot) queiros (at) portugalmail (dot) net Comment #3 Reply to this comment
This is not correct.  As the notes say, we are expecting prefs not 
to be set here.  We should not be hackishly grabbing the language 
from the prefs file, esepcially since this does not take into effect 
whether the pref is locked.
We know this is a bit hackish, but still, we thought that the language 
pref being set (locked or not), gives you the desired default language 
for the website.

04/06/2011 04:48:38 PM Michael Slusarz Comment #2
Version ⇒
Queue ⇒ Horde Base
Reply to this comment
This is not correct.  As the notes say, we are expecting prefs not to 
be set here.  We should not be hackishly grabbing the language from 
the prefs file, esepcially since this does not take into effect 
whether the pref is locked.
04/06/2011 10:14:01 AM rui (dot) carneiro (at) portugalmail (dot) net Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: 0001-Load-prefs-file-to-use-the-correct-language.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Use the correct language on pages without autentication required
Type ⇒ Bug
Reply to this comment
Pages like login.php and signup.php.

Patch attached (Trying to solve a chicken and egg problem :p)

Saved Queries