Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ class FlatTermSelector extends Component {
const termNames = availableTerms.map( ( term ) => term.name );
const newTermLabel = get(
taxonomy,
[ 'data', 'labels', 'add_new_item' ],
[ 'labels', 'add_new_item' ],
slug === 'post_tag' ? __( 'Add New Tag' ) : __( 'Add New Term' )
);
const singularName = get(
taxonomy,
[ 'data', 'labels', 'singular_name' ],
[ 'labels', 'singular_name' ],
slug === 'post_tag' ? __( 'Tag' ) : __( 'Term' )
);
const termAddedLabel = sprintf( _x( '%s added', 'term' ), singularName );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class HierarchicalTermSelector extends Component {
const { availableTermsTree, availableTerms, filteredTermsTree, formName, formParent, loading, showForm, filterValue } = this.state;
const labelWithFallback = ( labelProperty, fallbackIsCategory, fallbackIsNotCategory ) => get(
taxonomy,
[ 'data', 'labels', labelProperty ],
[ 'labels', labelProperty ],
slug === 'category' ? fallbackIsCategory : fallbackIsNotCategory
);
const newTermButtonLabel = labelWithFallback(
Expand Down