Skip to content

Commit

Permalink
update text domains in new Walker
Browse files Browse the repository at this point in the history
  • Loading branch information
helgatheviking committed May 4, 2016
1 parent 344988b commit f9b14f6
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 31 deletions.
42 changes: 21 additions & 21 deletions inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
if ( ! empty( $item->_invalid ) ) {
$classes[] = 'menu-item-invalid';
/* translators: %s: title of menu item which is invalid */
$title = sprintf( __( '%s (Invalid)' ), $item->title );
$title = sprintf( __( '%s (Invalid)', 'nav-menu-roles' ), $item->title );
} elseif ( isset( $item->post_status ) && 'draft' == $item->post_status ) {
$classes[] = 'pending';
/* translators: %s: title of menu item in draft status */
$title = sprintf( __('%s (Pending)'), $item->title );
$title = sprintf( __('%s (Pending)', 'nav-menu-roles'), $item->title );
}

$title = ( ! isset( $item->label ) || '' == $item->label ) ? $title : $item->label;
Expand All @@ -112,7 +112,7 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
<li id="menu-item-<?php echo $item_id; ?>" class="<?php echo implode(' ', $classes ); ?>">
<div class="menu-item-bar">
<div class="menu-item-handle">
<span class="item-title"><span class="menu-item-title"><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item' ); ?></span></span>
<span class="item-title"><span class="menu-item-title"><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item', 'nav-menu-roles' ); ?></span></span>
<span class="item-controls">
<span class="item-type"><?php echo esc_html( $item->type_label ); ?></span>
<span class="item-order hide-if-js">
Expand All @@ -127,7 +127,7 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
),
'move-menu_item'
);
?>" class="item-move-up" aria-label="<?php esc_attr_e( 'Move up' ) ?>">&#8593;</a>
?>" class="item-move-up" aria-label="<?php esc_attr_e( 'Move up', 'nav-menu-roles' ) ?>">&#8593;</a>
|
<a href="<?php
echo wp_nonce_url(
Expand All @@ -140,11 +140,11 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
),
'move-menu_item'
);
?>" class="item-move-down" aria-label="<?php esc_attr_e( 'Move down' ) ?>">&#8595;</a>
?>" class="item-move-down" aria-label="<?php esc_attr_e( 'Move down', 'nav-menu-roles' ) ?>">&#8595;</a>
</span>
<a class="item-edit" id="edit-<?php echo $item_id; ?>" href="<?php
echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) );
?>" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><?php _e( 'Edit' ); ?></a>
?>" aria-label="<?php esc_attr_e( 'Edit menu item', 'nav-menu-roles' ); ?>"><?php _e( 'Edit', 'nav-menu-roles' ); ?></a>
</span>
</div>
</div>
Expand All @@ -153,46 +153,46 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
<?php if ( 'custom' == $item->type ) : ?>
<p class="field-url description description-wide">
<label for="edit-menu-item-url-<?php echo $item_id; ?>">
<?php _e( 'URL' ); ?><br />
<?php _e( 'URL', 'nav-menu-roles' ); ?><br />
<input type="text" id="edit-menu-item-url-<?php echo $item_id; ?>" class="widefat code edit-menu-item-url" name="menu-item-url[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->url ); ?>" />
</label>
</p>
<?php endif; ?>
<p class="description description-wide">
<label for="edit-menu-item-title-<?php echo $item_id; ?>">
<?php _e( 'Navigation Label' ); ?><br />
<?php _e( 'Navigation Label', 'nav-menu-roles' ); ?><br />
<input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->title ); ?>" />
</label>
</p>
<p class="field-title-attribute field-attr-title description description-wide">
<label for="edit-menu-item-attr-title-<?php echo $item_id; ?>">
<?php _e( 'Title Attribute' ); ?><br />
<?php _e( 'Title Attribute', 'nav-menu-roles' ); ?><br />
<input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt ); ?>" />
</label>
</p>
<p class="field-link-target description">
<label for="edit-menu-item-target-<?php echo $item_id; ?>">
<input type="checkbox" id="edit-menu-item-target-<?php echo $item_id; ?>" value="_blank" name="menu-item-target[<?php echo $item_id; ?>]"<?php checked( $item->target, '_blank' ); ?> />
<?php _e( 'Open link in a new tab' ); ?>
<?php _e( 'Open link in a new tab', 'nav-menu-roles' ); ?>
</label>
</p>
<p class="field-css-classes description description-thin">
<label for="edit-menu-item-classes-<?php echo $item_id; ?>">
<?php _e( 'CSS Classes (optional)' ); ?><br />
<?php _e( 'CSS Classes (optional)', 'nav-menu-roles' ); ?><br />
<input type="text" id="edit-menu-item-classes-<?php echo $item_id; ?>" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php echo $item_id; ?>]" value="<?php echo esc_attr( implode(' ', $item->classes ) ); ?>" />
</label>
</p>
<p class="field-xfn description description-thin">
<label for="edit-menu-item-xfn-<?php echo $item_id; ?>">
<?php _e( 'Link Relationship (XFN)' ); ?><br />
<?php _e( 'Link Relationship (XFN)', 'nav-menu-roles' ); ?><br />
<input type="text" id="edit-menu-item-xfn-<?php echo $item_id; ?>" class="widefat code edit-menu-item-xfn" name="menu-item-xfn[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->xfn ); ?>" />
</label>
</p>
<p class="field-description description description-wide">
<label for="edit-menu-item-description-<?php echo $item_id; ?>">
<?php _e( 'Description' ); ?><br />
<?php _e( 'Description', 'nav-menu-roles' ); ?><br />
<textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); // textarea_escaped ?></textarea>
<span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span>
<span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.', 'nav-menu-roles'); ?></span>
</label>
</p>

