Closed Bug 106640 Opened 23 years ago Closed 22 years ago

add translation of system messages

Categories

(Bugzilla :: User Interface, enhancement, P3)

2.14
enhancement

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: ctron, Assigned: gerv)

Details

Attachments

(1 file, 1 obsolete file)

add translation support of system messages

e.g. labels like "Summary", "Quality Assurance", etc ... without changing the
CGI scripts.

The result is a per user/per system setting of the language and some translation
files.

an initial approach has already been made (for internal use). but I would like
to provide this feature others.
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.20
We have another user on IRC with the same question, and I would like to know if
we have decided what to do on this. CCs added.
OK. There are a couple of approaches to this:

1) gettext(). 
2) A template-based solution where you have a structure like:

ThrowUserError("no_permissions");


sub ThrowUserError {
  $vars->{'error_tag'} = $_[0];
  # do template stuff


user-error.html.tmpl:

[% IF      error_tag = "no_permissions" %]
  Sorry, you don't have permissions for this operation.
[% ELSE IF error_tag = "cant_edit" %]
...
<for a lot of messages>

There has been some discussion on this in the newsgroups...

Gerv
Taking.

Gerv
Assignee: myk → gerv
Target Milestone: Bugzilla 2.20 → Bugzilla 2.18
Attached patch Patch v.1 (obsolete) — Splinter Review
This patch adds the infrastructure for a migration to error tags instead of
text hard-coded in the CGIs. It's backwardly-compatible, so we can migrate all
the call sites over in a measured manner.

Anyone who is interested in doing a localised Bugzilla should be reviewing this
patch :-)

Gerv
Attached patch Patch v.2Splinter Review
A few more tweaks.

Gerv
Attachment #92100 - Attachment is obsolete: true
r=burnus
Perl likes it, the error messages are shown and the code looks ok.
Fixed.

Checking in CGI.pl;
/cvsroot/mozilla/webtools/bugzilla/CGI.pl,v  <--  CGI.pl
new revision: 1.164; previous revision: 1.163
done
Checking in template/en/default/global/user-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v
 <--  user-error.html.tmpl
new revision: 1.5; previous revision: 1.4
done
Checking in template/en/default/global/code-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl,v
 <--  code-error.html.tmpl
new revision: 1.6; previous revision: 1.5
done

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