Closed Bug 451804 Opened 16 years ago Closed 13 years ago

The word "Platform" is hard coded; not all pages use field_descs.rep_platform

Categories

(Bugzilla :: User Interface, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: craig5, Assigned: fdonalisio)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 4 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070223 CentOS/1.5.0.10-0.1.el4.centos Firefox/1.5.0.10
Build Identifier: 

Several files have "Platform" hard coded in the HTML:

/en/default/list/edit-multiple.html.tmpl
/en/default/pages/fields.html.tmpl
/en/default/pages/quicksearchhack.html.tmpl
/en/default/bug/create/create.html.tmpl
/en/default/bug/create/create-guided.html.tmpl
/en/default/bug/edit.html.tmpl

All references to "Platform" should be replaced with:
    [% field_descs.rep_platform FILTER html %]




Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [Good Intro Bug]
Assignee: ui → craig5
The following file has already been fixed:
  /en/default/bug/create/create.html.tmpl

That leaves these to be modified:
  /en/default/list/edit-multiple.html.tmpl
  /en/default/pages/fields.html.tmpl
  /en/default/pages/quicksearchhack.html.tmpl
  /en/default/bug/create/create-guided.html.tmpl
  /en/default/bug/edit.html.tmpl
Attached patch v1 (obsolete) — Splinter Review
The word "Platform" (or sometimes "Hardware") has been replaced with "field_descs.rep_platform".

This is the simplest way to fix the bug. Other, more involved methods could easily be used, but I am trying to change as few things at once as possible. :)
Attachment #356843 - Flags: review?(mkanat)
Comment on attachment 356843 [details] [diff] [review]
v1

>Index: template/en/default/bug/create/create-guided.html.tmpl
> [% PROCESS global/variables.none.tmpl %]
>+[% PROCESS "global/field-descs.none.tmpl" %]

  Remove variables.none.

>Index: template/en/default/global/field-descs.none.tmpl
>+                   "rep_platform"            => "NEW Hardware",

  Looks like you left in some debugging code.
Attachment #356843 - Flags: review?(mkanat) → review-
Attached patch patch for 3.5/trunk (obsolete) — Splinter Review
Assignee: craig5 → shimono
Attachment #356843 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #394550 - Flags: review?
Attachment #394550 - Flags: review? → review?(LpSolit)
Comment on attachment 394550 [details] [diff] [review]
patch for 3.5/trunk

Works fine. Only a few things to fix:


>Index: search/form.html.tmpl

>+            <label for="rep_platform" accesskey="h">[% field_descs.rep_platform FILTER html %] (<u>H</u>)</label>:

Don't write (<u>H</u>).



>Index: whine/mail.txt.tmpl

>+  [% field_descs.rep_platform FILTER html %]: [%+ bug.rep_platform %]

