terms.Bugs not used everywhere in templates

RESOLVED FIXED in Bugzilla 2.22

Status

()

Bugzilla
User Interface
P1
minor
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: Juergen Wilholt, Assigned: victory <never@receive.bug.mails.i.hate.spammer>)

Tracking

2.20
Bugzilla 2.22
Bug Flags:
approval +
approval3.0 +
blocking3.0 -
approval2.22 +

Details

Attachments

(3 attachments, 3 obsolete attachments)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

In the file saved-searches.html.tmpl at line 45 the value terms.Bugs is not used. The word 'My Bugs' is hardcoded in the template. So, if you change the word 'Bugs' to e.g 'Calls' globally the page User Preferences -> Saved searches still shows 'My Bugs'.

Can be fixed by replacing:
<       <td>My [% terms.Bugs %]</td>
>       <td>My Bugs</td>

Reproducible: Always

Steps to Reproduce:
1. Set "Bugs" => "Calls" in variables.none.tmpl
2. Go to page User Preferences -> Saved searches
3. In the saved searches table it says 'My Bugs' instead of 'My Calls'

Actual Results:  
Page says 'My Bugs' instead of 'My Calls'
(Reporter)

Comment 1

12 years ago
Set version to 2.20.
Version: unspecified → 2.20

Updated

12 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All

Comment 2

12 years ago
grep -r Bugs template/ | grep -v terms

template/en/default/reports/chart.png.tmpl:[% y_label = "Bugs" %]
template/en/default/admin/components/edit.html.tmpl:        <a title="Bugs in component '[% comp.name FILTER html %]'"
template/en/default/admin/keywords/list.html.tmpl:       heading => "Bugs"