Expand All @@ -204,19 +204,19 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0

<p class="field-move hide-if-no-js description description-wide">
<label>
<span><?php _e( 'Move' ); ?></span>
<a href="#" class="menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></a>
<a href="#" class="menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></a>
<span><?php _e( 'Move', 'nav-menu-roles' ); ?></span>
<a href="#" class="menus-move menus-move-up" data-dir="up"><?php _e( 'Up one', 'nav-menu-roles' ); ?></a>
<a href="#" class="menus-move menus-move-down" data-dir="down"><?php _e( 'Down one', 'nav-menu-roles' ); ?></a>
<a href="#" class="menus-move menus-move-left" data-dir="left"></a>
<a href="#" class="menus-move menus-move-right" data-dir="right"></a>
<a href="#" class="menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' ); ?></a>
<a href="#" class="menus-move menus-move-top" data-dir="top"><?php _e( 'To the top', 'nav-menu-roles' ); ?></a>
</label>
</p>

<div class="menu-item-actions description-wide submitbox">
<?php if ( 'custom' != $item->type && $original_title !== false ) : ?>
<p class="link-to-original">
<?php printf( __('Original: %s'), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?>
<?php printf( __('Original: %s', 'nav-menu-roles'), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?>
</p>
<?php endif; ?>
<a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php
Expand All @@ -229,8 +229,8 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
admin_url( 'nav-menus.php' )
),
'delete-menu_item_' . $item_id
); ?>"><?php _e( 'Remove' ); ?></a> <span class="meta-sep hide-if-no-js"> | </span> <a class="item-cancel submitcancel hide-if-no-js" id="cancel-<?php echo $item_id; ?>" href="<?php echo esc_url( add_query_arg( array( 'edit-menu-item' => $item_id, 'cancel' => time() ), admin_url( 'nav-menus.php' ) ) );
?>#menu-item-settings-<?php echo $item_id; ?>"><?php _e('Cancel'); ?></a>
); ?>"><?php _e( 'Remove', 'nav-menu-roles' ); ?></a> <span class="meta-sep hide-if-no-js"> | </span> <a class="item-cancel submitcancel hide-if-no-js" id="cancel-<?php echo $item_id; ?>" href="<?php echo esc_url( add_query_arg( array( 'edit-menu-item' => $item_id, 'cancel' => time() ), admin_url( 'nav-menus.php' ) ) );
?>#menu-item-settings-<?php echo $item_id; ?>"><?php _e('Cancel', 'nav-menu-roles'); ?></a>
</div>