Two things:
- It's a txt file, so you shouldn't use FILTER html here. No filtering at all.
- The directive must start with [%+ , else it's appended to the previous line (run ./whine.pl and see yourself).


Also, when you display the Hardware column in buglist, "Plt" for "Platform" is displayed. We should replace it by "HW" I'd say (similar to OS).
Attachment #394550 - Flags: review?(LpSolit) → review-
Attached patch Patch for trunk (obsolete) — Splinter Review
Patch updated as per comments and to match trunk.

Should I add another variable to deal with the plural form of platform in template/en/default/pages/bug-writing.html.tmpl?
Attachment #536248 - Flags: review?(LpSolit)
Assignee: shimono → selsky
Attachment #394550 - Attachment is obsolete: true
Comment on attachment 536248 [details] [diff] [review]
Patch for trunk

Your patch doesn't apply cleanly on top of Bugzilla 4.1.3. Also, [% field_descs.foo %] no longer requires [% PROCESS global/field-descs.none.tmpl %]; field_descs is now a variable defined in Template.pm. (Also, FYI only, you must quote the path to the template, because it contains a dash.)
Attachment #536248 - Flags: review?(LpSolit) → review-
(In reply to Frédéric Buclin from comment #8)
> Your patch doesn't apply cleanly on top of Bugzilla 4.1.3.

Err... I meant Bugzilla 4.3. :)
Attached patch Patch updated (obsolete) — Splinter Review
Assignee: selsky → francsd
Attachment #536248 - Attachment is obsolete: true
Attachment #568020 - Flags: review?(timello)
Comment on attachment 568020 [details] [diff] [review]
Patch updated

Review of attachment 568020 [details] [diff] [review]:
-----------------------------------------------------------------

What about the instances of Platform at http://mxr.mozilla.org/mozilla/source/webtools/bugzilla/template/en/default/pages/bug-writing.html.tmpl#151 ?

::: template/en/default/pages/release-notes.html.tmpl
@@ +1271,4 @@
>    <li>Searching the Priority field if you typed something that exactly
>      matched the name of a priority. You can explicitly search the
>      Priority field if you want to find [% terms.bugs %] by priority.</li>
> +  <li>Searching the [% field_descsc.rep_platform FILTER html %] and OS fields

This should be field_descs.

@@ +1273,5 @@
>      Priority field if you want to find [% terms.bugs %] by priority.</li>
> +  <li>Searching the [% field_descsc.rep_platform FILTER html %] and OS fields
> +    if you typed in one of a certain hard-coded list of strings (like "pc",
> +    "windows", etc.). You can explicitly search these fields, instead, if you want
> +    to find [% terms.bugs %] with a specific [% field_descsc.rep_platform

Same here.
(In reply to Matt Selsky from comment #11)
 
> What about the instances of Platform at
> http://mxr.mozilla.org/mozilla/source/webtools/bugzilla/template/en/default/
> pages/bug-writing.html.tmpl#151 ?

Those words are plural so we should not change them to field_descs.rep_platform. That's what we have agreed upon this topic for other cases too.
Thanks Matt!
Attachment #568020 - Attachment is obsolete: true
Attachment #568035 - Flags: review?(timello)
Attachment #568035 - Flags: review?(selsky)
Attachment #568020 - Flags: review?(timello)
Comment on attachment 568035 [details] [diff] [review]
Fixes according to comments

Review of attachment 568035 [details] [diff] [review]:
-----------------------------------------------------------------

The nits can be fixed on the checkin.

Otherwise, it applies cleanly in trunk and pass in all tests.

Thanks Matt for the patch and Francisco for the update!

::: template/en/default/bug/edit.html.tmpl
@@ +297,4 @@
>      [%############%]    
>      <tr>
>        <td class="field_label">
> +        <label for="rep_platform" accesskey="h"><b>[% field_descs.rep_platform FILTER html %]</b></label>:

Nit: I think this line is too long and we can break it.

::: template/en/default/list/edit-multiple.html.tmpl
@@ +95,4 @@
>  
>      <th>
>        <label for="rep_platform">
> +        <a href="page.cgi?id=fields.html#rep_platform">[% field_descs.rep_platform FILTER html %]</a>:

Same here.
Attachment #568035 - Flags: review?(timello) → review+
Flags: approval?
Flags: approval4.2?
Flags: approval?
Flags: approval4.2?
Flags: approval+
Whiteboard: [Good Intro Bug]
Target Milestone: --- → Bugzilla 5.0
Attachment #568035 - Flags: review?(selsky)
Committing to: bzr+ssh://timello%40gmail.com@bzr.mozilla.org/bugzilla/trunk/                                                                                                           
modified template/en/default/bug/edit.html.tmpl
modified template/en/default/bug/create/create-guided.html.tmpl                                                                                                                        
modified template/en/default/list/edit-multiple.html.tmpl
modified template/en/default/list/table.html.tmpl
modified template/en/default/pages/bug-writing.html.tmpl                                                                                                                               
modified template/en/default/pages/release-notes.html.tmpl
modified template/en/default/whine/mail.html.tmpl
modified template/en/default/whine/mail.txt.tmpl
Committed revision 7988.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: