Closed Bug 419388 Opened 18 years ago Closed 18 years ago

004template.t should fall back to "en"

Categories

(Bugzilla :: Testing Suite, defect)

3.1.3
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: vitaly.fedrushkov, Assigned: vitaly.fedrushkov)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

When running against localized template set, 004template.t complains about global/footer.html.tmpl and like. These templates do not exist in template/<lang>/* indeed. They are never translated because do not contain any human readable text. See also bug 182975 comment 22.
Attached patch patch v1 (obsolete) — — Splinter Review
Logic changed to reflect template_include_path of Bugzilla/Install/Util.pm
Attachment #305434 - Flags: review?(mkanat)
Blocks: 395613
Comment on attachment 305434 [details] [diff] [review] patch v1 >- split(':', $include_path{$lang} . ":" . $include_path{"en"})); >+ split(':', $include_path{$lang})); Is that true that Bugzilla uses the english templates if it cannot find the localized ones? Marc? Anyway, this patch is reversed.
Attachment #305434 - Flags: review?(mkanat) → review-
(In reply to comment #2) > Is that true that Bugzilla uses the english templates if it cannot find the > localized ones? Marc? Bug 182975 comment 14: > For the record... Gradual translation, defaulting to en, is already possible if > you keep defaultlanguage at en. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla%2Fwebtools%2Fbugzilla%2FBugzilla%2FInstall%2FUtil.pm&rev=&cvsroot=%2Fcvsroot#179 | # We always include English at the bottom if it's not there, even if | # somebody removed it from use_languages. | if (!grep($_ eq 'en', @usedlanguages)) { | push(@usedlanguages, 'en'); | } In 3.1 there is no 'defaultlanguage' but "en" is enforced. See also bug 182975 comment 35 and below.
Right, Vitaly. Sorry I didn't answer earlier.
Attached patch v1 reversed (obsolete) — — Splinter Review
(In reply to comment #2) > Anyway, this patch is reversed. Oh I see. My foul.
Attachment #305434 - Attachment is obsolete: true
Attachment #305696 - Flags: review?(LpSolit)
Attached patch v1 reversed — — Splinter Review
v1 reversed
Attachment #305696 - Attachment is obsolete: true
Attachment #305713 - Flags: review?(LpSolit)
Attachment #305696 - Flags: review?(LpSolit)
Comment on attachment 305713 [details] [diff] [review] v1 reversed >- split(':', $include_path{$lang})); >+ split(':', $include_path{$lang} . ":" . $include_path{"en"})); I will let Marc review this one as my review queue is already big enough. And as the maintainer of Germzilla, he is the ideal reviewer for this patch anyway. My only remark so far is that appending ":foo" to split on ":" right after seems useless to me. Why not appending foo to the array directly? I will let Marc test it and decide.
Attachment #305713 - Flags: review?(LpSolit) → review?(wurblzap)
Comment on attachment 305713 [details] [diff] [review] v1 reversed The patch is good; r=Wurblzap. (In reply to comment #7) > My only remark so far is that appending ":foo" to split on ":" right after > seems useless to me. Why not appending foo to the array directly? I will let Appending and splitting is necessary because $include_path{"en"} is a colon-separated list as well.
Attachment #305713 - Flags: review?(wurblzap) → review+
Assignee: zach → vitaly.fedrushkov
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: approval?
Flags: approval3.2?
Target Milestone: --- → Bugzilla 3.2
OK for 3.2.
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval3.2?
Flags: approval+
Checking in t/004template.t; /cvsroot/mozilla/webtools/bugzilla/t/004template.t,v <-- 004template.t new revision: 1.40; previous revision: 1.39 done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
We need a fix for 3.0 as well. runtests.pl 4 fails on bugzilla30l10n due to this bug. Please reopen if you plan to fix this bug on 3.0.
Actually, this patch works great on 3.0 as well. a+ for 3.0.4. Checking in t/004template.t; /cvsroot/mozilla/webtools/bugzilla/t/004template.t,v <-- 004template.t new revision: 1.38.2.1; previous revision: 1.38 done
Flags: approval3.0+
Target Milestone: Bugzilla 3.2 → Bugzilla 3.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: