Open
Bug 395613
Opened 17 years ago
Updated 15 years ago
Fall back filterexceptions.pl to xx/default or (en/default) if it's not there for xx/custom (or xx/default)
Categories
(Bugzilla :: Testing Suite, defect)
Tracking
()
NEW
People
(Reporter: Wurblzap, Unassigned)
References
Details
Attachments
(1 obsolete file)
The testing suite currently incorrectly reports errors on two occasions visible only when having installed an additional language. Firstly, additional languages don't necessarily supply all templates, because Bugzilla transparently falls back to English templates. The testing suite unnecessarily expects all templates to be in place for all languages. Secondly, additional languages usually don't need a specific filterexceptions.pl file because it's the template variables we're filtering, not template text. (Imho, it's a good thing if an additional language doesn't have it's own filterexceptions.pl file because I expect the English one to be the most up-to-date one.) The testing suite unnecessarily expects filterexceptions.pl for all languages. Steps to reproduce: 1. Copy template/en/default/index.html.tmpl to template/xy/default/index.html.tmpl 2. Watch runtests.pl fail The attached patch makes the testing suite fall back to English in both situations mentioned above. (It also contains some whitespace fixes I made while I was there.)
Attachment #280288 -
Flags: review?(gerv)
Comment 1•17 years ago
|
||
Comment on attachment 280288 [details] [diff] [review] Patch >+ } >+ else { >+ if ($lang eq $default_language) { >+ ok(0, "$file cannot be located --ERROR"); >+ print $fh "Looked in:\n " . join("\n ", @path); >+ } >+ else { >+ ok(1, "$file does not exist, falls back to default language " . >+ "$default_language --WARNING"); >+ } My issue with this, and the other similar piece of fallback code, is that it doesn't do the right thing if both problems are present. That is to say, it correctly errors if you can't find the file in the default language, and it correctly warns if you fallback, but it doesn't correctly error if you have to fallback but the file in the default language is also not there. At least, not as far as I can see. Can this be fixed? Gerv
Reporter | ||
Comment 2•17 years ago
|
||
Hi Gerv, thanks for looking into this. I'm assuming that the dependencies are similar -- that is to say, I'm assuming that any additional language set depends on a *subset* of the templates of the default language. I gather you're saying that this assumption may be wrong?
Comment 3•17 years ago
|
||
That assumption may, in some circumstances, be wrong. For example, imagine a Bugzilla used entirely in French, so they have a French localisation. They then customise it to add some extra screens. Obviously, they aren't going to translate their customisations into English. Gerv
Reporter | ||
Comment 4•17 years ago
|
||
Comment on attachment 280288 [details] [diff] [review] Patch This patch doesn't work at all. It tells you it tests each language in turn, but always tests en/default.
Attachment #280288 -
Attachment is obsolete: true
Attachment #280288 -
Flags: review?(gerv)
Reporter | ||
Comment 5•17 years ago
|
||
The first part (falling back to en) has been fixed by bug 419388, which leaves falling back to the English filterexceptions.pl file if there is no language-specific one. Bailing for now.
Assignee: wurblzap → zach
Status: ASSIGNED → NEW
Summary: Make the testing suite cope with quirks of additional languages → Fall back filterexceptions.pl to xx/default or (en/default) if it's not there for xx/custom (or xx/default)
![]() |
||
Updated•17 years ago
|
Assignee: zach → testing
![]() |
||
Comment 6•15 years ago
|
||
Bugzilla 3.2 is restricted to security bugs only. Moreover, this bug is either assigned to nobody or got no traction for several months now. Rather than retargetting it at each new release, I'm clearing the target milestone and the bug will be retargetted to some sensible release when someone starts fixing this bug for real (Bugzilla 3.8 more likely).
Target Milestone: Bugzilla 3.2 → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•