How can I translate block.json and theme.json entries?

[ad_1]

Plugin Author
Tim W

(@timwhitlock)

Hi. Yes, I added support for this in v2.6.7

I’ve received no feedback regarding the feature, so let me know if it works for you.

Thanks for getting back to me. It doesn’t appear to be working; I’ve updated the POT file and none of the block titles or descriptions from the block.json files are included.

Plugin Author
Tim W

(@timwhitlock)

My tests work, so I need to see an example that fails.

Can you post your block.json file please?

{
"version": "20240908",
"apiVersion": 3,
"name": "sht/guest-az",
"title": "Guest A-Z",
"category": "media",
"icon": "arrow-down-alt2",
"description": "Grouped accordion entries with a search function. Create new entries through the “Guest A-Z” screen.",
"keywords": [],
"textdomain": "shp-hotel-aare-mu",
"supports": {
"align": ["wide", "full"],
"html": false
},
"editorStyle": ["file:./assets/dist/styles/editor.min.css"],
"editorScript": "file:./assets/dist/scripts/editor.js",
"style": ["file:./assets/dist/styles/view.min.css"],
"attributes": {
"blockId": {
"type": "string",
"default": ""
},
"no_results": {
"type": "string",
"default": ""
},
"search_placeholder": {
"type": "string"
}
},
"render": "file:./render.php"
}

Plugin Author
Tim W

(@timwhitlock)

You will need to add the $schema key, e.g. https://schemas.wp.org/trunk/block.json

That’s got it. Thanks Tim.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer