Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try using translation function with registerBlockType #2332

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

AnthonyLedesma
Copy link
Member

Description

I am pretty sure this will fix the issue with the blocks list on WordPress.org. I based the fix based on the plugin details page for another popular plugin. I was not able to find any docs elsewhere to explain the requirements. Based on the aforementioned plugin details we know that three of the blocks are setup to display as expected.

What the three blocks have in common are strings processed by the translation function.

All other blocks of this plugin are setup to use strings that are not translated.

Alternatives considered

We are not able to use the __ function in the same manner and must instead use a combination with sprintf and a suffix of block in order to satisfy all lint conditions around the translation function. If this proposed solution does not work that implies that we must register the block using only string literals and not variables.

Acceptance criteria

We will need to test this which I think may require a release. We need to update the JS side.

Checklist:

  • My code is tested
  • My code follows accessibility standards
  • My code has proper inline documentation
  • I've included any necessary tests
  • I've included developer documentation
  • I've added proper labels to this pull request

@cypress
Copy link

cypress bot commented Mar 17, 2022



Test summary

404 0 2 0


Run details

Project CoBlocks
Status Passed
Commit 42a7d53
Started Mar 17, 2022 8:13 PM
Ended Mar 17, 2022 8:18 PM
Duration 04:35 💡
OS Linux Ubuntu - 20.04
Browser Multiple

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@olafleur-godaddy
Copy link
Member

Ok, let's try that!

@AnthonyLedesma AnthonyLedesma merged commit 4838a63 into master Mar 18, 2022
@AnthonyLedesma AnthonyLedesma deleted the try-fix-coblocks-block-list branch March 18, 2022 16:27
@AnthonyLedesma AnthonyLedesma added this to the 2.22.7 milestone Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants