Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#8866 closed defect (fixed)

Umlauts in field labels make set permissions be ignored in ticket changelog

Reported by: ronino Owned by: Russ Tyndall
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

I have translated the plugin's additional field labels into German and found out that having an umlaut in a field's label makes the set permissions be ignored in the ticket changelog.

For example, in trac.ini I have set this to remove the hours field for users without TIME_VIEW permission:

[field settings]
...
hours.permission = TIME_VIEW:remove, TIME_RECORD:disable

[ticket-custom]
...
hours.label = Stunden hinzufügen

Now if somebody adds hours to a ticket, the label and value are displayed in the ticket changelog also for users without TIME_VIEW permission. If I replace the umlaut by ue ("Stunden hinzufuegen"), the field is correctly removed from the changelog.

The ticket form and reports are not affected as far as I can see, the field is correctly removed.

I don't know any Python, but I suppose that the reason lies in remove_changelog() in blackmagic.py.

Otherwise, permissions work great! Thank you.

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by Russ Tyndall

(In [10266]) fixed UTF-8 field label bugs related to genshi Stream.render calls re #8866

comment:2 Changed 6 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

OK, I think I got this all straightened out. There was a problem with string encodings and how I was rendering them without passing the 'None' second parameter (which, even though it claims to be the default value, changes the return type of the function to unicode).

Please let me know if there is anything I need to commit to make your translation available to other users, or if you simply want to provide your translations I could look at how to use babel to get those translations automatically available to users in those locales.

Thanks for the bug report, Russ

comment:3 Changed 6 years ago by ronino

Thank you for fixing this so quick, works flawless now.

Please let me know if there is anything I need to commit to make your translation available to other users, or if you simply want to provide your translations I could look at how to use babel to get those translations automatically available to users in those locales.

I don't know about Trac's i18n system, but I can provide you with my translations:

billable.label = abrechenbar
estimatedhours.label = Geschätzte Dauer in Stunden
hours.label = Stunden hinzufügen
internal.label = intern
totalhours.label = Gesamtstunden

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Russ Tyndall.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.