slides icon indicating copy to clipboard operation
slides copied to clipboard

The slug should be translatable

Open davidperezgar opened this issue 6 years ago • 6 comments

Hey! Congratulations for the plugin! It's seems awesome!

I'm wondering that the slug will be better if it can be translated.

This is the line: https://github.com/WordPress/slides/blob/master/register.php#L35

What do you think?

davidperezgar avatar Nov 05 '19 18:11 davidperezgar

I think that makes sense. Is this usually done for custom post types? Do you have an example of another plugin doing this? I just want to be careful with breaking permalinks when you switch the language.

ellatrix avatar Nov 06 '19 12:11 ellatrix

Hello @ellatrix ! Yes, I give you the exact code: array( 'slug' => _x('presentation', 'slug', 'slide')),

Only will change for the translations made in translate.wordpress.org. But I think, it's a better option because we will have translated urls ... 😉

davidperezgar avatar Nov 07 '19 12:11 davidperezgar

Thanks. Could you link another plugin doing it this way?

ellatrix avatar Nov 07 '19 13:11 ellatrix

Yes, you can see it in this plugin: https://plugins.trac.wordpress.org/browser/strong-testimonials/trunk/includes/post-types.php#L105

For example. (It has +80.000 installations)

davidperezgar avatar Nov 07 '19 18:11 davidperezgar

I've made a pull request 😉

davidperezgar avatar Nov 07 '19 18:11 davidperezgar

我翻译成了中文:https://translate.wordpress.org/projects/wp-plugins/slide/dev/zh-cn/default/

zengxiaoluan avatar Nov 14 '19 12:11 zengxiaoluan