Repository: wagtail/wagtail
File: wagtail/admin/templatetags/wagtailadmin_tags.py (Python)

Code before:
    return {
        "shortcuts": {
            ("actions-common", _("Common actions")): [
                (_("Copy"), f"{KEYS.MOD} + c"),
                (_("Cut"), f"{KEYS.MOD} + x"),
                (_("Paste"), f"{KEYS.MOD} + v"),
                (
                    _("Paste and match style")
                    if is_mac
                    else _("Paste without formatting"),
                    f"{KEYS.MOD} + {KEYS.SHIFT} + v",
                ),
                (_("Undo"), f"{KEYS.MOD} + z"),
                (
                    _("Redo"),
                    f"{KEYS.MOD} + {KEYS.SHIFT} + z" if is_mac else f"{KEYS.MOD} + y",
                ),
            ],
            ("actions-model", _("Actions")): [
                (_("Save changes"), f"{KEYS.MOD} + s"),
                (_("Preview"), f"{KEYS.MOD} + p"),
                (
                    _("Add or show comments"),
                    f"{KEYS.CTRL} + {KEYS.ALT} + m",
                ),
                (_("Minimap"), f"{KEYS.MOD} + ]"),
            ]
            if comments_enabled
            else [
                (_("Save changes"), f"{KEYS.MOD} + s"),
                (_("Preview"), f"{KEYS.MOD} + p"),
                (_("Minimap"), f"{KEYS.MOD} + ]"),
            ],
            ("rich-text-content", _("Text content")): [
                (_("Insert or edit a link"), f"{KEYS.MOD} + k")
            ],
            ("rich-text-formatting", _("Text formatting")): [
                (_("Italic"), f"{KEYS.MOD} + i"),
                (_("Underline"), f"{KEYS.MOD} + u"),
                (_("Monospace (code)"), f"{KEYS.MOD} + j"),
                (_("Strike-through"), f"{KEYS.MOD} + x"),
                (_("Superscript"), f"{KEYS.MOD} + ."),
                (_("Subscript"), f"{KEYS.MOD} + ,"),
            ],
        }
    }


@register.inclusion_tag("wagtailadmin/shared/human_readable_date.html")
def human_readable_date(date, description=None, placement="top"):
    if isinstance(date, datetime.datetime):

Review comment (suggestion):
I recommend we revise this approach so we do not have to repeat all the items that sit alongside the comment one each time.

```py
            ("actions-model", _("Actions")): [
                (_("Save changes"), f"{KEYS.MOD} + s"),
                (_("Preview"), f"{KEYS.MOD} + p"),
                (_("Minimap"), f"{KEYS.ALT} + ]"),
                (_("Add a comment"), f"{KEYS.MOD} + l") if comments_enabled else None,
            ],
```

Then, in the template ...

```html
                    {% for shortcut in shortcuts %}
                        {% if shortcut %}
                            <tr class="w-keyboard_shortcuts__key">
                                <th scope="row">{{ shortcut.0 }}</th>
                                <td><kbd>{{ shortcut.1 }}</kbd></td>
                            </tr>
                        {% endif %}
                    {% endfor %}
```


Code after:
    return {
        "shortcuts": {
            ("actions-common", _("Common actions")): [
                (_("Copy"), f"{KEYS.MOD} + c"),
                (_("Cut"), f"{KEYS.MOD} + x"),
                (_("Paste"), f"{KEYS.MOD} + v"),
                (
                    _("Paste and match style")
                    if is_mac
                    else _("Paste without formatting"),
                    f"{KEYS.MOD} + {KEYS.SHIFT} + v",
                ),
                (_("Undo"), f"{KEYS.MOD} + z"),
                (
                    _("Redo"),
                    f"{KEYS.MOD} + {KEYS.SHIFT} + z" if is_mac else f"{KEYS.MOD} + y",
                ),
            ],
            ("actions-model", _("Actions")): [
                (_("Save changes"), f"{KEYS.MOD} + s"),
                (_("Preview"), f"{KEYS.MOD} + p"),
                (_("Minimap"), f"{KEYS.ALT} + ]"),
                (_("Add or show comments"), f"{KEYS.CTRL} + {KEYS.ALT} + m")
                if comments_enabled
                else None,
            ],
            ("rich-text-content", _("Text content")): [
                (_("Insert or edit a link"), f"{KEYS.MOD} + k")
            ],
            ("rich-text-formatting", _("Text formatting")): [
                (_("Italic"), f"{KEYS.MOD} + i"),
                (_("Underline"), f"{KEYS.MOD} + u"),
                (_("Monospace (code)"), f"{KEYS.MOD} + j"),
                (_("Strike-through"), f"{KEYS.MOD} + x"),
                (_("Superscript"), f"{KEYS.MOD} + ."),
                (_("Subscript"), f"{KEYS.MOD} + ,"),
            ],
        }
    }


@register.inclusion_tag("wagtailadmin/shared/human_readable_date.html")
def human_readable_date(date, description=None, placement="top"):
    if isinstance(date, datetime.datetime):
        tooltip_format = getattr(settings, "DATETIME_FORMAT", "N j, Y, P")
    elif isinstance(date, datetime.date):
        tooltip_format = getattr(settings, "DATE_FORMAT", "N j, Y")
    return {
        "date": date,
        "description": description,
        "placement": placement,