v0.2.0: fix leaked multi-line {# #} comments, add German translation

- Fix template comments rendering as literal text: Django's {# #} tag
  regex (tag_re in django/template/base.py) has no re.DOTALL, so a
  comment spanning multiple lines is never recognized as a tag at all
  and leaks into the rendered output verbatim - exactly what showed up
  under "Elevation". Collapsed all three offending comments to single
  lines. This was also almost certainly the real cause of the "PNG
  could not be generated" report: two of the leaked comments sat
  inside the shared SVG partial, corrupting the exported SVG enough
  that the browser's image decoder rejected it (my own onerror handler
  then showed a misleading CORS-sounding message - the actual bug was
  malformed markup, not cross-origin images).
- Add a German translation (locale/de/), built from every _() and
  {% trans %}/{% blocktrans %} string in the plugin (269 entries,
  cross-checked against the source for completeness). English needs no
  catalog of its own since it's the literal source text; both were
  already listed in NetBox's own language selector.
- Add CHANGELOG.md and bump the version to 0.2.0, covering this and
  every unreleased change so far; will keep bumping per change from
  here on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 12:45:01 +02:00
co-authored by Claude Sonnet 5
parent 2c991e37ae
commit 3420d84803
8 changed files with 978 additions and 9 deletions
+36
View File
@@ -0,0 +1,36 @@
# Changelog
## 0.2.0
- Fix: several multi-line `{# ... #}` template comments rendered as literal text on
the page instead of being stripped, because Django's comment-tag regex doesn't match
across newlines. All comments are now single-line. (This was also the most likely
cause of a reported "PNG export failed" error: the leaked text made the exported SVG
invalid, so the browser couldn't decode it as an image.)
- Add German translation (`locale/de/`). English remains the source language and needs
no catalog; both are already listed in NetBox's own language selector.
- Center the "+ Add device" hint on empty rack units instead of right-aligning it.
- Add SVG/PNG/draw.io export for rack concepts.
- Fix drag-and-drop reorder: NetBox sets `CSRF_COOKIE_HTTPONLY`, so the reorder POST's
CSRF token now comes from a rendered `{% csrf_token %}` input instead of the
(JS-invisible) cookie.
- Add per-type component tabs (Interfaces, Front/Rear Ports, Console (Server) Ports,
Power Ports/Outlets) on the concept device page, mirroring real `dcim.Device` pages.
- Copying a real rack (or merging two real racks) into a concept now also copies
internal cabling as ConceptCables.
- Show the peer device/port in component connection columns.
- Fix `IntegrityError` when merging two real racks: `airflow`/`face` can be `NULL` on
a real `Rack`/`Device` but not on the corresponding concept fields.
- Add rack cabling: `ConceptComponent`, `ConceptCable`, device-type component sync,
patch panel front/rear pass-through mapping.
- Add click-to-add on empty rack units, dropping the separate "Add planned device"
button.
- Add images/labels view toggle and clean up device label styling on the elevation.
- Fix rack elevation overlap; add device images to elevation blocks.
- Add rack/concept merge (2 racks or 2 concepts → 1), and a size override when copying
a real rack into a concept.
## 0.1.0
Initial release: rack concept planning, copy/clone/merge/deploy flows, drag-and-drop
elevation, partial-width devices, REST API.