Skip to main content

[CHD-1419] Allow plugins to provide translation strings for Audit Log events

In Fix Branch: 
Yes
Jira
Jira Status: 
Has Release Number
GitHub Branches

Well working on a plugin to add additional audit log events into my system I found myself running into a problem. It seems that when you display the field change_fields inside the audit log you run it though a simple translation system using the fields from the ticket database. This works well unless you are tiring to display information that does not have a field connected to a ticket like a comment or time tracking event or anything else a plug-in designer might think of using. Then that is where the fun begins. As it stands right now it tacks on a "t_" in front of the field then displays it. That "t_" make things really bad inside the display and really limits what a plug-in can do with the audit log. It would be really nice if the plugin could simple run the field un altered though the translation system as plug-in designers can add translatable strings in to the audit log making the audit log much more usable as being part of a tool kit. You ask how major of a change in the code do I need to do to get this added abilty. The answer is just 1 line of code.

Thanks
Robert.

AttachmentSize
cerb4-chd-1419.patch594 bytes
cerb5-chd-1419.patch594 bytes

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.
  • Project issue numbers (ex. [#12345]) turn into links automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.