Make WordPress Core


Ignore:
Timestamp:
08/11/2021 09:06:31 AM (3 years ago)
Author:
gziolo
Message:

Blocks: Add support for variations in block.json` file

We integrated variations with block types and the corresponding REST API endpoint in #52688. It's a follow-up patch to add missing support to the block.json metadata file when using register_block_type.

Some fields for variations are translatable.Therefore, i18n schema was copied over from Gutenberg: https://github.com/WordPress/gutenberg/blob/trunk/packages/blocks/src/api/i18n-block.json. The accompanying implementation was adapted as translate_settings_using_i18n_schema.

Props: gwwar, swissspidy, schlessera, jorgefilipecosta.
Fixes #53238.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/data/languages/plugins/notice-pl_PL.po

    r49981 r51599  
    33"Project-Id-Version: \n"
    44"POT-Creation-Date: 2015-12-31 16:31+0100\n"
    5 "PO-Revision-Date: 2021-01-14 18:26+0100\n"
     5"PO-Revision-Date: 2021-07-15 13:36+0200\n"
    66"Language: pl_PL\n"
    77"MIME-Version: 1.0\n"
    88"Content-Type: text/plain; charset=UTF-8\n"
    99"Content-Transfer-Encoding: 8bit\n"
    10 "X-Generator: Poedit 2.4.2\n"
     10"X-Generator: Poedit 3.0\n"
    1111"X-Poedit-Basepath: .\n"
    1212"Plural-Forms: nplurals=2; plural=(n != 1);\n"
     
    4242msgid "Other"
    4343msgstr "Inny"
     44
     45msgctxt "block variation title"
     46msgid "Error"
     47msgstr "Błąd"
     48
     49msgctxt "block variation description"
     50msgid "Shows error."
     51msgstr "Wyświetla błąd."
     52
     53msgctxt "block variation keyword"
     54msgid "failure"
     55msgstr "niepowodzenie"
Note: See TracChangeset for help on using the changeset viewer.