File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Open diff view settings
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ use Bugzilla::Util qw(get_text);
3636use Bugzilla::Version;
3737
3838sub SETTINGS {
39+ my @languages = split (/ [\s ,]+/ , Bugzilla-> params-> {' languages' });
3940 return {
4041 # 2005-03-03 travis@sedsystems.ca -- Bug 41972
4142 display_quips => { options => [" on" , " off" ], default => " on" },
@@ -58,8 +59,8 @@ sub SETTINGS {
5859 # 2006-08-04 wurblzap@gmail.com -- Bug 322693
5960 skin => { subclass => ' Skin' , default => ' standard' },
6061 # 2006-12-10 LpSolit@gmail.com -- Bug 297186
61- lang => { options => [ split ( / [ \s ,]+ / , Bugzilla -> params -> { ' languages' })] ,
62- default => Bugzilla -> params -> { ' defaultlanguage ' } }
62+ lang => { options => \ @ languages ,
63+ default => $languages [0] }
6364 }
6465};
6566
Original file line number Diff line number Diff line change 438438 <para >After untarring the localizations (or creating your own) in the
439439 <filename class =" directory" >BUGZILLA_ROOT/template</filename > directory,
440440 you must update the <option >languages</option > parameter to contain any
441- localizations you'd like to permit. You may also wish to set the
442- <option >defaultlanguage </option > parameter to something other than
443- < quote >en</ quote > if you don't want English to be the default language.
441+ localizations you'd like to permit. You may also wish to re-order
442+ the <option >languages </option > parameter so that < quote >en</ quote >
443+ doesn't come first, if you don't want English to be the default language.
444444 </para >
445445 </section >
446446
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ if ($action eq 'save' && $current_module) {
145145 # then we delete it (the user pref is reset to the default one).
146146 my @languages = split (/ [\s ,]+/ , Bugzilla-> params-> {' languages' });
147147 map {trick_taint($_ )} @languages ;
148- add_setting(' lang' , \@languages , Bugzilla -> params -> { ' defaultlanguage ' } , undef , 1);
148+ add_setting(' lang' , \@languages , $languages [0] , undef , 1);
149149 }
150150
151151 $vars -> {' message' } = ' parameters_updated' ;
You can’t perform that action at this time.
0 commit comments