Skip to content
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

Use default textdomain where possible #536

Merged
merged 1 commit into from
May 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions connectors/blogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
class WP_Stream_Connector_Blogs extends WP_Stream_Connector {

/**
* Context name
* Connector slug
*
* @var string
*/
public static $name = 'blogs';

/**
* Actions registered for this context
* Actions registered for this connector
* @var array
*/
public static $actions = array(
Expand All @@ -30,12 +31,12 @@ class WP_Stream_Connector_Blogs extends WP_Stream_Connector {
);

/**
* Return translated context label
* Return translated connector label
*
* @return string Translated context label
* @return string Translated connector label
*/
public static function get_label() {
return __( 'Sites', 'stream' );
return __( 'Sites', 'default' );
}

/**
Expand Down Expand Up @@ -79,12 +80,12 @@ public static function get_context_labels() {
* @return array Action links
*/
public static function action_links( $links, $record ) {
$links [ __( 'Site Admin', 'stream' ) ] = get_admin_url( $record->object_id );
$links [ __( 'Site Admin', 'default' ) ] = get_admin_url( $record->object_id );
if ( $record->object_id ) {
$site_admin_link = get_admin_url( $record->object_id );

if ( $site_admin_link ) {
$links [ __( 'Site Admin', 'stream' ) ] = $site_admin_link;
$links [ __( 'Site Admin', 'default' ) ] = $site_admin_link;
}

$site_settings_link = add_query_arg(
Expand Down
14 changes: 7 additions & 7 deletions connectors/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
class WP_Stream_Connector_Comments extends WP_Stream_Connector {

/**
* Context name
* Connector slug
*
* @var string
*/
public static $name = 'comments';

/**
* Actions registered for this context
* Actions registered for this connector
*
* @var array
*/
Expand All @@ -28,12 +28,12 @@ class WP_Stream_Connector_Comments extends WP_Stream_Connector {
);

/**
* Return translated context label
* Return translated connector label
*
* @return string Translated context label
* @return string Translated connector label
*/
public static function get_label() {
return __( 'Comments', 'stream' );
return __( 'Comments', 'default' );
}

/**
Expand Down Expand Up @@ -65,7 +65,7 @@ public static function get_action_labels() {
*/
public static function get_context_labels() {
return array(
'comments' => __( 'Comments', 'stream' ),
'comments' => __( 'Comments', 'default' ),
);
}

Expand All @@ -83,7 +83,7 @@ public static function action_links( $links, $record ) {
$del_nonce = wp_create_nonce( "delete-comment_$comment->comment_ID" );
$approve_nonce = wp_create_nonce( "approve-comment_$comment->comment_ID" );

$links[ __( 'Edit', 'stream' ) ] = admin_url( "comment.php?action=editcomment&c=$comment->comment_ID" );
$links[ __( 'Edit', 'default' ) ] = admin_url( "comment.php?action=editcomment&c=$comment->comment_ID" );

if ( 1 === $comment->comment_approved ) {
$links[ __( 'Unapprove', 'stream' ) ] = admin_url(
Expand Down
10 changes: 5 additions & 5 deletions connectors/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
class WP_Stream_Connector_Editor extends WP_Stream_Connector {

/**
* Context name
* Connector slug
*
* @var string
*/
public static $name = 'editor';

/**
* Actions registered for this context
* Actions registered for this connector
*
* @var array
*/
public static $actions = array();

/**
* Actions registered for this context
* Actions registered for this connector
*
* @var array
*/
Expand All @@ -35,9 +35,9 @@ public static function register() {
}

/**
* Return translated context label
* Return translated connector label
*
* @return string Translated context label
* @return string Translated connector label
*/
public static function get_label() {
return __( 'Theme Editor', 'stream' );
Expand Down
14 changes: 7 additions & 7 deletions connectors/installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
class WP_Stream_Connector_Installer extends WP_Stream_Connector {

/**
* Context name
* Context slug
*
* @var string
*/
public static $name = 'installer';

/**
* Actions registered for this context
* Actions registered for this connector
*
* @var array
*/
Expand All @@ -27,9 +27,9 @@ class WP_Stream_Connector_Installer extends WP_Stream_Connector {
);

/**
* Return translated context label
* Return translated connector label
*
* @return string Translated context label
* @return string Translated connector label
*/
public static function get_label() {
return __( 'Installer', 'stream' );
Expand Down Expand Up @@ -58,9 +58,9 @@ public static function get_action_labels() {
*/
public static function get_context_labels() {
return array(
'plugins' => __( 'Plugins', 'stream' ),
'themes' => __( 'Themes', 'stream' ),
'wordpress' => __( 'WordPress', 'stream' ),
'plugins' => __( 'Plugins', 'default' ),
'themes' => __( 'Themes', 'default' ),
'wordpress' => __( 'WordPress', 'default' ),
);
}

Expand Down
26 changes: 13 additions & 13 deletions connectors/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
class WP_Stream_Connector_Media extends WP_Stream_Connector {

/**
* Context name
* Connector slug
*
* @var string
*/
public static $name = 'media';

/**
* Actions registered for this context
* Actions registered for this connector
*
* @var array
*/
Expand All @@ -23,12 +23,12 @@ class WP_Stream_Connector_Media extends WP_Stream_Connector {
);

/**
* Return translated context label
* Return translated connector label
*
* @return string Translated context label
* @return string Translated connector label
*/
public static function get_label() {
return __( 'Media', 'stream' );
return __( 'Media', 'default' );
}

/**
Expand Down Expand Up @@ -56,15 +56,15 @@ public static function get_action_labels() {
*/
public static function get_context_labels() {
return array(
'image' => __( 'Image', 'stream' ),
'audio' => __( 'Audio', 'stream' ),
'video' => __( 'Video', 'stream' ),
'image' => __( 'Image', 'default' ),
'audio' => __( 'Audio', 'default' ),
'video' => __( 'Video', 'default' ),
'document' => __( 'Document', 'stream' ),
'spreadsheet' => __( 'Spreadsheet', 'stream' ),
'interactive' => __( 'Interactive', 'stream' ),
'text' => __( 'Text', 'stream' ),
'archive' => __( 'Archive', 'stream' ),
'code' => __( 'Code', 'stream' ),
'text' => __( 'Text', 'default' ),
'archive' => __( 'Archive', 'default' ),
'code' => __( 'Code', 'default' ),
);
}

Expand Down Expand Up @@ -102,10 +102,10 @@ public static function get_attachment_type( $file_uri ) {
public static function action_links( $links, $record ) {
if ( $record->object_id ) {
if ( $link = get_edit_post_link( $record->object_id ) ) {
$links[ __( 'Edit Media', 'stream' ) ] = $link;
$links[ __( 'Edit Media', 'default' ) ] = $link;
}
if ( $link = get_permalink( $record->object_id ) ) {
$links[ __( 'View', 'stream' ) ] = $link;
$links[ __( 'View', 'default' ) ] = $link;
}
}

Expand Down
10 changes: 5 additions & 5 deletions connectors/menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
class WP_Stream_Connector_Menus extends WP_Stream_Connector {

/**
* Context name
* Connector slug
*
* @var string
*/
public static $name = 'menus';

/**
* Actions registered for this context
* Actions registered for this connector
*
* @var array
*/
Expand All @@ -21,12 +21,12 @@ class WP_Stream_Connector_Menus extends WP_Stream_Connector {
);

/**
* Return translated context label
* Return translated connector label
*
* @return string Translated context label
* @return string Translated connector label
*/
public static function get_label() {
return __( 'Menus', 'stream' );
return __( 'Menus', 'default' );
}

/**
Expand Down
12 changes: 6 additions & 6 deletions connectors/posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
class WP_Stream_Connector_Posts extends WP_Stream_Connector {

/**
* Context name
* Connector slug
*
* @var string
*/
public static $name = 'posts';

/**
* Actions registered for this context
* Actions registered for this connector
*
* @var array
*/
Expand All @@ -20,12 +20,12 @@ class WP_Stream_Connector_Posts extends WP_Stream_Connector {
);

/**
* Return translated context label
* Return translated connector label
*
* @return string Translated context label
* @return string Translated connector label
*/
public static function get_label() {
return __( 'Posts', 'stream' );
return __( 'Posts', 'default' );
}

/**
Expand Down Expand Up @@ -230,7 +230,7 @@ public static function get_ignored_post_types() {
* @return string Post type label
*/
private static function get_post_type_name( $post_type_slug ) {
$name = __( 'Post', 'stream' ); // Default
$name = __( 'Post', 'default' ); // Default

if ( post_type_exists( $post_type_slug ) ) {
$post_type = get_post_type_object( $post_type_slug );
Expand Down
Loading