diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/src/editor/taxonomy-panel/index.js b/src/editor/taxonomy-panel/index.js index 84bcdfa..0dce0aa 100644 --- a/src/editor/taxonomy-panel/index.js +++ b/src/editor/taxonomy-panel/index.js @@ -20,18 +20,22 @@ export const TaxonomyPanel = PostTaxonomies => { return ; } - const { slug, taxonomy } = props; - const { hierarchical, labels } = taxonomy; + const { slug } = props; + const hierarchical = 'category' === slug; + const label = + 'category' === slug + ? __( 'categories', 'newspack-sponsors' ) + : __( 'tags', 'newspack-sponsors' ); const message = sprintf( // Translators: explanation for applying sponsors to a taxonomy term. __( '%1$s one or more post %2$s to associate this sponsor with those %3$s.', 'newspack-sponsors' ), - // Translators: "Select" terms if none added yet, or "Add" terms if there's at least one selected already. + // Translators: "Select" terms if the taxonomy is hierarchical, or "Add" terms if not. hierarchical ? __( 'Select ', 'newspack-sponsors' ) : __( 'Add ', 'newspack-sponsors' ), - labels.name.toLowerCase(), - labels.name.toLowerCase() + label, + label ); return (