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

Topology not showing properly when using other language than english #464

Open
florent4014 opened this issue Mar 7, 2024 · 3 comments
Open
Labels
status: accepted This issue has been accepted for implementation status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@florent4014
Copy link

florent4014 commented Mar 7, 2024

NetBox version

v3.7.3

Topology Views version

v3.9.0

Steps to Reproduce

1.Make sure your language is set to "English" and that "ENABLE_LOCALIZATION" is set to "True" in configuration.py

2.Go in Netbox, in the "Topology" page under "Topology View" section, display your devices (at least some patch panels with front and rear ports and end devices connected to it) with "Show Cables" and "Show Logical Connections".

3.Change your language in your profile preferences to "French".

4.Return to "Topology" and select the same things as step 2.

Expected Behavior

The topology should remain the same in any languages when defined with the same filters/parameters. In my case, when using English the patch panels are displayed, and when using French they simply vanish.

Observed Behavior

The topology isn't the same depending on the language used.

Here is the topology when using English :
netbox_topology-english

Here, the same topology and filters, but using French (patch panels vanished) :
netbox_topology-french

@florent4014 florent4014 added the type: bug A confirmed report of unexpected behavior in the application label Mar 7, 2024
@dreng dreng added status: accepted This issue has been accepted for implementation status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Mar 22, 2024
@dreng
Copy link
Collaborator

dreng commented Mar 22, 2024

Choices in model IndividualOptions are hard coded in english. This leads to link.termination_type.name won't be found in supported_termination_types in views.py, because the name value represents the translated termination type.

views.py:
if link.termination_type.name in supported_termination_types:

The same applies to

views.py:
if link.termination_type.name in ignore_cable_type:

@dreng
Copy link
Collaborator

dreng commented Mar 23, 2024

Just had a closer look. We could use link.termination_type.model instead. Unfortunately we need to make changes to the model if we go this way.

I don't get why link.termination_type.name is being translated. That does not make much sense to me and I'm not sure if this is intended.

@florent4014
Copy link
Author

I also thouhgt of that kind of design. Maybe the issue could be resolved by the translator himself.

As i'm not quite a developper nor a translator i'm afraid my understanding is quite limited.

@dreng dreng changed the title Topology not showing poperly when using other language than english Topology not showing properly when using other language than english Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted This issue has been accepted for implementation status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants