Skip to content

Commit

Permalink
chore: add pot file & update-pot action
Browse files Browse the repository at this point in the history
  • Loading branch information
SteelWagstaff committed Feb 19, 2024
1 parent 8cfc6fe commit dcb8e3d
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/update-pot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update POT file

on:
push:
branches:
- dev
paths:
- '**.php'
- '**.js'
workflow_dispatch:

jobs:
update-pot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer, wp-cli/wp-cli-bundle
- name: Update POT file
run: wp i18n make-pot . languages/pressbooks-multi-institution.pot --domain=pressbooks --slug=pressbooks-multi-institution --package-name="Pressbooks Multi Institution" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-multi-institution/issues\"}"
- name: Create Pull Request for POT file
id: cprpot
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
labels: automerge-pot
commit-message: 'chore(l10n): update pot file'
title: 'chore(l10n): update pot file'
body: 'This pull request updates the POT file for this plugin.'
branch: chore/update-pot-file
- name: Merge pull request with updated POT file
if: ${{ steps.cprpot.outputs.pull-request-number }}
uses: "pascalgn/automerge-action@v0.16.2"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: automerge-pot
MERGE_METHOD: squash
PULL_REQUEST: "${{ steps.cprpot.outputs.pull-request-number }}"
36 changes: 36 additions & 0 deletions languages/pressbooks-multi-institution.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (C) 2024 Pressbooks (Book Oven Inc.)
# This file is distributed under the GPL v3 or later.
msgid ""
msgstr ""
"Project-Id-Version: Pressbooks Multi Institution 0.1.0\n"
"Report-Msgid-Bugs-To: https://github.com/pressbooks/pressbooks-multi-institution/issues\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-02-19T11:33:03-08:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.7.1\n"
"X-Domain: pressbooks\n"

#. Plugin Name of the plugin
msgid "Pressbooks Multi Institution"
msgstr ""

#. Plugin URI of the plugin
#. Author URI of the plugin
msgid "https://pressbooks.org"
msgstr ""

#. Description of the plugin
msgid "Tools for managing Pressbooks networks shared by multiple institutions"
msgstr ""

#. Author of the plugin
msgid "Pressbooks (Book Oven Inc.)"
msgstr ""

#: src/Views/InstitutionsTable.php:70
msgid "Are you sure you want to delete this?"
msgstr ""

0 comments on commit dcb8e3d

Please sign in to comment.