-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
1,150 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,18 +20,16 @@ jobs: | |
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 | ||
wp package install wp-cli/i18n-command:2.2.8 | ||
cd /home/runner/.wp-cli/packages/ | ||
composer config repositories.wp-cli '{"type": "composer","url": "https://wp-cli.org/package-index/","canonical": false}' | ||
cd ./ | ||
wp package install pressbooks/pb-cli:2.1.0 | ||
composer require jenssegers/blade:1.1.0 | ||
- name: Update POT file | ||
run: wp pb make-pot . languages/pressbooks-book.pot --require=vendor/autoload.php --domain=pressbooks-book --slug=pressbooks-book --package-name="McLuhan" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-book/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 | ||
- name: Commit updated POT file | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
name: pressbooks-book.pot | ||
path: languages/pressbooks-book.pot | ||
# - name: Commit updated POT file | ||
# uses: stefanzweifel/[email protected] | ||
# with: | ||
# commit_message: 'chore(l10n): update languages/pressbooks-book.pot' | ||
# file_pattern: '*.pot' | ||
commit_message: 'chore(l10n): update languages/pressbooks-book.pot' | ||
file_pattern: '*.pot' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Update translations from Transifex | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
update-translations: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Transifex Client | ||
run: sudo pip install transifex-client | ||
- name: Pull translations from Transifex | ||
run: tx pull --all --force --minimum-perc=25 | ||
env: | ||
TX_TOKEN: ${{ secrets.TX_TOKEN }} | ||
- name: Install xgettext | ||
run: sudo apt-get install -y gettext | ||
- name: Generate MO files | ||
run: for file in languages/*.po ; do msgfmt $file -o `echo $file | sed 's/\(.*\.\)po/\1mo/'` ; done | ||
# Remove the next four lines and uncomment the last six lines once the process has been confirmed to work as desired. | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: pressbooks-book-languages | ||
path: languages/ | ||
# - name: Commit updated translation files | ||
# uses: stefanzweifel/[email protected] | ||
# with: | ||
# commit_message: 'chore(l10n): update translations' | ||
# file_pattern: *.mo *.po |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.