From 66337c4c5d816fa847e154ba2186bd5c26252287 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Wed, 18 Nov 2009 07:05:01 +0000 Subject: [PATCH] Bug 519142: Replace IF/ELSE statements about bug_status/resolution with just a display_value call, and use display_value in more places to translate field values. Patch by Vitaly Fedrushkov r=mkanat, a=mkanat git-svn-id: svn://10.0.0.236/trunk@259009 18797224-902f-48f8-a5cc-f745e15eee43 --- .../en/default/admin/params/common.html.tmpl | 14 ++++++++- .../default/admin/workflow/comment.html.tmpl | 4 +-- .../en/default/admin/workflow/edit.html.tmpl | 6 ++-- .../en/default/bug/activity/table.html.tmpl | 12 ++------ .../en/default/bug/create/create.html.tmpl | 7 ++--- .../en/default/bug/show-multiple.html.tmpl | 6 ++-- .../en/default/global/code-error.html.tmpl | 2 +- .../en/default/global/field-descs.none.tmpl | 1 + .../en/default/list/edit-multiple.html.tmpl | 2 +- .../template/en/default/list/list.atom.tmpl | 10 +++---- .../template/en/default/list/list.html.tmpl | 12 ++------ .../template/en/default/list/table.html.tmpl | 16 ++-------- .../en/default/pages/bug-writing.html.tmpl | 4 +-- .../en/default/pages/fields.html.tmpl | 29 ++++++++++--------- .../reports/duplicates-table.html.tmpl | 6 ++-- .../en/default/reports/report-bar.png.tmpl | 24 +++------------ .../en/default/reports/report-line.png.tmpl | 24 +++------------ .../en/default/reports/report-pie.png.tmpl | 12 ++------ .../en/default/reports/report-table.csv.tmpl | 8 ++--- .../en/default/reports/report-table.html.tmpl | 8 ++--- .../template/en/default/search/form.html.tmpl | 12 ++------ .../template/en/default/whine/mail.html.tmpl | 6 ++-- .../template/en/default/whine/mail.txt.tmpl | 6 ++-- 23 files changed, 79 insertions(+), 152 deletions(-) diff --git a/mozilla/webtools/bugzilla/template/en/default/admin/params/common.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/admin/params/common.html.tmpl index c23c2ca9a50..5b0d0042959 100644 --- a/mozilla/webtools/bugzilla/template/en/default/admin/params/common.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/admin/params/common.html.tmpl @@ -22,6 +22,8 @@ # panel: hash representing the current panel. #%] +[% PROCESS "global/field-descs.none.tmpl" %] + [% sortlist_separator = '---' %]
@@ -115,7 +117,17 @@ [% FOREACH item = param.choices %] [% END %] diff --git a/mozilla/webtools/bugzilla/template/en/default/admin/workflow/comment.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/admin/workflow/comment.html.tmpl index 2fa78f00353..a7a6a74c23b 100644 --- a/mozilla/webtools/bugzilla/template/en/default/admin/workflow/comment.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/admin/workflow/comment.html.tmpl @@ -49,7 +49,7 @@   [% FOREACH status = statuses %] - [% status.name FILTER html %] + [% display_value("bug_status", status.name) FILTER html %] [% END %] @@ -59,7 +59,7 @@ [% FOREACH status = p.merge(statuses) %] - [% status.name FILTER html %] + [% display_value("bug_status", status.name) FILTER html %] [% FOREACH new_status = statuses %] diff --git a/mozilla/webtools/bugzilla/template/en/default/admin/workflow/edit.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/admin/workflow/edit.html.tmpl index 787937989f1..406c08a2100 100644 --- a/mozilla/webtools/bugzilla/template/en/default/admin/workflow/edit.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/admin/workflow/edit.html.tmpl @@ -54,7 +54,7 @@   [% FOREACH status = statuses %] - [% status.name FILTER html %] + [% display_value("bug_status", status.name) FILTER html %] [% END %] @@ -64,7 +64,7 @@ [% FOREACH status = p.merge(statuses) %] - [% status.name FILTER html %] + [% display_value("bug_status", status.name) FILTER html %] [% FOREACH new_status = statuses %] @@ -89,7 +89,7 @@

