Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

ci: add automatic POT updates to dev branch #123

Merged

Conversation

greatislander
Copy link
Contributor

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:

  • On the base repository (not on forks)
  • On the dev branch
  • When either .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.

@codecov
Copy link

codecov bot commented Apr 16, 2021

Codecov Report

Merging #123 (a454176) into dev (0aa76d3) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##                dev     #123   +/-   ##
=========================================
  Coverage     79.07%   79.07%           
  Complexity      327      327           
=========================================
  Files             9        9           
  Lines          1171     1171           
=========================================
  Hits            926      926           
  Misses          245      245           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0aa76d3...a454176. Read the comment docs.

Copy link
Contributor

@ho-man-chan ho-man-chan left a comment

Choose a reason for hiding this comment

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

LGTM

@ho-man-chan ho-man-chan merged commit dcadea4 into pressbooks:dev Apr 22, 2021
@greatislander greatislander deleted the fix-auto-commit-localization branch April 22, 2021 13:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants