models icon indicating copy to clipboard operation
models copied to clipboard

Taxonomy menu name isn't using the "has_many" value.

Open stevedsross opened this issue 5 years ago • 3 comments

When registering a custom taxonomy, the text used in the menu simply adds an "s" to the end of the singular name. It should use the "has_many" value for this, like the post type.

  "labels": {
    "has_one": "Industry",
    "has_many": "Industries",
    "text_domain": "sage"
  },

The example yields "Industrys" as the menu name.

stevedsross avatar Jan 07 '20 14:01 stevedsross

Me too, any solution?

budimanfajarf avatar Feb 02 '21 10:02 budimanfajarf

@budimanfajarf @stevebrinston I will look into this!

If you happen to be using Intervention, I would recommend upgrading to 2.0.0-RC (which is due for an official release any day now) and register custom post types using that. It will likely be more heavily supported going forward.

darrenjacoby avatar Feb 02 '21 13:02 darrenjacoby

Not a fix, but a workaround. Overrides -> menu_name was missing from taxonomy-all.json. While it should be using the has_many label for the menu name like the custom post type, we can define the menu_name the same.

  "labels": {
    "has_one": "Industry",
    "has_many": "Industries",
    "text_domain": "sage",
    "overrides": {
      "menu_name": "Industries"
    }
  },

stevedsross avatar Mar 12 '21 04:03 stevedsross