-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(core,common,admin-ui): Implement normalizeString function using slug library #2721
base: master
Are you sure you want to change the base?
feat(core,common,admin-ui): Implement normalizeString function using slug library #2721
Conversation
✅ Deploy Preview for effervescent-donut-4977b2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hi, This is basically good and I like the In the Discord chat about this, a Chinese user said he would in any case use English for the slugs, but of course it is not feasible to translate Chinese to English in a slug lib! So my preferred behaviour would be to leave the chinses as-is, rather than replacing with empty string. For the Admin UI this is not a big issue since the admin can directly edit the slug before saving. But for things like imports, we could run into the problem. Do you have any ideas on this? |
Hi, I agree. But for |
@michaelbromley do you have any thoughts? |
@andriinuts Yes, if we can have the benefit of 'slug' for the western languages, and no-op for non-supported languages like Chinese, then this is a good approach. |
Description
Updated
normalizeString
to useslug
npm package which fixes issues with multilanguage slug generation and especially Cyrillic letters: https://discord.com/channels/1100672177260478564/1208130249632649256Breaking changes
Updated all calls of the normalizeString function to include a third parameter for language code. This enhancement allows the function to normalize strings based on specific language rules.
Checklist
📌 Always:
👍 Most of the time: