https://bugzilla.wikimedia.org/show_bug.cgi?id=42355

--- Comment #8 from Bawolff (Brian Wolff) <bawolff...@gmail.com> ---
(In reply to Tyler Romeo from comment #7)
> (In reply to Bawolff (Brian Wolff) from comment #6)
> > I disagree
> > 
> > Set:
> > 
> > $wgLanguageCode = "fa";
> > $wgDefaultUserOptions['date'] = 'hebrew';
> > 
> > Go to Special:Preferences. Everything is fine.
> > 
> > Keep the same settings. Go to Special:Preferences?uselang=en (or switch your
> > user user language to en). Exception is thrown.
> > 
> > I consider that behaviour to be pretty broken. Not sure what the fix is.
> > Maybe date preferences should be both the content language options + the
> > user language options (?)
> 
> Yeah definitely agree with you there.
> 
> The solution is to have a fallback method for finding the default. However,
> it seems the code already has such a mechanism (see the code changes both
> you and I linked), but for some reason that is not working anymore.

Its because that code is changing the $wgDefaultUserOptions, but the other code
is using User::getDefaultOptions(), which caches a modified
$wgDefaultUserOptions in a static variable.

Modifying $wgDefaultUserOptions in Preferences::getDateOptions() seems really
really hacky to me. This should probably be changed to happen in
User::getDefaultOptions(), and possibly also Preferences::getDateOptions()
should be using content language, or maybe content language + user language
combined. Definitely should not use only user language.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to