Closed Bug 162216 Opened 22 years ago Closed 22 years ago

colchange.cgi, buglist.cgi and page.cgi messages should be l10nable

Categories

(Bugzilla :: User Interface, defect)

2.17
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: burnus, Assigned: gerv)

Details

Attachments

(1 file, 1 obsolete file)

colchange.cgi, buglist.cgi and page.cgi should use global/messages.html.tmpl to
localize the messages.
Patch to come.
Attachment #94859 - Flags: review-
Comment on attachment 94859 [details] [diff] [review]
Patch colchange.cgi, buglist.cgi, page.cgi and messages.html.tmpl

Doh. Wrong button.

> if (length($::buffer) == 0) {
>-    $vars->{'title'} = "Parameters Required";
>-    $vars->{'message'} = "This script is not meant to be invoked without any 
>-                          search terms.";
>+    $vars->{'message'} = "buglist_parameters_required";
>     $vars->{'url'} = "query.cgi";
>-    $vars->{'link'} = "Please use the search form to specify some search
>-                       criteria.";

Even though it's not strictly necessary, I think you should move the definition
of 'url' into the template along with 'link', just to keep them together.

>-    $vars->{'title'} = "Adding field to query page...";
>+    $vars->{'message'} = "buglist_adding_field";

Do we need some sort of naming convention for these tags? I don't want to make
the names too specific, because then if you reuse the message elsewhere, the
name is inappropriate.

>+  [% ELSIF message_tag == "buglist_adding_field" %]
>+    [% title = "Adding field to query page..." %]
>+    [% link  = "Click here if the page does not redisplay automatically." %]
>+    [% # --- %] 
>+  [% ELSIF message_tag == "buglist_load_named_query" %]

Need a blank line in there.

>+  [% ELSIF message_tag == "buglist_new_named_query" %]
>+    OK, you have a new query named <code>[% queryname %]</code>."

FILTER html?

>+  [% ELSIF message_tag == "buglist_query_gone" %]
>+    [% title = "Query is gone" %]
>+    [% link  = "Go back to the query page." %]
>+    OK, the <b>[% namedcmd %]</b> query is gone.

And here.

Gerv
> Even though it's not strictly necessary, I think you should move the 
> definition of 'url' into the template along with 'link', just to keep them
> together.
I think for {'url'} = "query.cgi" this is ok, but for
  $vars->{'url'} = $url;
this doesn't make that much sense, does it? ;-)
Moved the constant string. ;-)

> >-    $vars->{'title'} = "Adding field to query page...";
> >+    $vars->{'message'} = "buglist_adding_field";
> Do we need some sort of naming convention for these tags? I don't want to make
> the names too specific, because then if you reuse the message elsewhere, the
> name is inappropriate.
Well while the title might be rather generic, e.g. "Parameters Required", the
message itself usually isn't. I tried to give the generic messages a generic
title, but I also tried to keep the messages closely together (they are
alphabetical sorted). (The change columns and the page not found messages have
both generic names.)
If you have better titles...

> >+  [% ELSIF message_tag == "buglist_adding_field" %]
> >+    [% title = "Adding field to query page..." %]
> >+    [% link  = "Click here if the page does not redisplay automatically." %]
> >+    [% # --- %] 
> >+  [% ELSIF message_tag == "buglist_load_named_query" %]
> Need a blank line in there.
Actually I don't. If I remove the [% #--%] the [% IF message %] in
header.html.tmpl is true and I get an empty table which looks rather ugly.

> >+  [% ELSIF message_tag == "buglist_new_named_query" %]
> >+    OK, you have a new query named <code>[% queryname %]</code>."
> FILTER html?
Good idea.
Fixed.

Checking in colchange.cgi;
/cvsroot/mozilla/webtools/bugzilla/colchange.cgi,v  <--  colchange.cgi
new revision: 1.29; previous revision: 1.28
done
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.190; previous revision: 1.189
done
Checking in page.cgi;
/cvsroot/mozilla/webtools/bugzilla/page.cgi,v  <--  page.cgi
new revision: 1.2; previous revision: 1.1
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.4; previous revision: 1.3
done

Gerv
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.18
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

Creator:
Created:
Updated:
Size: