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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/update-pot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Update POT file

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

jobs:
update-pot:
runs-on: ubuntu-latest
if: github.repository == "pressbooks/pressbooks-lti-provider" # Don't run on forks.
steps:
- uses: actions/checkout@v2
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
tools: composer, wp-cli
- name: Install dependencies
run: |
wp package install wp-cli/i18n-command:2.2.6
wp package install pressbooks/pb-cli:dev-dev#800cec8
composer require jenssegers/blade:1.1.0
- name: Update POT file
run: wp pb make-pot . languages/pressbooks-lti-provider.pot --require=vendor/autoload.php --domain=pressbooks-lti-provider --slug=pressbooks-lti-provider --package-name="Pressbooks LTI Provider" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-lti-provider/issues\"}"
# Remove the next four lines and uncomment the last five lines once the process has been confirmed to work as desired.
- uses: actions/upload-artifact@v2
with:
name: pressbooks-lti-provider.pot
path: languages/pressbooks-lti-provider.pot
# - name: Commit updated POT file
# uses: stefanzweifel/git-auto-commit-action@v4.1.1
# with:
# commit_message: 'chore(l10n): update languages/pressbooks-lti-provider.pot'
# file_pattern: '*.pot'
27 changes: 24 additions & 3 deletions languages/pressbooks-lti-provider.pot
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (C) 2020 Pressbooks (Book Oven Inc.)
# This file is distributed under the same license as the Pressbooks LTI Provider plugin.
# Copyright (C) 2021 Pressbooks (Book Oven Inc.)
# This file is distributed under the GPLv3 or later.
msgid ""
msgstr ""
"Project-Id-Version: Pressbooks LTI Provider 1.3.5\n"
Expand All @@ -11,7 +11,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2020-11-17T23:50:59+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.3.0\n"
"X-Generator: WP-CLI 2.4.0\n"
"X-Domain: pressbooks-lti-provider\n"

#. Plugin Name of the plugin
Expand Down Expand Up @@ -179,6 +179,27 @@ msgstr ""
msgid "Please run <code>composer install</code> from the root of the Pressbooks LTI Provider plugin directory."
msgstr ""

#: composer.json
#: package.json
msgctxt "block description"
msgid "A plugin which turns Pressbooks into an LTI provider."
msgstr ""

#: composer.json
msgctxt "block keyword"
msgid "pressbooks"
msgstr ""

#: composer.json
msgctxt "block keyword"
msgid "lti"
msgstr ""

#: composer.json
msgctxt "block keyword"
msgid "lms"
msgstr ""

#: templates/book/settings.blade.php:5
#: templates/network/settings.blade.php:20
msgid "Pressbooks will try to match the LTI User with their email. If, however, a matching Pressbooks user is not found then:"
Expand Down
2 changes: 1 addition & 1 deletion templates/book/settings.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@
</table>
{!! get_submit_button() !!}
</form>
</div>
</div>
4 changes: 2 additions & 2 deletions templates/network/consumer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<td><input name="secret" id="secret" type="text" value="{{ $options['secret'] }}" class="regular-text" required @if ($options['ID'])readonly="readonly"@endif/></td>
</tr>
<tr>
<th>{{ __(' Enabled', 'pressbooks-cas-sso') }}</th>
<th>{{ __('Enabled', 'pressbooks-cas-sso') }}</th>
<td><label><input name="enabled" id="enabled" type="checkbox" value="1" {!! checked( $options['enabled'] ) !!}/></label></td>
</tr>
<tr>
Expand All @@ -37,4 +37,4 @@
</table>
{!! get_submit_button() !!}
</form>
</div>
</div>