Closed Bug 215148 Opened 21 years ago Closed 20 years ago

Move at least bug status and resolution descriptions to field-descs.none.tmpl

Categories

(Bugzilla :: User Interface, enhancement)

2.17
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: omgs, Assigned: emmanuel)

References

()

Details

(Whiteboard: [wanted for 2.20])

Attachments

(3 files, 3 obsolete files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4) Gecko/20030625 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4) Gecko/20030625 Actually, in 2.17.4, at least the resolution and status of bugs isn't centralized (mainly for localizators) in field-descs.none.tmpl. Reproducible: Always Steps to Reproduce: I have collected the following (for spanish): [% bug_status_l10n = { "UNCONFIRMED" => "SIN CONFIRMAR", "NEW" => "NUEVO", "ASSIGNED" => "ASIGNADO", "REOPENED" => "REABIERTO", "RESOLVED" => "RESUELTO", "VERIFIED" => "VERIFICADO", "CLOSED" => "CERRADO", } %] [% bug_resolution_l10n = { "FIXED" => "SOLUCIONADO", "INVALID" => "NO ES VALIDO", "WONTFIX" => "SIN ARREGLO", "LATER" => "PARA DESPUES", "REMIND" => "RECORDAR", "DUPLICATE" => "DUPLICADO", "WORKSFORME" => "A MI ME VALE", "MOVED" => "MOVIDO", } %] I have moved these lines into field-descs.none.tmpl, and have been forced to include a line to PROCESS the file in bug/edit.html.tmpl. There might be more files needing to include such line.
Blocks: 215149
Setting that this bug blocks bug 215149
Finally, in coordination with at least bug 215149, actually what has been added to field-descs.none.tmp is the following: [% bug_status_descs = { "UNCONFIRMED" => "SIN CONFIRMAR", "NEW" => "NUEVO", "ASSIGNED" => "ASIGNADO", "REOPENED" => "REABIERTO", "RESOLVED" => "RESUELTO", "VERIFIED" => "VERIFICADO", "CLOSED" => "CERRADO" } %] [% resolution_descs = { "FIXED" => "SOLUCIONADO", "INVALID" => "NO ES VALIDO", "WONTFIX" => "SIN SOLUCION", "LATER" => "PARA DESPUES", "REMIND" => "RECORDAR", "DUPLICATE" => "DUPLICADO", "WORKSFORME" => "A MI ME VALE", "MOVED" => "MOVIDO" } %] [% severity_descs = { "blocker" => "bloquea", "critical" => "crítico", "major" => "mayor", "normal" => "normal", "minor" => "menor", "trivial" => "trivial", "enhancement" => "mejora" } %] [% op_sys_descs = { "All" => "Todos", "other" => "otro" } %] [% platform_descs = { "All" => "Todas", "Other" => "Otra" } %] I'm still looking for other things that can/should also integrate in this file.
For bug 215208, it's been necessary to add: [% activity_descs = { "Alias" => "Alias", "AssignedTo" => "Asignado A", "Attachment data" => "Datos del adjunto", "Attachment description" => "Descripción del adjunto", "Attachment filename" => "Nombre del fichero adjunto", "Attachment is obsolete" => "El adjunto está obsoleto", "Attachment is patch" => "El adjunto es un parche", "Attachment is privates" => "El adjunto es privado", "Attachment mime type" => "Tipo MIME del adjunto", "BugsThisDependsOn" => "EsteBugDependeDe", "CC" => "", "Comment" => "Comentario", "Component" => "Componente", "Days since bug changed" => "Dís desde que cambió el bug", "Estimated Hours" => "Horas estimadas", "Ever Confirmed" => "Alguna vez confirmado", "Flag" => "Atributo", "Flag Requester" => "Solicitante de atributo", "Flag Setter" => "Quién ha puesto atributo", "Group" => "Grupo", "Hours Worked" => "Horas trabajadas", "Keywords" => "Palabras clave", "Last changed date" => "Fecha último cambio", "OS/Version" => "Versión del SO", "OtherBugsDependingOnThis" => "OtrosBugsDependenDeEste", "Percentage Complete" => "Porcentaje completo", "Platform" => "Plataforma", "Priority" => "Prioridad" "Product" => "Producto", "Remaining Hours" => "Horas restantes", "Reporter Accesible" => "Creador accesible", "Resolution" => "Solución", "Severity" => "Severity", "Status" => "Estado", "Status Whiteboard" => "", "Summary" => "Resumen", "Target Milestone" => "Versión destino", "Version" => "Versión", } %]
Depends on: 215208
Depends on: 215346
why doesn't the existing field-descs table work? I thought that's what it was there for. (for the activity table)
Status: UNCONFIRMED → NEW
Ever confirmed: true
The design of the view activity bug template doesn't use those values, at least for localization purposes. For me, the solution in bug 215208 works, but I can't set that, apart that needs somebody to take that to bugzilla code.
I have done this, but I get lots of errors when running perl runtests.pl, and I have no idea what it could be.
./runtests.pl --verbose will tell you what the errors are.
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.20
Blocks: 215058
Attached patch File with descs in english (obsolete) — Splinter Review
This file is just global/descs.none.tmpl, which actually doesn't exist in the tree.
Attachment #140970 - Attachment mime type: application/octet-stream → text/plain
Hmm. OK, there was a bit of a miscommunication here. But that's good, because it's given me a better idea than the original idea. This is nearly there. How about: [% descs = { bug_status => { "UNCONFIRMED" => "UNCONFIRMED", ... resolution => { "FIXED" => "FIXED", ... i.e. with the names of the fields as the keys. So you would use: [% descs.bug_status.${bug.bug_status} %] instead of [% bug.bug_status %] now. The other option is to drop the second level entirely and just put it all in one big hash called "descs". That would be less verbose. Dave: what do you think? Also, you'll need to remove the tabs from the file. Gerv
Comment on attachment 140970 [details] [diff] [review] File with descs in english >[%# 1.0@bugzilla.org %] >[%# The contents of this file are subject to the Mozilla Public > # License Version 1.1 (the "License"); you may not use this file > # except in compliance with the License. You may obtain a copy of > # the License at http://www.mozilla.org/MPL/ > # > # Software distributed under the License is distributed on an "AS > # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or > # implied. See the License for the specific language governing > # rights and limitations under the License. > # > # The Original Code is the Bugzilla Bug Tracking System. > # > # The Initial Developer of the Original Code is Netscape Communications > # Corporation. Portions created by Netscape are > # Copyright (C) 1998 Netscape Communications Corporation. All > # Rights Reserved. > # > # Contributor(s): Gervase Markham <gerv@gerv.net> > #%] > >[%# Remember to PROCESS rather than INCLUDE this template. %] > > >[% descs = { bug_status_descs => { "UNCONFIRMED" => "UNCONFIRMED", > "NEW" => "NEW", > "ASSIGNED" => "ASSIGNED", > "REOPENED" => "REOPENED", > "RESOLVED" => "RESOLVED", > "VERIFIED" => "VERIFIED", > "CLOSED" => "CLOSED" > }, > > bug_resolution_descs => { "FIXED" => "FIXED", > "INVALID" => "INVALID", > "WONTFIX" => "WONTFIX", > "LATER" => "LATER", > "REMIND" => "REMIND", > "DUPLICATE" => "DUPLICATE", > "WORKSFORME" => "WORKSFORME", > "MOVED" => "MOVED" > }, > > severity_descs => { "blocker" => "blocker", > "critical" => "critical", > "major" => "mayor", > "normal" => "normal", > "minor" => "minor", > "trivial" => "trivial", > "enhancement" => "enhancement" > }, > > op_sys_descs => { "All" => "All", > "other" => "other" > }, > > platform_descs => { "All" => "All", > "Other" => "Other" > }, > > activity_descs => { "Alias" => "Alias", > "AssignedTo" => "AssignedTo", > "Attachment data" => "Attachment data", > "Attachment description" => "Attachment description", > "Attachment filename" => "Attachment filename", > "Attachment is obsolete" => "Attachment is obsolete", > "Attachment is patch" => "Attachment is patch", > "Attachment is private" => "Attachment is private", > "Attachment mime type" => "Attachment mime type", > "BugsThisDependsOn" => "BugThisDependsOn", > "CC" => "CC", > "CC Accesible" => "CC Accesible", > "Comment" => "Comment", > "Component" => "Component", > "Days since bug changed" => "Days since bug changed", > "Estimated Hours" => "Estmated Hours", > "Ever Confirmed" => "Ever Confirmed", > "Flag" => "Flag", > "Flag Requester" => "Flag Requester", > "Flag Setter" => "Flag Setter", > "Group" => "Group", > "Hours Worked" => "Hours Worked", > "Keywords" => "Keywords", > "Last changed date" => "Last changed date", > "OS/Version" => "OS/Version", > "OtherBugsDependingOnThis" => "OtherBugsDependingOnThis", > "Percentage Complete" => "Percentage Complete", > "Platform" => "Platform", > "Priority" => "Priority" > "Product" => "Product", > "Remaining Hours" => "Remaining Hours", > "ReportedBy" => "ReportedBy", > "Reporter Accesible" => "Reporter Accesible", > "Resolution" => "Resolution", > "QAContact" => "QAContact", > "Severity" => "Severity", > "Status" => "Status", > "Status Whiteboard" => "Status Whiteboard", > "Summary" => "Summary", > "Target Milestone" => "Target Milestone", > "Version" => "Version", > "Votes" => "Votes", > } > } %]
Attachment #140970 - Flags: review?(gerv)
Oscar: I've already commented on your patch. Gerv
changes "resolution_descs" for "bug_resolution_descs", due to variable name
Attachment #140970 - Attachment is obsolete: true
Comment on attachment 140984 [details] [diff] [review] Modification to first file First file wasn't modified as expected before requesting review
Attachment #140984 - Flags: review?(gerv)
Comment on attachment 140984 [details] [diff] [review] Modification to first file Oscar: it's easier if you attach the files with MIME type: text/plain. Gerv
Attachment #140984 - Attachment mime type: application/octet-stream → text/plain
Attachment #140984 - Attachment is patch: true
Attachment #140970 - Attachment is patch: true
Comment on attachment 140984 [details] [diff] [review] Modification to first file This file seems to be the same as the last one... Gerv
Attachment #140984 - Flags: review?(gerv) → review-
No, it isn't. The last changes some variable names, now starting with "bug_", according to the field names. Also, that file doesn't pass the no_tabs text. Please fix that, because I tried "perl -pi -e 's/\t/ /g' descs.none.tmpl", but still didn't pass.
There may be other more or less "hidden" ocurrences, but as far as I have tested these changes, don't break anything and I'm sure they work.
Attachment #141000 - Flags: review?(gerv)
> The last changes some variable names, now starting with "bug_", > according to the field names. Right. But what about what I said in comment #9? Gerv
As far as I've been able to test, it's in the patch "The whole patch...". I've tested and seems to work. I have it at the URL indicated above.
Attachment #140970 - Flags: review?(gerv)
No longer blocks: 215058
I'm afraid this is getting outdated. The patch was for 2.17.4. I think this could be handled in a little time. If i knew this wouldn't get outdated for 2.18, I could do some work on it.
*** Bug 215149 has been marked as a duplicate of this bug. ***
*** Bug 215058 has been marked as a duplicate of this bug. ***
Comment on attachment 141000 [details] [diff] [review] The whole patch, except for non-existing files in cvs The patch is bitrotten. Moreover, I don't see field-descs.none.tmpl in your patch so it doesn't applies cleanly anyway. You should write a *single* patch which fixes the problem. Moreover, remove all the code about page.cgi as this has already been fixed. I have mark several of your bugs as dupes of this one as all are about the same topic.
Attachment #141000 - Flags: review?(gerv) → review-
Will the patch about this issue be included in future versions?
*** Bug 284060 has been marked as a duplicate of this bug. ***
This bug has not been touched by its owner in over six months, even though it is targeted to 2.20, for which the freeze is 10 days away. Unsetting the target milestone, on the assumption that nobody is actually working on it or has any plans to soon. If you are the owner, and you plan to work on the bug, please give it a real target milestone. If you are the owner, and you do *not* plan to work on it, please reassign it to nobody@bugzilla.org or a .bugs component owner. If you are *anybody*, and you get this comment, and *you* plan to work on the bug, please reassign it to yourself if you have the ability.
Target Milestone: Bugzilla 2.20 → ---
I've been talking to omgs about this patch and, while he's too busy to work on it, invited me to take a shot at it. The patch I just uploaded adds states and resolutions to global/field-descs.none.tmpl and replaces all the ones hardcoded in the templates with the appropriate call to the appropriate structure. I've taken in mind Gerv's comment and applied it. Patch applies to today's CVS tip. Comments, anybody ?
Attachment #181135 - Flags: review?(myk)
Comment on attachment 181135 [details] [diff] [review] hash with states, resolutions and thier localized equivalents This looks good to me, except that "bug_status_descs" and "bug_resolution_descs" should be called "status" and "resolution" respectively (both "bug" and "descs" are redundant in this case). But I'd also like to get Gerv's opinion on this one. Gerv, is this the way we should be addressing this l10n issue?
Attachment #181135 - Flags: review?(myk)
Attachment #181135 - Flags: review?(gerv)
Attachment #181135 - Flags: review+
I agree with Myk on the names; you can either do descs { status { or just status_descs { at the top level, to match field_descs, which might be more consistent. This is the correct way for now. If these turn customisable, and people customise them, we'll need to provide a default fallback to printing the in-DB value if there's no mapping in the hash. We could either put this infrastructure in now, or wait until later. Remember, though, these translated values should only be used for display - never for form submission. Otherwise, when people localise them they'll introduce bugs. Gerv
Whiteboard: [wanted for 2.20]
> I agree with Myk on the names; Will do as I get the time. I have a problem with the patch as it now stands. Bugzilla emails the changes to a bug by searching the database, generating a diff of the changes and using the newchangemail parameter. This results in states and resolutions that are still in English since they're the in-DB values. I'ld like to fix this but have no idea how to do so. Two questions: 1) Is this possible? 2) How does one fix this?
This corrects a few mistakes from the previous patch (oops) and changes the names of the hashes to status_descs and resolution_descs. Pinging gerv for review.
Attachment #181135 - Attachment is obsolete: true
Attachment #182098 - Flags: review?(gerv)
Comment on attachment 182098 [details] [diff] [review] hash of statuses, resolutions and their translations, new and improved >--- ./template/en/default/global/field-descs.none.tmpl.orig 2005-04-25 11:43:29.000000000 +0200 >+++ ./template/en/default/global/field-descs.none.tmpl 2005-04-28 22:48:44.000000000 +0200 >@@ -68,3 +68,21 @@ > "version" => "Version", > "votes" => "Votes", > "work_time" => "Hours Worked"} %] >+ >+[% status_descs => { "UNCONFIRMED" => "NON CONFIRMÉ", >+ "NEW" => "NOUVEAU", >+ "ASSIGNED" => "ASSIGNÉ", >+ "REOPENED" => "RÉOUVERT", >+ "RESOLVED" => "RÉSOLU", >+ "VERIFIED" => "VÉRIFIÉ", >+ "CLOSED" => "FERMÉ" } %] >+ >+[% resolution_descs => { "FIXED" => "CORRIGÉ", >+ "INVALID" => "INVALIDE", >+ "WONTFIX" => "NON CORRIGIBLE", >+ "LATER" => "PLUS TARD", >+ "REMIND" => "RAPPEL", >+ "DUPLICATE" => "DOUBLON", >+ "WORKSFORME" => "OK POUR MOI", >+ "MOVED" => "DÉPLACÉ" } %] >+ OK, so now the english version will display statuses and resolutions in french??? Looks like a bug to me.
Attachment #182098 - Flags: review-
> OK, so now the english version will display statuses and resolutions in > french??? Looks like a bug to me. Note to self: stop handing patches at 2am. The french is there so that I can see if it works or not (hard to tell if the in-DB and localized names are one and the same). Uploading a new patch.
Attachment #182098 - Attachment is obsolete: true
Attachment #182165 - Flags: review?(gerv)
Attachment #181135 - Flags: review?(gerv)
Attachment #182098 - Flags: review?(gerv)
Assignee: myk → eseyman
Severity: normal → enhancement
Target Milestone: --- → Bugzilla 2.22
Version: unspecified → 2.17
Status: NEW → ASSIGNED
Comment on attachment 182165 [details] [diff] [review] two hashes, in english r=gerv. Looks good to me. Gerv
Attachment #182165 - Flags: review?(gerv) → review+
Approved for checkin to 2.20 during freeze.
Flags: approval+
Fixed. Checking in template/en/default/bug/create/create.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl,v <-- create.html.tmpl new revision: 1.50; previous revision: 1.49 done Checking in template/en/default/bug/knob.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/knob.html.tmpl,v <-- knob.html.tmpl new revision: 1.17; previous revision: 1.16 done Checking in template/en/default/bug/edit.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl,v <-- edit.html.tmpl new revision: 1.59; previous revision: 1.58 done Checking in template/en/default/whine/mail.txt.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/whine/mail.txt.tmpl,v <-- mail.txt.tmpl new revision: 1.2; previous revision: 1.1 done Checking in template/en/default/whine/mail.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/whine/mail.html.tmpl,v <-- mail.html.tmpl new revision: 1.2; previous revision: 1.1 done Checking in template/en/default/list/edit-multiple.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl,v <-- edit-multiple.html.tmpl new revision: 1.25; previous revision: 1.24 done Checking in template/en/default/pages/fields.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/pages/fields.html.tmpl,v <-- fields.html.tmpl new revision: 1.5; previous revision: 1.4 done Checking in template/en/default/global/field-descs.none.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/field-descs.none.tmpl,v <-- field-descs.none.tmpl new revision: 1.9; previous revision: 1.8 done Gerv
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: Bugzilla 2.22 → Bugzilla 2.20
This bug is resolved but more changes have to be done so that everything sent to the user uses the localized statuses and resolutions. These include : - "View Bug Activity" - The search templates - Bug Lists and their exports - Mail I'll be marking all of these bugs on dependent on this one so that we can keep track of them.
Blocks: 215208, 215346, 275636, 275638, 293767
No longer blocks: 215149
No longer depends on: 215208, 215346
Blocks: 296180
The checkin in Bonsai which is attributed to this bug contains several changes which were not in the approved patch on this bug. Gerv was the person who checked in. This regressed bug 163007. See http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla/webtools/bugzilla/template/en/default/bug&command=DIFF_FRAMESET&file=edit.html.tmpl&rev2=1.59&rev1=1.58
Dave: sorry, I have no idea how that happened. My apologies. I've filed bug 313728 about cleaning up the mess. Gerv
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: