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

[Tracking Issue] Update plugin Readme files to include more detailed information #58

Open
5 of 21 tasks
ryanwelcher opened this issue Nov 13, 2023 · 0 comments
Open
5 of 21 tasks
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@ryanwelcher
Copy link
Collaborator

ryanwelcher commented Nov 13, 2023

What?

We need to update each plugin to explain the learning goal/objective, provide details on the code, and link to any relevant references as needed.

ReadMe Example to follow

Basic Block Translation 3df23d

The goal of this example is to showcase how to use translations in a block.

Folder Short description Tags ID () Download .zip Live Demo
📁 Basic Block with Translations STATIC RENDERING 3df23d 📦

Understanding the Example Code

Both the edit.js and save.js files import the __ function @wordpress/i18n to apply translations to the texts used in the code.

  • The __ function receives the text and a namespace as parameters
  • At index.php we tell WordPress our JavaScript contains translations, using the wp_set_script_translations() function.
  • At languages/ folder there are all the translations files (the source files and the .mo ones actually used to apply the translations)

Related resources


Note
Check the Start Guide for local development with the examples

@ryanwelcher ryanwelcher added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants