From e34ba2e43866d8ec93c7fb2a332229d9d8ef4dab Mon Sep 17 00:00:00 2001 From: Derrick Koo Date: Tue, 11 Jan 2022 16:45:45 -0700 Subject: [PATCH 1/3] fix(wp5.9): taxonomy panel filter no longer includes taxonomy data in filtered props --- src/editor/taxonomy-panel/index.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/editor/taxonomy-panel/index.js b/src/editor/taxonomy-panel/index.js index 84bcdfa..aa737f5 100644 --- a/src/editor/taxonomy-panel/index.js +++ b/src/editor/taxonomy-panel/index.js @@ -20,8 +20,12 @@ 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. __( @@ -30,8 +34,8 @@ export const TaxonomyPanel = PostTaxonomies => { ), // Translators: "Select" terms if none added yet, or "Add" terms if there's at least one selected already. hierarchical ? __( 'Select ', 'newspack-sponsors' ) : __( 'Add ', 'newspack-sponsors' ), - labels.name.toLowerCase(), - labels.name.toLowerCase() + label, + label ); return ( From 509fb5618602991259d37c76d45739a0a3d55359 Mon Sep 17 00:00:00 2001 From: Derrick Koo Date: Tue, 11 Jan 2022 16:46:15 -0700 Subject: [PATCH 2/3] fix: add missing CHANGELOG.md file --- CHANGELOG.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 From 10b309e9e292278ecad4ae604addded82c89d92d Mon Sep 17 00:00:00 2001 From: Derrick Koo Date: Tue, 11 Jan 2022 16:58:13 -0700 Subject: [PATCH 3/3] chore: update outdated translators note --- src/editor/taxonomy-panel/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/taxonomy-panel/index.js b/src/editor/taxonomy-panel/index.js index aa737f5..0dce0aa 100644 --- a/src/editor/taxonomy-panel/index.js +++ b/src/editor/taxonomy-panel/index.js @@ -32,7 +32,7 @@ export const TaxonomyPanel = PostTaxonomies => { '%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' ), label, label