<input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" />
Expand Down
48 changes: 38 additions & 10 deletions languages/nav-menu-roles.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the GPL2.
msgid ""
msgstr ""
"Project-Id-Version: Nav Menu Roles 1.7.8\n"
"Project-Id-Version: Nav Menu Roles 1.8.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/nav-menu-roles\n"
"POT-Creation-Date: 2016-02-17 15:40:32+00:00\n"
"POT-Creation-Date: 2016-05-04 14:17:56+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -67,24 +67,29 @@ msgid "Choose a WXR (.xml) file to upload, then click Upload file and import."
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:95
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:98
#. translators: %s: title of menu item which is invalid
msgid "%s (Invalid)"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:99
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:102
#. translators: %s: title of menu item in draft status
msgid "%s (Pending)"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:112
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:115
msgid "sub item"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:127
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:130
msgid "Move up"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:140
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:143
msgid "Move down"
msgstr ""

Expand All @@ -94,67 +99,90 @@ msgid "Edit Menu Item"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:153
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:156
msgid "URL"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:160
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:163
msgid "Navigation Label"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:166
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:169
msgid "Title Attribute"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:173
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:176
msgid "Open link in a new tab"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:178
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:181
msgid "CSS Classes (optional)"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:184
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:187
msgid "Link Relationship (XFN)"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:190
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:193
msgid "Description"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:192
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:195
msgid ""
"The description will be displayed in the menu if the current theme supports "
"it."
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:204
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:207
msgid "Move"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:205
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:208
msgid "Up one"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:206
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:209
msgid "Down one"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:209
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:212
msgid "To the top"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:216
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:219
msgid "Original: %s"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:229
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:232
msgid "Remove"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles.php:230
#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:233
msgid "Cancel"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:147
msgid "Edit menu item"
msgstr ""

#: inc/class.Walker_Nav_Menu_Edit_Roles_4.5.php:147
msgid "Edit"
msgstr ""

#: nav-menu-roles.php:82 nav-menu-roles.php:91
msgid "Cheatin&#8217; huh?"
msgstr ""
Expand All @@ -163,37 +191,37 @@ msgstr ""
msgid "Nav Menu Roles"
msgstr ""

#: nav-menu-roles.php:168
#: nav-menu-roles.php:174
msgid ""
"Import %snav menu roles%s and other menu item meta skipped by the default "
"importer"
msgstr ""

#: nav-menu-roles.php:221
#: nav-menu-roles.php:227
msgid "FAQ"
msgstr ""

#: nav-menu-roles.php:222
#: nav-menu-roles.php:228
msgid "Donate"
msgstr ""

#: nav-menu-roles.php:291
#: nav-menu-roles.php:297
msgid "Display Mode"
msgstr ""

#: nav-menu-roles.php:299
#: nav-menu-roles.php:305
msgid "Logged In Users"
msgstr ""

#: nav-menu-roles.php:306
#: nav-menu-roles.php:312
msgid "Logged Out Users"
msgstr ""

#: nav-menu-roles.php:313
#: nav-menu-roles.php:319
msgid "Everyone"
msgstr ""

#: nav-menu-roles.php:320
#: nav-menu-roles.php:326
msgid "Restrict menu item to a minimum role"
msgstr ""

Expand Down

0 comments on commit f9b14f6

Please sign in to comment.