Skip to content

Create Block: Add --textdomain in create-block README #69927

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

Merged
merged 2 commits into from
Apr 17, 2025

Conversation

Infinite-Null
Copy link
Contributor

What?

This PR updates the README.md to document the new --textdomain flag that was added to the create-block tool in the previous PR (#69802).

Why?

The previous PR added support for the --textdomain flag to the create-block tool, allowing users to specify a custom text domain for internationalization. This PR adds documentation to the README, ensuring users know how to use this new feature.

Copy link

github-actions bot commented Apr 17, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

With this argument, the `create-block` package will a generate a block with the provided text domain. If not specified, the block’s slug is used as the default text domain.

```bash
$ npx @wordpress/create-block@latest block-name --textdomain=my-custom-domain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ npx @wordpress/create-block@latest block-name --textdomain=my-custom-domain
$ npx @wordpress/create-block@latest --textdomain my-custom-domain

Can we align this command with the other commands?

@Infinite-Null Infinite-Null requested a review from t-hamano April 17, 2025 07:17
@Infinite-Null
Copy link
Contributor Author

Hi @t-hamano,
I have updated the PR with the changes, please review it at your convenience.

@t-hamano t-hamano added the [Type] Developer Documentation Documentation for developers label Apr 17, 2025
@t-hamano t-hamano merged commit 9529ca2 into WordPress:trunk Apr 17, 2025
62 of 63 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.8 milestone Apr 17, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
)

* Add `--textdomain` option for internationalization in create-block README

* Update README in `create-block` command

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants