ci: add automatic POT updates to dev branch #51
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR uses the shivammathur/setup-php action to install WP-CLI, the WP-CLI i18n command, and Pressbooks CLI. It then runs the
wp pb make-pot
command to generate an updated.pot
file for the plugin.Notes
This action will only run:
.js
or.php
files have been modified (these are the only sources for localizable strings so the action can be skipped if neither file type has been modified)Currently, this action does not automatically commit the updated
.pot
file. Instead, it attaches it as a workflow artifact (see here for an example: https://github.com/greatislander/pressbooks-lti-provider/actions/runs/757127517). These artifacts can be compared to the existing.pot
file over the coming weeks, and once the dev team is satisfied with the consistency and accuracy of the results, these instructions can be followed to enable auto-commit and remove the workflow artifact upload step.