Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VLAN group scope selection fails for languages other than English #17256

Closed
alexandre-jr-94 opened this issue Aug 23, 2024 · 2 comments · Fixed by #17270
Closed

VLAN group scope selection fails for languages other than English #17256

alexandre-jr-94 opened this issue Aug 23, 2024 · 2 comments · Fixed by #17270
Assignees
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@alexandre-jr-94
Copy link

Deployment Type

Self-hosted

NetBox Version

v4.0.9

Python Version

3.10

Steps to Reproduce

  1. try Netbox in Portuguese
  2. go to VLAN Groups (Grupos de VLANS)
  3. add a new group
  4. In the "Scope" area, select "DCIM > Location" (DCIM > localização)

Expected Behavior

It should show the options to select the region, site, and location.

Observed Behavior

The options are not displayed, and when trying to save, the following error appears: It is not possible to set scope_type without scope_id.

@alexandre-jr-94 alexandre-jr-94 added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Aug 23, 2024
@jeremystretch
Copy link
Member

This happens because the Javascript responsible for dynamically updating the form fields depending on the selected scope type assumes English values (which is why "site" and "rack" work but the values with translated names fail). So this isn't Portuguese-specific, but impacts all translations generally.

The ideal solution here would be to ditch the relevant Javascript entirely, by enabling dynamic form rendering on the backend as we do for e.g. data sources.

@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: medium Results in substantial degraded or broken functionality for specfic workflows and removed status: needs triage This issue is awaiting triage by a maintainer labels Aug 26, 2024
@jeremystretch jeremystretch changed the title Vlan groups don't work in portuguese when scope is "DCIM > Location" VLAN group scope selection fails for languages other than English Aug 26, 2024
@freestyler0815
Copy link

I have the same issue with the german translation. As workarround you can switch the user profile temporarly to english, enter the data in the vlan group settings and switch back to your language.

@jeremystretch jeremystretch self-assigned this Aug 26, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Aug 26, 2024
jeremystretch added a commit that referenced this issue Aug 27, 2024
… form (#17270)

* Closes #17256: Fix translation support in VLAN group scope assignment form

* Disable scope field if scope type not selected; update label on type change

* Reset selected scope object when changing scope type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants