This repository has been archived on 2026-11-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Netbox-Better-IPs/netbox_better_ips/navigation.py
T
MrBlakeandClaude Opus 5.5 e9d9b59d16 feat: translate UI to English with German locale
Use English source strings wrapped for gettext, ship a German catalogue, and check that README and package metadata match the PluginConfig.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 21:24:20 +01:00

27 lines
839 B
Python

from django.utils.translation import gettext_lazy as _
from netbox.navigation import MenuItem
# The public plugin navigation API can only create a separate Plugins menu.
# NetBox 4.6.5 does not expose an API for extending an existing core menu, so
# this pinned-version integration appends our entry to IPAM's first group.
def register_ipam_menu_item():
from netbox.navigation.menu import IPAM_MENU
group = IPAM_MENU.groups[0]
link = "plugins:netbox_better_ips:network_overview"
if any(item.link == link for item in group.items):
return
group.items = (
*group.items,
MenuItem(
link=link,
link_text=_("IP Network Overview"),
permissions=["ipam.view_prefix"],
),
)
# Do not duplicate the entry in NetBox's generic Plugins menu.
menu_items = ()