Skip to content

Conversation

@IgorBenko
Copy link
Contributor

Each audit log type now has its own display class and Twig template in order to display each type in an optimized manner. Also fixes the table layout by adding fixed column widths for date and type.

return $this->actor;
}

public function getTypeTranslationKey(): string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of returning a translation key, I suggest returning a TranslatableInterface (probably using the TranslatableMessage implementation available in core in each case).

The benefits are:

  1. it will make it possible to use placeholders if needed
  2. when not using dynamic keys (unlike what it does here), keys can be extracted by the tooling (as it is aware that the constructor of TranslatableMessage takes a translation key)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think placeholders aren't really needed here as the types are just fixed strings, and translation key extraction is also kinda useless for this app where we don't really use translations much so we don't have hundreds of keys that are easy to lose track of.. Is there really a point then in changing this?

Copy link
Member

@Seldaek Seldaek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving open for now as discussion is ongoing, but good to merge IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants