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

Build POT files for plugins and themes from project root #541

Merged
merged 4 commits into from
Nov 15, 2024

Conversation

Clorith
Copy link
Member

@Clorith Clorith commented Nov 15, 2024

Short introduction

This introduces a NPM, and subsequent Turbo command for running i18n:make-pot across all plugins and themes in a project, to allow individual translation files to be prepared quickly, efficiently, and hopefully reliably!

Description

This introduces a new i18n:make-pot command to the package.json, and composer.json files within the project, which Turbo can run to generate POT files, the base file used for translations.

It also modifies the existing composer run make-pot command to take the text domain and domain path (language folder) as a base to avoid the need for manually declaring paths, and allowing the commands to be copied easily between plugins and themes.

Steps to test / reproduce

  • npm run i18n:make-pot
  • Watch as packages/block-themelanguagesblock-theme.pot is generated
  • Validate that it contains the translatable strings.

@olethomas olethomas self-requested a review November 15, 2024 11:09
@Clorith Clorith merged commit 459742a into main Nov 15, 2024
4 checks passed
@Clorith Clorith deleted the feature/i18n/build-pot-files branch November 15, 2024 12:31
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