(command has some false-positives that I didn't mention)

Comment 3

12 years ago
grep -r 'Bug\>' template/ | grep -v terms | grep -v 'Bugzilla Bug Tracking System'

(removed 10 or so false-positives)

template/en/default/reports/report-simple.html.tmpl:  [% title = "Bug List" %]
template/en/default/admin/params/bugfields.html.tmpl:   title = "Bug Fields"
template/en/default/admin/params/bugmove.html.tmpl:   title = "Bug Moving"
template/en/default/admin/params/bugchange.html.tmpl:   title = "Bug Change Policies"

for bug and bugs (lowercase) I didn't find a good query. Manually checking:

template/en/default/global/setting-descs.none.tmpl:   "display_quips"                    => "Show a quip at the top of each bug list",

Comment 4

12 years ago
Created attachment 210565 [details] [diff] [review]
patch, v1

t/009bugwords.t was missing some cases
Assignee: ui → LpSolit
Status: NEW → ASSIGNED
Attachment #210565 - Flags: review?(wurblzap)
Comment on attachment 210565 [details] [diff] [review]
patch, v1

r=wurblzap by inspection.
Attachment #210565 - Flags: review?(wurblzap) → review+
Flags: approval?
Flags: approval2.20?

Updated

12 years ago
Target Milestone: --- → Bugzilla 2.20
I just noticed comment 2 and comment 3... The places mentioned there are missing from the patch.

Feel free to move r+ forward on an updated patch fixing the other files.
Flags: approval?
Flags: approval2.20?
timelyx suggested using /\bbugs?\b/i as regexp and fixing the false positives we'd catch with this. I think that's a good idea... Do you want to do it in this bug here?

Comment 8

12 years ago
(In reply to comment #7)
> timelyx suggested using /\bbugs?\b/i as regexp and fixing the false positives
> we'd catch with this. I think that's a good idea... Do you want to do it in
> this bug here?
> 

No. Fixing the false positive would be a hack, and would not be "cleaner" than the way we are doing it actually. It's easier to say what we want (actual patch) than what we don't want (catching false positive).
Well, we want to catch things like (simple example, but you get my point) "Summary reports and charts (for bugs)", too, right? Plus, renaming js variables is not a hack at all imho.

I'm not saying we need to do it in this bug, if you don't want to.

Comment 10

12 years ago
updating the bug summary a bit to take comment 2 and comment 3 into account. Let's fix them all at once.
Summary: terms.Bugs not used in saved searches template → terms.Bugs not used everywhere in templates

Comment 11

12 years ago
*** Bug 326311 has been marked as a duplicate of this bug. ***

Comment 12

12 years ago
To catch those occurences in directives too, we should use the following regexp:

/(?<!terms\.)bug/i

I tried it and it catches /bugs?/i which are not following "terms.". But I have to add a separate regexp for /abug/i because /(?<!terms\.)a?bug/i doesn't work.

Comment 13

12 years ago
Better regexp, but still catch things like "&foo=bug" and <bug> and foo(bug):

/(?<!terms\.)\bbugs?\b/i for /bugs?/i

and

/(?<!terms\.)\babug\b/i for /abug/i

Comment 14

12 years ago
Can we include email templates on the list of things that need terms.bug harmonization?
Attachment #210565 - Flags: review+

Comment 15

12 years ago
Created attachment 214746 [details] [diff] [review]
patch, v2

This is making me nut. This patch won't work because there are still two errors reported. But I don't want to enumerate exceptions on a per file basis (which would be a kind of filterexceptions.pl).

Also, there is at least one place where we really want 'Bug' instead of $terms.Bug, because Search.pm expects to read 'Bug'. I don't know how to bypass this without explicitly enumerating exceptions, and without being to lenient on tests we do.
Attachment #210565 - Attachment is obsolete: true

Comment 16

12 years ago
I don't want to waste my time on this bug anymore. Looking for 'bug' and friends inside directories requires some major rewrite of 009bugwords.t IMO. If someone wants to play with it, please do.
Assignee: LpSolit → ui
Status: ASSIGNED → NEW
The direct need still needs to be taken care of. If somebody wants to update the first patch (attachment 210565 [details] [diff] [review]) so that it fixes the places mentioned in comment 2 and comment 3 as well, I'll grant review.

Making the test more intelligent can be a separate bug then.

Comment 18

12 years ago
Only security and dataloss fixes will be accepted on the 2.20 branch.
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22

Updated

12 years ago
Blocks: 340350

Comment 19

12 years ago
(In reply to comment #17)
> Making the test more intelligent can be a separate bug then.

I have opened bug 340350 for that.
Jürgen, may I assume that you've caught offending places in your installation? If so, might I interest you in providing a patch?
Whiteboard: [Good intro bug]
Apparently not.

In my opinion, this bug should focus on fixing offending places, just like bug 280226. Fixing the testing suite happens in bug 233282 and bug 340350.

May this be considered a low-risk polish bug?
Flags: blocking3.0?

Comment 22

11 years ago
Yes, low-risk polish fix blocker.
Flags: blocking3.0? → blocking3.0+

Comment 23

11 years ago
I strongly disagree with this bug being marked as a blocker. This is only a UI polish which doesn't fix any functionality or make Bugzilla easier to understand (such as a better wording somewhere). Bugzilla 3.0 could live with this bug open.

We should really distinguish real blockers and bugs which would be nice to fix, such as this one.

Comment 24

11 years ago
Okay, I agree with LpSolit. I would release Bugzilla with this problem, as irritating as it is for localizers and customizers. It's still to mark a minor bug as a blocker.

However, I'd still very much like to see it fixed.
Severity: trivial → minor
Flags: blocking3.0+ → blocking3.0-
Priority: -- → P1
Created attachment 249577 [details] [diff] [review]
patch for tip, this doesnt mention test suite ;-p
Attachment #249577 - Flags: review?

Comment 26

11 years ago
Do we really want to replace "bugmail" by "$terms.bug mail"?
[% terms.bug %]mail and ${terms.bug}mail would work better for me, too.
Created attachment 262892 [details] [diff] [review]
Patch for tip, V1.1

This just fixes bitrot in newchangedmail.txt.tmpl and my only review comment of not separating $terms.bug and mail words.
Attachment #249577 - Attachment is obsolete: true
Attachment #262892 - Flags: review+
Attachment #249577 - Flags: review?
Assignee: ui → spam
Flags: approval?

Comment 29

11 years ago
Patches needed for branches before approving it.
Created attachment 262995 [details] [diff] [review]
Patch for 3.0 branch, V1.1

Simple backport.
Attachment #262995 - Flags: review+
Created attachment 262997 [details] [diff] [review]
Patch for 2.22 branch, V1.1

Simple backport.
Attachment #214746 - Attachment is obsolete: true
Attachment #262997 - Flags: review+
Flags: approval3.0?
Flags: approval2.22?

Updated

11 years ago
Flags: approval?
Flags: approval3.0?
Flags: approval3.0+
Flags: approval2.22?
Flags: approval2.22+
Flags: approval+

Comment 32

11 years ago
Please do not commit these patches before 3.0 is released.
Status: NEW → ASSIGNED
Whiteboard: [Good intro bug]

Comment 33

11 years ago
tip:

Checking in template/en/default/account/prefs/saved-searches.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/account/prefs/saved-searches.html.tmpl,v  <--  saved-searches.html.tmpl
new revision: 1.13; previous revision: 1.12
done
Checking in template/en/default/admin/components/edit.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/components/edit.html.tmpl,v  <--  edit.html.tmpl
new revision: 1.12; previous revision: 1.11
done
Checking in template/en/default/admin/custom_fields/create.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/custom_fields/create.html.tmpl,v  <--  create.html.tmpl
new revision: 1.7; previous revision: 1.6
done
Checking in template/en/default/admin/custom_fields/edit.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/custom_fields/edit.html.tmpl,v  <--  edit.html.tmpl
new revision: 1.5; previous revision: 1.4
done
Checking in template/en/default/admin/custom_fields/list.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/custom_fields/list.html.tmpl,v  <--  list.html.tmpl
new revision: 1.4; previous revision: 1.3
done
Checking in template/en/default/admin/keywords/list.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/keywords/list.html.tmpl,v  <--  list.html.tmpl
new revision: 1.10; previous revision: 1.9
done
Checking in template/en/default/admin/users/userdata.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/users/userdata.html.tmpl,v  <--  userdata.html.tmpl
new revision: 1.9; previous revision: 1.8
done
Checking in template/en/default/email/newchangedmail.txt.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/email/newchangedmail.txt.tmpl,v  <--  newchangedmail.txt.tmpl
new revision: 1.8; previous revision: 1.7
done
Checking in template/en/default/global/messages.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/messages.html.tmpl,v  <--  messages.html.tmpl
new revision: 1.56; previous revision: 1.55
done
Checking in template/en/default/reports/chart.png.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/reports/chart.png.tmpl,v  <--  chart.png.tmpl
new revision: 1.5; previous revision: 1.4
done
Checking in template/en/default/reports/report-simple.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/reports/report-simple.html.tmpl,v  <--  report-simple.html.tmpl
new revision: 1.2; previous revision: 1.1
done


3.0:

Checking in template/en/default/account/prefs/saved-searches.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/account/prefs/saved-searches.html.tmpl,v  <--  saved-searches.html.tmpl
new revision: 1.11.2.2; previous revision: 1.11.2.1
done
Checking in template/en/default/admin/components/edit.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/components/edit.html.tmpl,v  <--  edit.html.tmpl
new revision: 1.11.2.1; previous revision: 1.11
done
Checking in template/en/default/admin/custom_fields/create.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/custom_fields/create.html.tmpl,v  <--  create.html.tmpl
new revision: 1.6.2.1; previous revision: 1.6
done
Checking in template/en/default/admin/custom_fields/edit.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/custom_fields/edit.html.tmpl,v  <--  edit.html.tmpl
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in template/en/default/admin/custom_fields/list.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/custom_fields/list.html.tmpl,v  <--  list.html.tmpl
new revision: 1.3.2.1; previous revision: 1.3
done
Checking in template/en/default/admin/keywords/list.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/keywords/list.html.tmpl,v  <--  list.html.tmpl
new revision: 1.9.2.1; previous revision: 1.9
done
Checking in template/en/default/admin/users/userdata.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/users/userdata.html.tmpl,v  <--  userdata.html.tmpl
new revision: 1.8.2.1; previous revision: 1.8
done
Checking in template/en/default/email/newchangedmail.txt.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/email/newchangedmail.txt.tmpl,v  <--  newchangedmail.txt.tmpl
new revision: 1.6.2.1; previous revision: 1.6
done
Checking in template/en/default/global/messages.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/messages.html.tmpl,v  <--  messages.html.tmpl
new revision: 1.49.2.3; previous revision: 1.49.2.2
done
Checking in template/en/default/reports/chart.png.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/reports/chart.png.tmpl,v  <--  chart.png.tmpl
new revision: 1.4.4.1; previous revision: 1.4
done
Checking in template/en/default/reports/report-simple.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/reports/report-simple.html.tmpl,v  <--  report-simple.html.tmpl
new revision: 1.1.8.1; previous revision: 1.1
done


2.22.2:

Checking in template/en/default/account/prefs/saved-searches.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/account/prefs/saved-searches.html.tmpl,v  <--  saved-searches.html.tmpl
new revision: 1.8.2.1; previous revision: 1.8
done
Checking in template/en/default/admin/components/edit.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/components/edit.html.tmpl,v  <--  edit.html.tmpl
new revision: 1.5.2.2; previous revision: 1.5.2.1
done
Checking in template/en/default/admin/keywords/list.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/keywords/list.html.tmpl,v  <--  list.html.tmpl
new revision: 1.7.2.2; previous revision: 1.7.2.1
done
Checking in template/en/default/reports/chart.png.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/reports/chart.png.tmpl,v  <--  chart.png.tmpl
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in template/en/default/reports/report-simple.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/reports/report-simple.html.tmpl,v  <--  report-simple.html.tmpl
new revision: 1.1.6.1; previous revision: 1.1
done
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.