Closed
Bug 297104
Opened 20 years ago
Closed 18 years ago
Need a way to localize individual strings within perl code
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: mkanat, Assigned: mkanat)
References
(Blocks 1 open bug)
Details
(Keywords: intl, Whiteboard: [fixed by blocker])
Attachments
(1 file, 2 obsolete files)
|
7.40 KB,
patch
|
Details | Diff | Splinter Review |
Right now we have a few places inside Bugzilla where we have individual strings that are hardcoded, such as the default description of a product group. We need a way to localize these strings, or to allow Bugzilla admins to customize them. My proposal is to have a global/strings.txt.tmpl template, and a Bugzilla::Template::get_string($string_name, %params) function.
Comment 1•20 years ago
|
||
reports.cgi
Comment 2•20 years ago
|
||
move chooseproduct from reports.cgi.
Attachment 185871 [details] [diff] and this are one set, sorry for inconvenience.| Assignee | ||
Comment 3•20 years ago
|
||
Comment on attachment 185871 [details] [diff] [review] move chooseproduct to template This is totally unrelated to this bug.
Attachment #185871 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•20 years ago
|
||
Comment on attachment 185873 [details]
choose-product.html.tmpl
And this is also unrelated to this bug.
Attachment #185873 -
Attachment is obsolete: true
Comment 5•19 years ago
|
||
(In reply to comment #0) > My proposal is to have a global/strings.txt.tmpl template, and a > Bugzilla::Template::get_string($string_name, %params) function. That's what I have in mind too. We could use something similar to global/messages.html.tmpl. Or even global/messages.html.tmpl itself!
Comment 6•19 years ago
|
||
*** Bug 305191 has been marked as a duplicate of this bug. ***
Updated•19 years ago
|
Comment 7•18 years ago
|
||
*** Bug 347811 has been marked as a duplicate of this bug. ***
Updated•18 years ago
|
Assignee: general → batosti
Comment 8•18 years ago
|
||
what is the better way to do this? with the existent message.txt.tmpl or create a new template? i make the get_string function and works fine with the message template. the work now is find the existent strings and add to template or create a new template with this strings.
Comment 9•18 years ago
|
||
We should have a separate template. But note that we have to rethink the way we mark some comments in Bugzilla. For instance, having these "bug xxx has been marked as a duplicate of bug yyy" shouldn't be in a comment, because these comments are obsolete when the bug is reopened or marked as a dupe of another bug. Don't waste your time about sanitycheck.cgi, I'm going to templatize it as part of bug 312197. I think the remaining places are in editproducts.cgi, when sending emails about removed votes. But in this case, we don't want to send emails in the language used by the admin, but we would like the one desired by the user getting the email. That's a problem we discussed in another bug (i.e. let the user choose the language in which he would like to get his emails). Maybe should we fix this "another bug" first?
Comment 10•18 years ago
|
||
work checkpoint with a few strings moved to the templates. But if a comment is submmited to bug in the language of a user, the other users can't see the comment in your own language. this comments can be filtered to show the message at the current user language?
| Assignee | ||
Updated•18 years ago
|
Assignee: batosti → mkanat
Depends on: 352608
Whiteboard: [fixed by blocker]
Target Milestone: --- → Bugzilla 3.0
| Assignee | ||
Comment 11•18 years ago
|
||
See get_text that now lives in Bugzilla::Util. It was created to localize strings during installation, but it should work fine for everything.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•