When [% terms.abug %] is marked as a duplicate of another one or is moved to another installation, the [% terms.bug %] status is automatically set to - [% Param("duplicate_or_move_bug_status") FILTER html %]. All transitions to + [% display_value("bug_status", Param("duplicate_or_move_bug_status")) FILTER html %]. All transitions to this [% terms.bug %] status must then be valid (this is the reason why you cannot edit them above).
Note: you can change this setting by visiting the diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/activity/table.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/activity/table.html.tmpl index a467fe5f2cd..ae9dbcb80dc 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/activity/table.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/bug/activity/table.html.tmpl @@ -80,15 +80,11 @@ change.fieldname == 'remaining_time' || change.fieldname == 'work_time' %] [% PROCESS formattimeunit time_unit=change.removed %] - [% ELSIF change.fieldname == 'bug_status' %] - [% display_value("bug_status", change.removed) FILTER html %] - [% ELSIF change.fieldname == 'resolution' %] - [% display_value("resolution", change.removed) FILTER html %] [% ELSIF change.fieldname == 'blocked' || change.fieldname == 'dependson' %] [% change.removed FILTER bug_list_link FILTER none %] [% ELSE %] - [% change.removed FILTER email FILTER html %] + [% display_value(change.fieldname, change.removed) FILTER email FILTER html %] [% END %] [% ELSE %]   @@ -100,15 +96,11 @@ change.fieldname == 'remaining_time' || change.fieldname == 'work_time' %] [% PROCESS formattimeunit time_unit=change.added %] - [% ELSIF change.fieldname == 'bug_status' %] - [% display_value("bug_status", change.added) FILTER html %] - [% ELSIF change.fieldname == 'resolution' %] - [% display_value("resolution", change.added) FILTER html %] [% ELSIF change.fieldname == 'blocked' || change.fieldname == 'dependson' %] [% change.added FILTER bug_list_link FILTER none %] [% ELSE %] - [% change.added FILTER email FILTER html %] + [% display_value(change.fieldname, change.added) FILTER email FILTER html %] [% END %] [% ELSE %]   diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl index 3572ec37241..f466f77048d 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl @@ -664,11 +664,8 @@ TUI_hide_default('expert_fields'); [%- FOREACH x = ${sel.name} %] + [% display_value(sel.name, x) FILTER html %] + [% END %] diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/show-multiple.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/show-multiple.html.tmpl index b6507b964ae..177bea14f0c 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/show-multiple.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/bug/show-multiple.html.tmpl @@ -139,7 +139,7 @@ [% field_descs.bug_severity FILTER html %]: - [% bug.bug_severity FILTER html %] + [% display_value("bug_severity", bug.bug_severity) FILTER html %] [% PROCESS rightcell %] @@ -301,7 +301,7 @@ [% BLOCK row %] [% field_descs.${cell} FILTER html %]: - [% bug.${cell} FILTER html %] + [% display_value(cell, bug.${cell}) FILTER html %] [% PROCESS rightcell IF !fullrow %] [% fullrow = 0 %] @@ -357,7 +357,7 @@ [% ELSIF name != "" %] [% field_descs.${name} FILTER html %]: - [% bug.${name} FILTER html %] + [% display_value(name, bug.${name}) FILTER html %] [% ELSE %]     diff --git a/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl index 64bd41af3a9..f35c1ec93fd 100644 --- a/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl @@ -327,7 +327,7 @@ A valid quipid is needed. [% ELSIF error == "no_manual_moved" %] - You cannot set the resolution of [% terms.abug %] to MOVED without + You cannot set the resolution of [% terms.abug %] to display_value("resolution", "MOVED") FILTER html %] without moving the [% terms.bug %]. [% ELSIF error == "no_open_bug_status" %] diff --git a/mozilla/webtools/bugzilla/template/en/default/global/field-descs.none.tmpl b/mozilla/webtools/bugzilla/template/en/default/global/field-descs.none.tmpl index 27880059462..5012769ca0b 100644 --- a/mozilla/webtools/bugzilla/template/en/default/global/field-descs.none.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/global/field-descs.none.tmpl @@ -146,6 +146,7 @@ }, "resolution" => { + "" => "---", # "FIXED" => "NO LONGER AN ISSUE", # "MOVED" => "BYE-BYE", }, diff --git a/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl index 528d1bd68ef..11f3491f280 100644 --- a/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl @@ -368,7 +368,7 @@ [% FOREACH menuitem = menuitems %] [% IF property %][% menuitem = menuitem.$property %][% END %] - + [% END %] [% END %] diff --git a/mozilla/webtools/bugzilla/template/en/default/list/list.atom.tmpl b/mozilla/webtools/bugzilla/template/en/default/list/list.atom.tmpl index 5086a044c66..3c504f9c9b1 100644 --- a/mozilla/webtools/bugzilla/template/en/default/list/list.atom.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/list/list.atom.tmpl @@ -23,7 +23,7 @@ # This is a template for generating an Atom representation of a buglist. #%] -[% PROCESS global/variables.none.tmpl %] +[% PROCESS "global/field-descs.none.tmpl" %] [% DEFAULT title = "$terms.Bugzilla $terms.Bugs" %] @@ -71,16 +71,16 @@ [% bug.reporter_realname FILTER html %] [% columns.bug_status.title FILTER html %] - [% bug.bug_status FILTER html %] + [% display_value("bug_status", bug.bug_status) FILTER html %] [% columns.resolution.title FILTER html %] - [% bug.resolution FILTER html %] + [% display_value("resolution", bug.resolution) FILTER html %] [% columns.priority.title FILTER html %] - [% bug.priority FILTER html %] + [% display_value("priority", bug.priority) FILTER html %] [% columns.bug_severity.title FILTER html %] - [% bug.bug_severity FILTER html %] + [% display_value("bug_severity", bug.bug_severity) FILTER html %] [% IF Param("usetargetmilestone") %] [% columns.target_milestone.title FILTER html %] diff --git a/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl index 6d7f805855a..1e9a9e998a2 100644 --- a/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl @@ -91,16 +91,8 @@ [% IF shown_types.contains(desc_item.type) || debug %] ([% search_descs.${desc_item.type} FILTER html %]) [% END %] - [% IF desc_item.field == 'bug_status' %] - [% FOREACH status IN desc_item.value.split(',') %] - [%+ display_value("bug_status", status) FILTER html %][% ',' UNLESS loop.last %] - [% END %] - [% ELSIF desc_item.field == 'resolution' %] - [% FOREACH resolution IN desc_item.value.split(',') %] - [%+ display_value("resolution", resolution) FILTER html %][% ',' UNLESS loop.last %] - [% END %] - [% ELSE %] - [%+ desc_item.value FILTER html %] + [% FOREACH val IN desc_item.value.split(',') %] + [%+ display_value(desc_item.field, val) FILTER html %][% ',' UNLESS loop.last %] [% END %] [% IF debug %] ([% desc_item.term FILTER html %]) diff --git a/mozilla/webtools/bugzilla/template/en/default/list/table.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/list/table.html.tmpl index 6ca90b921ba..f6a871e199c 100644 --- a/mozilla/webtools/bugzilla/template/en/default/list/table.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/list/table.html.tmpl @@ -201,14 +201,7 @@ [% FOREACH column = displaycolumns %] [% IF abbrev.$column.maxlength %] - + [% END %] [% IF abbrev.$column.format_value %] [%- bug.$column FILTER format(abbrev.$column.format_value) FILTER html -%] @@ -216,11 +209,6 @@ column == 'remaining_time' || column == 'estimated_time' %] [% PROCESS formattimeunit time_unit=bug.$column %] - [% ELSIF column == 'bug_status' %] - [%- display_value("bug_status", bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %] - [% ELSIF column == 'resolution' %] - [%- display_value("resolution", bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %] - [%# Display the login name of the user if their real name is empty. %] [% ELSIF column.match('_realname$') && bug.$column == '' %] [% SET login_column = column.remove('_realname$') %] @@ -228,7 +216,7 @@ abbrev.$column.ellipsis) FILTER html %] [% ELSE %] - [%- bug.$column.truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html -%] + [%- display_value(column, bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html -%] [% END %] [% IF abbrev.$column.maxlength %] diff --git a/mozilla/webtools/bugzilla/template/en/default/pages/bug-writing.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/pages/bug-writing.html.tmpl index 035876bb13f..ec997be0a43 100644 --- a/mozilla/webtools/bugzilla/template/en/default/pages/bug-writing.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/pages/bug-writing.html.tmpl @@ -78,8 +78,8 @@ no-one else appears to have reported it, then:

it? (e.g. Linux, Windows XP, Mac OS X.)
If you know the [% terms.bug %] happens on more than one type of - operating system, choose "All". - If your OS isn't listed, choose Other.

+ operating system, choose [% display_value("op_sys", "All") FILTER html %]. + If your OS isn't listed, choose [% display_value("op_sys", "Other") FILTER html %].

Summary: How would you describe the [% terms.bug %], in approximately 60 or fewer characters?
diff --git a/mozilla/webtools/bugzilla/template/en/default/pages/fields.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/pages/fields.html.tmpl index 9e938bbcb0e..5be28cab702 100644 --- a/mozilla/webtools/bugzilla/template/en/default/pages/fields.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/pages/fields.html.tmpl @@ -19,7 +19,6 @@ # Gervase Markham #%] -[% PROCESS global/variables.none.tmpl %] [% PROCESS "global/field-descs.none.tmpl" %] [% INCLUDE global/header.html.tmpl title = "A $terms.Bug's Life Cycle" %] @@ -221,46 +220,46 @@ This field describes the impact of [% terms.abug %]. - + - + - + - + - + - + - +
Blocker[% display_value("bug_severity", "blocker") FILTER html %] Blocks development and/or testing work
Critical[% display_value("bug_severity", "critical") FILTER html %] crashes, loss of data, severe memory leak
Major[% display_value("bug_severity", "major") FILTER html %] major loss of function
Normal[% display_value("bug_severity", "normal") FILTER html %] regular issue, some loss of functionality under specific circumstances
Minor[% display_value("bug_severity", "minor") FILTER html %] minor loss of function, or other problem where easy workaround is present
Trivial[% display_value("bug_severity", "trivial") FILTER html %] cosmetic problem like misspelled words or misaligned text
Enhancement[% display_value("bug_severity", "enhancement") FILTER html %] Request for enhancement
@@ -270,23 +269,25 @@ This is the hardware platform against which the [% terms.bug %] was reported. Legal platforms include:

    -
  • All (happens on all platforms; cross-platform [% terms.bug %])
  • +
  • [% display_value("rep_platform", "All") FILTER html %] (happens on all platforms; cross-platform [% terms.bug %])
  • -
  • Macintosh
  • +
  • [% display_value("rep_platform", "Macintosh") FILTER html %]
  • -
  • PC
  • +
  • [% display_value("rep_platform", "PC") FILTER html %]
-Note: When searching, selecting the option "All" does not +Note: When searching, selecting the option +[% display_value("rep_platform", "All") FILTER html %] does not select [% terms.bugs %] assigned against any platform. It merely selects [% terms.bugs %] that are -marked as occurring on all platforms, i.e. are designated "All". +marked as occurring on all platforms, i.e. are designated +[% display_value("rep_platform", "All") FILTER html %].

Operating System

This is the operating system against which the [% terms.bug %] was reported. Legal operating systems include:
    -
  • All (happens on all operating systems; cross-platform +
  • [% display_value("op_sys", "All") FILTER html %] (happens on all operating systems; cross-platform [% terms.bug %])
  • Windows
  • diff --git a/mozilla/webtools/bugzilla/template/en/default/reports/duplicates-table.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/reports/duplicates-table.html.tmpl index f651a7fd43c..8950f340ab6 100644 --- a/mozilla/webtools/bugzilla/template/en/default/reports/duplicates-table.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/reports/duplicates-table.html.tmpl @@ -127,9 +127,9 @@
    [% bug.delta %]
    [% bug.component FILTER html %] -
    [% bug.bug_severity FILTER html %]
    -
    [% bug.op_sys FILTER html %]
    -
    [% bug.target_milestone FILTER html %]
    +
    [% display_value("bug_severity", bug.bug_severity ) FILTER html %]
    +
    [% display_value("op_sys", bug.op_sys ) FILTER html %]
    +
    [% display_value("target_milestone", bug.target_milestone) FILTER html %]
    [% bug.short_desc FILTER html %] [% END %] diff --git a/mozilla/webtools/bugzilla/template/en/default/reports/report-bar.png.tmpl b/mozilla/webtools/bugzilla/template/en/default/reports/report-bar.png.tmpl index cb9fab24f27..649fba42616 100644 --- a/mozilla/webtools/bugzilla/template/en/default/reports/report-bar.png.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/reports/report-bar.png.tmpl @@ -26,28 +26,12 @@ [% col_field_disp = field_descs.$col_field || col_field %] -[% IF col_field == 'bug_status' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("bug_status", data.0.0.$i) %] - [% END %] +[% FOR i IN [ 0 .. data.0.0.max ] %] + [% data.0.0.$i = display_value(col_field, data.0.0.$i) %] [% END %] -[% IF col_field == 'resolution' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("resolution", data.0.0.$i) %] - [% END %] -[% END %] - -[% IF row_field == 'bug_status' %] - [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = display_value("bug_status", row_names.$i) %] - [% END %] -[% END %] - -[% IF row_field == 'resolution' %] - [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = display_value("resolution", row_names.$i) %] - [% END %] +[% FOR i IN [ 0 .. row_names.max ] %] + [% row_names.$i = display_value(row_field, row_names.$i) %] [% END %] [% FILTER null; diff --git a/mozilla/webtools/bugzilla/template/en/default/reports/report-line.png.tmpl b/mozilla/webtools/bugzilla/template/en/default/reports/report-line.png.tmpl index fc8b418af66..0edc0fee769 100644 --- a/mozilla/webtools/bugzilla/template/en/default/reports/report-line.png.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/reports/report-line.png.tmpl @@ -26,28 +26,12 @@ [% col_field_disp = field_descs.$col_field || col_field %] -[% IF col_field == 'bug_status' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("bug_status", data.0.0.$i) %] - [% END %] +[% FOR i IN [ 0 .. data.0.0.max ] %] + [% data.0.0.$i = display_value(col_field, data.0.0.$i) %] [% END %] -[% IF col_field == 'resolution' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("resolution", data.0.0.$i) %] - [% END %] -[% END %] - -[% IF row_field == 'bug_status' %] - [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = display_value("bug_status", row_names.$i) %] - [% END %] -[% END %] - -[% IF row_field == 'resolution' %] - [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = display_value("resolution", row_names.$i) %] - [% END %] +[% FOR i IN [ 0 .. row_names.max ] %] + [% row_names.$i = display_value(row_field, row_names.$i) %] [% END %] [% IF cumulate %] diff --git a/mozilla/webtools/bugzilla/template/en/default/reports/report-pie.png.tmpl b/mozilla/webtools/bugzilla/template/en/default/reports/report-pie.png.tmpl index 05a359032b7..27f5525dd4d 100644 --- a/mozilla/webtools/bugzilla/template/en/default/reports/report-pie.png.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/reports/report-pie.png.tmpl @@ -22,16 +22,8 @@ [% col_field_disp = field_descs.$col_field || col_field %] -[% IF col_field == 'bug_status' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("bug_status", data.0.0.$i) %] - [% END %] -[% END %] - -[% IF col_field == 'resolution' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("resolution", data.0.0.$i) %] - [% END %] +[% FOR i IN [ 0 .. data.0.0.max ] %] + [% data.0.0.$i = display_value(col_field, data.0.0.$i) %] [% END %] [% FILTER null; diff --git a/mozilla/webtools/bugzilla/template/en/default/reports/report-table.csv.tmpl b/mozilla/webtools/bugzilla/template/en/default/reports/report-table.csv.tmpl index 3694b9b35c1..4d8b50a859b 100644 --- a/mozilla/webtools/bugzilla/template/en/default/reports/report-table.csv.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/reports/report-table.csv.tmpl @@ -67,12 +67,8 @@ [% END %] [% BLOCK value_display %] - [% SET disp_value = value %] - [% IF field == 'bug_status' %] - [% SET disp_value = display_value("bug_status", value) %] - [% ELSIF field == 'resolution' %] - [% SET disp_value = display_value("resolution", value) %] - [% ELSIF field == 'assigned_to' OR field == 'reporter' + [% SET disp_value = display_value(field, value) %] + [% IF field == 'assigned_to' OR field == 'reporter' OR field == 'qa_contact' %] [% disp_value = value FILTER email %] diff --git a/mozilla/webtools/bugzilla/template/en/default/reports/report-table.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/reports/report-table.html.tmpl index 6c0abe4d303..76b80f893ec 100644 --- a/mozilla/webtools/bugzilla/template/en/default/reports/report-table.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/reports/report-table.html.tmpl @@ -154,12 +154,8 @@ [% BLOCK value_display %] - [% SET disp_value = value %] - [% IF field == 'bug_status' %] - [% SET disp_value = display_value("bug_status", value) %] - [% ELSIF field == 'resolution' %] - [% SET disp_value = display_value("resolution", value) %] - [% ELSIF field == 'assigned_to' OR field == 'reporter' + [% SET disp_value = display_value(field, value) %] + [% IF field == 'assigned_to' OR field == 'reporter' OR field == 'qa_contact' %] [% disp_value = value FILTER email %] diff --git a/mozilla/webtools/bugzilla/template/en/default/search/form.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/search/form.html.tmpl index c52f5dcc56a..07ab43c702e 100644 --- a/mozilla/webtools/bugzilla/template/en/default/search/form.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/search/form.html.tmpl @@ -617,19 +617,11 @@ function doOnSelectProduct(selectmode) { [%# This only applies for Resolution really %] + [% display_value(sel.name, value.name) FILTER html %] [% ELSE %] [% END %] [% END %] diff --git a/mozilla/webtools/bugzilla/template/en/default/whine/mail.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/whine/mail.html.tmpl index d25bcd4ddbf..cd432514f98 100644 --- a/mozilla/webtools/bugzilla/template/en/default/whine/mail.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/whine/mail.html.tmpl @@ -78,9 +78,9 @@ [% bug.bug_id %] - [% bug.bug_severity FILTER html %] - [% bug.priority FILTER html %] - [% bug.rep_platform FILTER html %] + [% display_value("bug_severity", bug.bug_severity) FILTER html %] + [% display_value("priority", bug.priority) FILTER html %] + [% display_value("rep_platform", bug.rep_platform) FILTER html %] [% bug.$assignee_login_string FILTER html %] [% display_value("bug_status", bug.bug_status) FILTER html %] [% display_value("resolution", bug.resolution) FILTER html %] diff --git a/mozilla/webtools/bugzilla/template/en/default/whine/mail.txt.tmpl b/mozilla/webtools/bugzilla/template/en/default/whine/mail.txt.tmpl index 6df8d4346dc..41508130275 100644 --- a/mozilla/webtools/bugzilla/template/en/default/whine/mail.txt.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/whine/mail.txt.tmpl @@ -53,9 +53,9 @@ [% FOREACH bug=query.bugs %] [% terms.Bug +%] [%+ bug.bug_id %]: [%+ urlbase %]show_bug.cgi?id=[% bug.bug_id +%] - Priority: [%+ bug.priority -%] - Severity: [%+ bug.bug_severity -%] - Platform: [%+ bug.rep_platform %] + Priority: [%+ display_value("priority", bug.priority) -%] + Severity: [%+ display_value("bug_severity", bug.bug_severity) -%] + Platform: [%+ display_value("rep_platform", bug.rep_platform) %] Assignee: [%+ bug.$assignee_login_string %] Status: [%+ display_value("bug_status", bug.bug_status) %] [%- IF bug.resolution -%] Resolution: [% display_value("resolution", bug.resolution) -%]