Skip to content

PermissionLogRecorder doesn't translate label #1645

@felixrindt

Description

@felixrindt

In get_group_permission_log_fields in this file, neither gettext nor gettext_lazy are really fitting, since in both cases, the translation is fixed on the current locale of the acting user, instead of being determined when displaying the log entry:

Screenshot 2025-09-05 at 14-58-20 Home - ephios

Originally posted by @lukasrad02 in #1644 (comment)


The label is defined when instances of the recorder are created. There can't really be a definition shared between callers and the logging framework, except inside the permission object accessible using the codename. If that's no good, a translation might do (with translator context for the modellogging framework's Permission recorder) and same caller-side call to gettext so the label get's marked for translation (must use the same context value I suppuse).

There are probably issues like this spread throughout the modellogging framework, esp. because it does work for deleted objects. I guess there wont be away to fix all of them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [C] bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions