transliterate Umlauts in autogenerated slugs #5747

Closed
opened 2025-12-29 19:32:08 +01:00 by adam · 9 comments
Owner

Originally created by @lucasteinke on GitHub (Dec 9, 2021).

NetBox version

v3.1.0

Feature type

Change to existing functionality

Proposed functionality

Currently, the autogenerated slugs just omit Umlauts, so when you for example enter Döner GmbH & Co. KG as tenant name, the slug generated will be dner-gmbh-co-kg. It would be nice if Umlauts could be transliterated, so äae, öoe, üue.

Maybe you can also transliterate stuff like & to and. Possibly there are other transliterations possible for other special characters in other languages.

Use case

There would be readable slugs without having to change the slug manually.

Database changes

No DB changes.

External dependencies

No new dependencies.

Originally created by @lucasteinke on GitHub (Dec 9, 2021). ### NetBox version v3.1.0 ### Feature type Change to existing functionality ### Proposed functionality Currently, the autogenerated slugs just omit Umlauts, so when you for example enter `Döner GmbH & Co. KG` as tenant name, the slug generated will be `dner-gmbh-co-kg`. It would be nice if Umlauts could be transliterated, so `ä`➔`ae`, `ö`➔`oe`, `ü`➔`ue`. Maybe you can also transliterate stuff like `&` to `and`. Possibly there are other transliterations possible for other special characters in other languages. ### Use case There would be readable slugs without having to change the slug manually. ### Database changes No DB changes. ### External dependencies No new dependencies.
adam added the type: featurestatus: needs ownerpending closure labels 2025-12-29 19:32:08 +01:00
adam closed this issue 2025-12-29 19:32:09 +01:00
Author
Owner

@DanSheps commented on GitHub (Dec 9, 2021):

Is there a javascript library to handle this automatically?

@DanSheps commented on GitHub (Dec 9, 2021): Is there a javascript library to handle this automatically?
Author
Owner

@markkuleinio commented on GitHub (Dec 9, 2021):

I thought slugs were being phased out, please remind me how it is. I mean, if slugs are here still to stay, then as a Finnish name user I would support this.

Hämäläinen -> hmlinen... 😊🇫🇮

@markkuleinio commented on GitHub (Dec 9, 2021): I thought slugs were being phased out, please remind me how it is. I mean, if slugs are here still to stay, then as a Finnish name user I would support this. Hämäläinen -> `hmlinen`... 😊🇫🇮
Author
Owner

@jeremystretch commented on GitHub (Dec 9, 2021):

I thought slugs were being phased out

I'm not sure to be honest. I think it makes sense, however a number of people do utilize the slug field to store import data (e.g. site codes). It would actually simplify things a good deal if we ditched them, but we need to ensure that anyone who needs slugs has a suitable migration path.

@jeremystretch commented on GitHub (Dec 9, 2021): > I thought slugs were being phased out I'm not sure to be honest. I think it makes sense, however a number of people do utilize the slug field to store import data (e.g. site codes). It would actually simplify things a good deal if we ditched them, but we need to ensure that anyone who needs slugs has a suitable migration path.
Author
Owner

@mmfreitas commented on GitHub (Dec 9, 2021):

I thought slugs were being phased out

I'm not sure to be honest. I think it makes sense, however a number of people do utilize the slug field to store import data (e.g. site codes). It would actually simplify things a good deal if we ditched them, but we need to ensure that anyone who needs slugs has a suitable migration path.

I thought that the slug was for a functional part of netbox such as url creation and querying. If it is not that important maybe it doesn't make sense being there...?
It also doesn´t seem like the type of field to store the type of information that you mentioned, I believe that would be better suited for a custom field and therefore it would be up to the user to migrate this information as you cannot prepare for every use case scenario.

@mmfreitas commented on GitHub (Dec 9, 2021): > > I thought slugs were being phased out > > I'm not sure to be honest. I think it makes sense, however a number of people do utilize the slug field to store import data (e.g. site codes). It would actually simplify things a good deal if we ditched them, but we need to ensure that anyone who needs slugs has a suitable migration path. I thought that the slug was for a functional part of netbox such as url creation and querying. If it is not that important maybe it doesn't make sense being there...? It also doesn´t seem like the type of field to store the type of information that you mentioned, I believe that would be better suited for a custom field and therefore it would be up to the user to migrate this information as you cannot prepare for every use case scenario.
Author
Owner

@markkuleinio commented on GitHub (Dec 9, 2021):

My biggest problem with slugs is that they are mandatory fields so I need to generate them in my apps. Currently I use random strings because it's easier than trying to generate the slug based on the object name and then double-checking that it really is unique within the object model.

@markkuleinio commented on GitHub (Dec 9, 2021): My biggest problem with slugs is that they are mandatory fields so I need to generate them in my apps. Currently I use random strings because it's easier than trying to generate the slug based on the object name and then double-checking that it really is unique within the object model.
Author
Owner

@jeremystretch commented on GitHub (Dec 9, 2021):

I thought that the slug was for a functional part of netbox such as url creation and querying.

We standardized all URL paths to use numeric keys only a while back (v2.11 maybe?).

It also doesn´t seem like the type of field to store the type of information that you mentioned, I believe that would be better suited for a custom field and therefore it would be up to the user to migrate this information as you cannot prepare for every use case scenario.

Agreed; a custom field would probably be the way to go.

@jeremystretch commented on GitHub (Dec 9, 2021): > I thought that the slug was for a functional part of netbox such as url creation and querying. We standardized all URL paths to use numeric keys only a while back (v2.11 maybe?). > It also doesn´t seem like the type of field to store the type of information that you mentioned, I believe that would be better suited for a custom field and therefore it would be up to the user to migrate this information as you cannot prepare for every use case scenario. Agreed; a custom field would probably be the way to go.
Author
Owner

@jeremystretch commented on GitHub (Dec 10, 2021):

I've opened #8036 to propose removing slugs entirely.

@jeremystretch commented on GitHub (Dec 10, 2021): I've opened #8036 to propose removing slugs entirely.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 9, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Feb 9, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Mar 11, 2022):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Mar 11, 2022): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5747