Change “empty trash” button text?

There’s no way to set this text directly. But, the “Empty Trash” text is run through the translation API before display. You can hijack this translation to replace the text with your own string.

get_current_screen() is used to check the post_type of the current admin screen, so you can make sure you’re only affecting your “task” type’s screens.

add_filter( 'gettext', 'override_empty_trash', 50, 3 );

/**
 * Override the "Empty Trash" string on admin pages for a custom post type
 *
 * @param string $translated_text translation of $text from previous filter calls
 * @param string $text            original text string
 * @param string $domain          translation domain
 *
 * @return string|void
 */
function override_empty_trash( $translated_text, $text, $domain ) {

    // Skip all of these checks if not on an admin screen
    if ( is_admin() ) {

        if ( 'Empty Trash' === $text ) {

            // get_current_screen returns info on the admin screen, including post_type
            $current_screen = get_current_screen();
            if ( 'my-post-type-slug' === $current_screen->post_type ) {
                // Override the translation, but run the replacement through the translation API
                $translated_text = __( 'Empty Archives', 'my-plugin-translation-domain' );
            }

        }

    }

    return $translated_text;

}