Custom fields design doc

Joel Peshkin bugreport at peshkin.net
Fri May 23 15:43:56 UTC 2003


Sean McAfee wrote:

>><snip>
>>    
>>
>>By this time, my desire to avoid requiring the admin to twiddle templates is
>>well-known.  Hmmm.  OK, how about storing display names in a table like
>>this:
>>    
>>
>[snip]
>
>OK, I had a better idea.  Leave the display_name in custom_fields as
>I originally proposed.  The name in the table represents the field's
>display name in a default locale, which can be a new Bugzilla parameter.
>Those who want to provide alternate names for different locales can
>override the default on a per-locale basis in an appropriate template.
>This way, those who don't need to support multiple locales don't need to
>edit templates, and those who do can do so using the mechanism you
>suggested.
>  
>
If you are going to do that, you may as well use a mechanism similar to 
the ThrowUserError() approach and have all the templates call a 
proceduere in a common template that takes the display name as an 
argument and either emits the Display name unchanged or looks it up. 
 Unlike ThrowUserError() where the normal case does the substitution and 
emitting the name verbatim would be the exception, this would very 
frequently leave the name verbatim.

-Joel






More information about the developers mailing list