Closed
Bug 425288
Opened 17 years ago
Closed 17 years ago
checksetup.pl displays messages using the first language available, alphabetically
Categories
(Bugzilla :: Installation & Upgrading, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
Running checksetup.pl on Bugzilla 3.x.3+ displays:
...
Removing existing compiled templates ...
Precompiling templates...
Выпраўленне дазволаў файлаў...
Checking for GraphViz (any) ok: found
The "unreadable" text is because I have be, en, fr, and ru installed, and so it takes the first language available, alphabetically. If I add a symlink aa -> fr, then I get messages in french.
If it cannot find the language I'm using in my shell, it should fall back to english so that we have a chance to understand what checksetup.pl displays.
Flags: blocking3.2+
Flags: blocking3.0.4?
Comment 1•17 years ago
|
||
checksetup wasn't localizable in 3.0, so this isn't affecting 3.0, as far as I know.
Flags: blocking3.0.4? → blocking3.0.4-
Target Milestone: Bugzilla 3.0 → Bugzilla 3.2
Version: 3.0.3 → 3.1.3
Comment 2•17 years ago
|
||
Also it should correctly derive 'fr' from 'fr_CH.UTF-8' LANG value
Comment 3•17 years ago
|
||
(In reply to comment #2)
> Also it should correctly derive 'fr' from 'fr_CH.UTF-8' LANG value
Yes, actually, supposedly it's already doing that, but the code isn't working for some reason. I think it might be the ".UTF-8" that's confusing it, not the _CH.
Target Milestone: Bugzilla 3.2 → Bugzilla 3.0
Version: 3.1.3 → 3.0.3
Assignee | ||
Comment 4•17 years ago
|
||
This patch fixes two things:
1) checksetup.pl parses LC_CTYPE for us, assuming some distros set LC_CTYPE to e.g. fr_CH.UTF-8 which should be read as fr-CH.
2) checksetup.pl also makes the assumption that if fr-CH is not present, it will look for fr.
3) If neither fr-CH nor fr is installed, falls back to en instead of the alphabetical list of languages found, which in 99% of cases won't return the language we want (and in my case, it was returning belorussian because it comes before fr, en and ru).
Comment 5•17 years ago
|
||
Comment on attachment 312125 [details] [diff] [review]
patch, v1
>Index: checksetup.pl
Put all this stuff into Bugzilla::Install::Util instead of into checksetup.pl directly.
>+ # It's pretty sure that there is no language pack of the form fr-CH
>+ # installed, so we also include fr as a wanted language.
The template code should be doing that fallback itself. If it isn't, that's a bug.
>Index: Bugzilla/Install/Util.pm
>- if (!@usedlanguages && $params->{use_languages}) {
>- @usedlanguages = @supported;
>- }
Hm, that doesn't defeat use_languages?
Attachment #312125 -
Flags: review?(mkanat) → review-
Comment 6•17 years ago
|
||
Comment on attachment 312125 [details] [diff] [review]
patch, v1
This is good, r=Wurblzap. For this particular use case (locale always being a single string only; users *cannot* specify a list of languages even if they wanted), I'm even fine with the region part of the code being cut off so that only the language remains. (Nit: perhaps you should re-word "It's pretty sure" to "It's pretty common".)
During testing, it turned out that setlocale returns unsuitable values on Windows. I filed bug 425620 for this.
Attachment #312125 -
Flags: review- → review+
Comment 7•17 years ago
|
||
Hm, I missed Max' comment somehow.
(In reply to comment #5)
> (From update of attachment 312125 [details] [diff] [review])
> >Index: checksetup.pl
>
> Put all this stuff into Bugzilla::Install::Util instead of into checksetup.pl
> directly.
I agree with the move out of checksetup.pl; this should be done.
> >+ # It's pretty sure that there is no language pack of the form fr-CH
> >+ # installed, so we also include fr as a wanted language.
>
> The template code should be doing that fallback itself. If it isn't, that's a
> bug.
No, it's not. See bug 258246. Users must be able to prefer fr-CH over en over fr. It's good that this fallback is done only in the setlocale case.
> >Index: Bugzilla/Install/Util.pm
> >- if (!@usedlanguages && $params->{use_languages}) {
> >- @usedlanguages = @supported;
> >- }
>
> Hm, that doesn't defeat use_languages?
No, its real work is done some 20 lines or so above.
Hardware: All → Other
Comment 8•17 years ago
|
||
Okay, approved with the code moved into a subroutine in Install::Util.
Flags: approval3.0+
Flags: approval+
Comment 9•17 years ago
|
||
Max, I'm very sorry I accidentally overrode your r-. This was not my intention.
I had kept the attachment open for a long time and hadn't noticed your flag
change -- it was still at r? for me. Had I seen your flag change, I'd commented
only without changing the flag.
Assignee | ||
Comment 10•17 years ago
|
||
Here is the patch I'm going to check in. Carrying forward r+ per discussion with mkanat on IRC.
Attachment #312125 -
Attachment is obsolete: true
Attachment #312269 -
Flags: review+
Assignee | ||
Comment 11•17 years ago
|
||
Adding POD to the previous patch.
Attachment #312269 -
Attachment is obsolete: true
Attachment #312270 -
Flags: review+
Assignee | ||
Comment 12•17 years ago
|
||
OK, the issue about 3.0 is unrelated to this bug and also affects 3.2. I will file a separate bug for it. So this bug and this patch are only about 3.2.
Flags: blocking3.0.4-
Flags: approval3.0+
Target Milestone: Bugzilla 3.0 → Bugzilla 3.2
Assignee | ||
Comment 13•17 years ago
|
||
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl
new revision: 1.557; previous revision: 1.556
done
Checking in Bugzilla/Install/Util.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/Util.pm,v <-- Util.pm
new revision: 1.12; previous revision: 1.11
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 14•17 years ago
|
||
(In reply to comment #12)
> OK, the issue about 3.0 is unrelated to this bug and also affects 3.2. I will
> file a separate bug for it.
I filed bug 425746.
You need to log in
before you can comment on or make changes to this bug.
Description
•