Permalink
Browse files

Merge pull request #43 from boddhi/master

Change the text domain to `post-forking` to reflect the plugin slug, props @boddhi
  • Loading branch information...
2 parents 25bc5c2 + a7b2337 commit fd7ab108bde489b82dbb28e9fd0a782a8f9a099a @benbalter benbalter committed Oct 4, 2012
View
24 includes/admin.php
@@ -116,16 +116,16 @@ function update_messages( $messages ) {
global $post, $post_ID;
$messages['fork'] = array(
- 1 => __( 'Fork updated.', 'fork' ),
- 2 => __( 'Custom field updated.', 'fork' ),
- 3 => __( 'Custom field deleted.', 'fork' ),
- 4 => __( 'Fork updated.', 'fork' ),
- 5 => isset($_GET['revision']) ? sprintf( __( 'Fork restored to revision from %s', 'fork' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
- 6 => __( 'Fork published. <a href="%s">Download Fork</a>', 'fork' ),
- 7 => __( 'Fork saved.', 'fork' ),
- 8 => __( 'Fork submitted.', 'fork' ),
- 9 => __( 'Fork scheduled for:', 'fork' ),
- 10 => __( 'Fork draft updated.', 'fork' ),
+ 1 => __( 'Fork updated.', 'post-forking' ),
+ 2 => __( 'Custom field updated.', 'post-forking' ),
+ 3 => __( 'Custom field deleted.', 'post-forking' ),
+ 4 => __( 'Fork updated.', 'post-forking' ),
+ 5 => isset($_GET['revision']) ? sprintf( __( 'Fork restored to revision from %s', 'post-forking' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
+ 6 => __( 'Fork published. <a href="%s">Download Fork</a>', 'post-forking' ),
+ 7 => __( 'Fork saved.', 'post-forking' ),
+ 8 => __( 'Fork submitted.', 'post-forking' ),
+ 9 => __( 'Fork scheduled for:', 'post-forking' ),
+ 10 => __( 'Fork draft updated.', 'post-forking' ),
);
return $messages;
@@ -160,13 +160,13 @@ function enqueue() {
function row_actions( $actions, $post ) {
if ( post_type_supports( get_post_type( $post ), $this->parent->post_type_support ) ) {
- $label = ( $this->parent->branches->can_branch ( $post ) ) ? __( 'Create branch', 'fork' ) : __( 'Fork', 'fork' );
+ $label = ( $this->parent->branches->can_branch ( $post ) ) ? __( 'Create branch', 'post-forking' ) : __( 'Fork', 'post-forking' );
$actions[] = '<a href="' . admin_url( "?fork={$post->ID}" ) . '">' . $label . '</a>';
}
if ( Fork::post_type == get_post_type( $post ) ) {
$parent = $this->parent->revisions->get_previous_revision( $post );
- $actions[] = '<a href="' . admin_url( "revision.php?action=diff&left={$parent}&right={$post->ID}" ) . '">' . __( 'Compare', 'fork' ) . '</a>';
+ $actions[] = '<a href="' . admin_url( "revision.php?action=diff&left={$parent}&right={$post->ID}" ) . '">' . __( 'Compare', 'post-forking' ) . '</a>';
}
return $actions;
View
8 includes/merge.php
@@ -42,10 +42,10 @@ function merge( $fork ) {
return false;
if ( !current_user_can( 'publish_forks' ) )
- wp_die( __( 'You are not authorized to merge forks', 'fork' ) );
+ wp_die( __( 'You are not authorized to merge forks', 'post-forking' ) );
if ( !current_user_can( 'edit_posts', $fork->post_parent ) )
- wp_die( __( 'You are not authorized to edit the parent post', 'fork' ) );
+ wp_die( __( 'You are not authorized to edit the parent post', 'post-forking' ) );
$update = array(
'ID' => $fork->post_parent,
@@ -66,7 +66,7 @@ function merge( $fork ) {
function get_merged( $fork ) {
$diff = $this->get_diff( $fork );
- $merged = $diff->mergedOutput( __( 'Fork', 'fork' ), __( 'Current Version', 'fork' ) );
+ $merged = $diff->mergedOutput( __( 'Fork', 'post-forking' ), __( 'Current Version', 'post-forking' ) );
return implode( "\n", $merged );
}
@@ -240,7 +240,7 @@ function has_conflict_markup( $fork ) {
if ( !is_object( $fork ) )
$fork = get_post( $fork );
- $pattern = sprintf( '#\<\<\<\<\<\<\<|\>\>\>\>\>\>\>|&lt;&lt;&lt;&lt;&lt;&lt;&lt;|&gt;&gt;&gt;&gt;&gt;&gt;&gt;#s', __( 'Fork', 'fork' ), __( 'Current Version', 'fork' ) );
+ $pattern = sprintf( '#\<\<\<\<\<\<\<|\>\>\>\>\>\>\>|&lt;&lt;&lt;&lt;&lt;&lt;&lt;|&gt;&gt;&gt;&gt;&gt;&gt;&gt;#s', __( 'Fork', 'post-forking' ), __( 'Current Version', 'post-forking' ) );
return (bool) preg_match( $pattern, $fork->post_content );
View
2 includes/options.php
@@ -80,7 +80,7 @@ function set( $options, $merge = true ) {
*/
function register_menu() {
- add_submenu_page( 'edit.php?post_type=fork', __( 'Fork Settings', 'fork' ), __( 'Settings', 'fork' ), 'manage_options', 'fork_settings', array( $this, 'options' ) );
+ add_submenu_page( 'edit.php?post_type=fork', __( 'Fork Settings', 'post-forking' ), __( 'Settings', 'post-forking' ), 'manage_options', 'fork_settings', array( $this, 'options' ) );
}
View
0 languages/fork-de_DE.mo → languages/post-forking-de_DE.mo
File renamed without changes.
View
0 languages/fork-de_DE.po → languages/post-forking-de_DE.po
File renamed without changes.
View
BIN languages/fork-fr_FR.mo → languages/post-forking-fr_FR.mo
Binary file not shown.
View
26 languages/fork-fr_FR.po → languages/post-forking-fr_FR.po
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Post Forking\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-04 16:03+0100\n"
-"PO-Revision-Date: 2012-10-04 16:06+0100\n"
+"POT-Creation-Date: 2012-10-04 17:24+0100\n"
+"PO-Revision-Date: 2012-10-04 17:25+0100\n"
"Last-Translator: FxB <fx@fxbenard.com>\n"
"Language-Team: FxB <fx@fxbenard.com>\n"
"Language: fr_FR\n"
@@ -19,47 +19,47 @@ msgstr ""
"X-Poedit-SearchPath-0: .\n"
#: post-forking.php:104 post-forking.php:115
-msgctxt "fork"
+msgctxt "post-forking"
msgid "Forks"
msgstr "Forks"
#: post-forking.php:105
-msgctxt "fork"
+msgctxt "post-forking"
msgid "Fork"
msgstr "Fork"
#: post-forking.php:108
-msgctxt "fork"
+msgctxt "post-forking"
msgid "Edit Fork"
msgstr "Modifier la Fork"
#: post-forking.php:109
-msgctxt "fork"
+msgctxt "post-forking"
msgid "New Fork"
msgstr "Nouvelle Fork"
#: post-forking.php:110
-msgctxt "fork"
+msgctxt "post-forking"
msgid "View Fork"
msgstr "Voir la Fork"
#: post-forking.php:111
-msgctxt "fork"
+msgctxt "post-forking"
msgid "Search Forks"
msgstr "Rechercher Forks"
#: post-forking.php:112
-msgctxt "fork"
+msgctxt "post-forking"
msgid "No forks found"
msgstr "Aucune Fork trouvée."
#: post-forking.php:113
-msgctxt "fork"
+msgctxt "post-forking"
msgid "No forks found in Trash"
msgstr "Aucune Fork trouvée dans la Corbeille"
#: post-forking.php:114
-msgctxt "fork"
+msgctxt "post-forking"
msgid "Parent Fork:"
msgstr "Fork parente :"
@@ -187,10 +187,10 @@ msgstr "Types d'article"
msgid "View Fork"
msgstr "Voir la Fork"
-#~ msgctxt "post-forking"
+#~ msgctxt "fork"
#~ msgid "Fork"
#~ msgstr "Fork"
-#~ msgctxt "post-forking"
+#~ msgctxt "fork"
#~ msgid "View Fork"
#~ msgstr "Voir la Fork"
View
0 languages/fork.pot → languages/post-forking.pot
File renamed without changes.
View
26 post-forking.php
@@ -77,7 +77,7 @@ function __construct() {
* Must be done early on init because they need to be in place when register_cpt is called
*/
function l10n() {
- load_plugin_textdomain( 'fork', false, plugin_basename( dirname( __FILE__ ) ) . '/languages/' );
+ load_plugin_textdomain( 'post-forking', false, plugin_basename( dirname( __FILE__ ) ) . '/languages/' );
}
/**
@@ -101,18 +101,18 @@ function action_init() {
function register_cpt() {
$labels = array(
- 'name' => _x( 'Forks', 'fork' ),
- 'singular_name' => _x( 'Fork', 'fork' ),
+ 'name' => _x( 'Forks', 'post-forking' ),
+ 'singular_name' => _x( 'Fork', 'post-forking' ),
'add_new' => false,
'add_new_item' => false,
- 'edit_item' => _x( 'Edit Fork', 'fork' ),
- 'new_item' => _x( 'New Fork', 'fork' ),
- 'view_item' => _x( 'View Fork', 'fork' ),
- 'search_items' => _x( 'Search Forks', 'fork' ),
- 'not_found' => _x( 'No forks found', 'fork' ),
- 'not_found_in_trash' => _x( 'No forks found in Trash', 'fork' ),
- 'parent_item_colon' => _x( 'Parent Fork:', 'fork' ),
- 'menu_name' => _x( 'Forks', 'fork' ),
+ 'edit_item' => _x( 'Edit Fork', 'post-forking' ),
+ 'new_item' => _x( 'New Fork', 'post-forking' ),
+ 'view_item' => _x( 'View Fork', 'post-forking' ),
+ 'search_items' => _x( 'Search Forks', 'post-forking' ),
+ 'not_found' => _x( 'No forks found', 'post-forking' ),
+ 'not_found_in_trash' => _x( 'No forks found in Trash', 'post-forking' ),
+ 'parent_item_colon' => _x( 'Parent Fork:', 'post-forking' ),
+ 'menu_name' => _x( 'Forks', 'post-forking' ),
);
$args = array(
@@ -261,12 +261,12 @@ function fork( $p = null, $author = null ) {
//bad post type, enable via forks->options
if ( !post_type_supports( $p->post_type, $this->post_type_support ) )
- wp_die( __( 'That post type does not support forking', 'fork' ) );
+ wp_die( __( 'That post type does not support forking', 'post-forking' ) );
//hook into this cap check via map_meta cap
// for custom capabilities
if ( !user_can( $author, 'fork_posts', $p ) )
- wp_die( __( 'You are not authorized to fork that post', 'fork' ) );
+ wp_die( __( 'You are not authorized to fork that post', 'post-forking' ) );
//user already has a fork, just return the existing ID
if ( $fork = $this->user_has_fork( $p->ID, $author ) )
View
2 templates/author-post-meta-box.php
@@ -1 +1 @@
-<div class="fork-actions">
+<div class="fork-actions">
View
2 templates/branches-dropdown.php
@@ -1,5 +1,5 @@
<div class="fork-select">
-<label for="branches"><?php _e( 'Branch:', 'fork' ); ?></label> <select name="branches" id="branches" class="branches">
+<label for="branches"><?php _e( 'Branch:', 'post-forking' ); ?></label> <select name="branches" id="branches" class="branches">
<option id="original" value="<?php echo esc_attr( $post->ID ); ?>" class="original"><?php _e( 'Original', 'original' ); ?></option>
<?php foreach ( $branches as $branch ) { ?>
<option id="<?php echo esc_attr( $branch->post_name ); ?>" value="<?php echo esc_attr( $branch->ID ); ?>" <?php selected( $post->ID, $branch->ID ); ?>><?php echo $branch->post_title; ?></option>
View
2 templates/conflict-warning.php
@@ -1 +1 @@
-<div class="error" id="conflict-warning"><p><?php _e( 'This fork cannot be merged with its parent post. Please resolve the conflict below before attempting to publish again.', 'fork' ); ?></p></div>
+<div class="error" id="conflict-warning"><p><?php _e( 'This fork cannot be merged with its parent post. Please resolve the conflict below before attempting to publish again.', 'post-forking' ); ?></p></div>
View
6 templates/fork-meta-box.php
@@ -1,18 +1,18 @@
<div id="fork-info">
<p>
-<?php printf( __( 'Forked from <a href="%1$s">%2$s</a>', 'fork' ), admin_url( "post.php?post={$post->post_parent}&action=edit" ), $this->get_parent_name( $post ) ); ?> <a href="<?php echo admin_url( "revision.php?action=diff&left={$post->post_parent}&right={$post->ID}" ); ?>"><span class="fork-compare button"><?php _e( 'Compare', 'fork' ); ?></span></a>
+<?php printf( __( 'Forked from <a href="%1$s">%2$s</a>', 'post-forking' ), admin_url( "post.php?post={$post->post_parent}&action=edit" ), $this->get_parent_name( $post ) ); ?> <a href="<?php echo admin_url( "revision.php?action=diff&left={$post->post_parent}&right={$post->ID}" ); ?>"><span class="fork-compare button"><?php _e( 'Compare', 'post-forking' ); ?></span></a>
</p>
<div class="clear"></div>
</div>
<div id="major-publishing-actions">
<div id="delete-action">
-<?php submit_button( __( 'Save Fork', 'fork' ), 'button button-large', 'save', false ); ?>
+<?php submit_button( __( 'Save Fork', 'post-forking' ), 'button button-large', 'save', false ); ?>
</div>
<div id="publishing-action">
<img src="<?php echo admin_url( '/images/wpspin_light.gif' ); ?>" class="ajax-loading" id="ajax-loading" alt="" style="visibility: hidden; ">
<input name="original_publish" type="hidden" id="original_publish" value="Publish">
-<?php submit_button( __( 'Merge', 'fork' ), 'primary', 'publish', false ); ?>
+<?php submit_button( __( 'Merge', 'post-forking' ), 'primary', 'publish', false ); ?>
</div>
<div class="clear"></div>
</div>
View
4 templates/options.php
@@ -4,12 +4,12 @@
*/
?>
<div class="wrap">
- <h2><?php _e( 'Fork Options', 'fork' ); ?></h2>
+ <h2><?php _e( 'Fork Options', 'post-forking' ); ?></h2>
<form method="post" action="options.php">
<?php settings_fields( 'fork' ); ?>
<table class="form-table">
<tr valign="top">
- <th scope="row"><?php _e( 'Post Types', 'fork' ); ?></th>
+ <th scope="row"><?php _e( 'Post Types', 'post-forking' ); ?></th>
<td><ul>
<?php foreach ( $this->get_potential_post_types() as $post_type ) { ?>
<li><label><input type="checkbox" name="fork[post_types][<?php echo esc_attr( $post_type->name ); ?>]" <?php checked( post_type_supports( $post_type->name, $this->post_type_support ) ); ?>> <?php echo esc_html( $post_type->labels->name ); ?></label></li>
View
4 templates/post-meta-box.php
@@ -1,5 +1,5 @@
<?php if ( $fork = $this->user_has_fork( $post->ID ) ) { ?>
- <a href="<?php echo admin_url( "post.php?post=$fork&action=edit" ); ?>"><?php _e( 'View Fork', 'fork' ); ?></a>
+ <a href="<?php echo admin_url( "post.php?post=$fork&action=edit" ); ?>"><?php _e( 'View Fork', 'post-forking' ); ?></a>
<?php } else { ?>
- <a href="<?php echo admin_url( "?fork={$post->ID}" ); ?>" class="button button-primary"><?php _e( 'Fork', 'fork' ); ?></a>
+ <a href="<?php echo admin_url( "?fork={$post->ID}" ); ?>" class="button button-primary"><?php _e( 'Fork', 'post-forking' ); ?></a>
<?php }

0 comments on commit fd7ab10

Please sign in to comment.