Strategy11 / display-widgets

http://wordpress.org/extend/plugins/display-widgets/
21 stars 22 forks source link

Added missing L10n. #3

Closed cdillon closed 10 years ago

cdillon commented 10 years ago

Add text-domain on Pages and Categories in response to this support post http://wordpress.org/support/topic/wpml-translated-categories-issue?replies=5

cdillon commented 10 years ago

Also added the correct action hook, save_post, for deleting the transient in response to this support post http://wordpress.org/support/topic/transient-should-be-purged-when-new-pages-are-added?replies=5

stephywells commented 10 years ago

These changes aren't necessary. The translations use the default Wordpress domain, so those strings don't require an extra translation in this plugin as well.

save_post_page isn't a documented hook, but it is in the code at the same point and is specific to pages. The transient doesn't need to be cleared for other post types.

cdillon commented 10 years ago

I beg to differ. The default domain is just a placeholder:

    [default] => NOOP_Translations Object
        (
            [entries] => Array
                (
                )

            [headers] => Array
                (
                )

        )

I scanned core back to version 3.3 and found no instance of save_post_page.

stephywells commented 10 years ago

Both instances of this: do_action( 'save_post', $post->ID, $post, true );

Include this line right before it: do_action( "savepost{$post->post_type}", $post->ID, $post, true );

I've tested using default translations like that, and it pulls from the WordPress translations.

cdillon commented 10 years ago

I stand corrected and I apologize for the oversight.

On Thu, Apr 10, 2014 at 11:05 AM, Stephanie Wells notifications@github.comwrote:

Both instances of this: do_action( 'save_post', $post->ID, $post, true );

Include this line right before it: do_action( "savepost{$post->post_type}", $post->ID, $post, true );

I've tested using default translations like that, and it pulls from the WordPress translations.

Reply to this email directly or view it on GitHubhttps://github.com/Strategy11/display-widgets/pull/3#issuecomment-40096712 .