Improve product handle auto-generation from product title for non-latin scripts #14871
supernes
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
|
Not sure where toHandle is used internally, but I had a similar problem some time ago and proposed a merge, but it did not get any traction 🤷 Maybe it might help you anyways |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Medusa 2 has a feature which automatically generates handles (URL-safe ids) from product titles when one is not explicitly entered during product creation.
The way it does it however is very crude, stripping out non-alphanumeric characters instead of trying to transliterate them or map them to URL-valid strings. It's so aggressive that it doesn't even allow URL-encoded strings, which is the usual way of representing non-latin characters in URLs.
medusa/packages/core/utils/src/common/to-handle.ts
Lines 11 to 20 in d07f707
Expected acceptable results:
This is a big UX problem for platforms whose primary locale is not US English because it renders the handle auto-generation useless. Admins adding or editing products have to manually type handles, which slows down product creation flow.
Please consider improving handle auto-generation by replacing the
toHandlefunction with something that handles non-latin scripts (likeslugifyor similar).Beta Was this translation helpful? Give feedback.
All reactions