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

FR: change slug generation function to transliteratable slugify for CJK characters. #2028

Closed
lesstif opened this Issue Jun 18, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@lesstif

lesstif commented Jun 18, 2018

Is your feature request related to a problem? Please describe.
statamic doesn't correctly generate slug, when title has CJK(chinese, japan, korean) characters.

for example, title is 'blog 한글 題目 test', the slug generated is 'blog-test' and all of the CJK characters are lost.

image

if title has only CJK character, slug does not generate(empty string).

Describe the solution you'd like

the solution is to change the slug generation function in the file 'statamic/resources/js/plugins/slugify.js' to Transliterations package's slugify function.

import { slugify } from 'transliterations';

export default {
    install(Vue, options) {
        Vue.prototype.$slugify = function(text, glue) {
            return slugify(text);
        };
    }
};

Describe alternatives you've considered
If the release takes a long time, please tell me how to rebuild the Control panel's frontend javascript.
I have to solve this problem temporarily, but i can't find gulpfile.js and package.json for control panel.

@lesstif

This comment has been minimized.

lesstif commented Jun 19, 2018

relates to #1838

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Oct 29, 2018

Will be in the next release!

@jackmcdade jackmcdade closed this Nov 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment