Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ho-man-chan committed Apr 12, 2022
2 parents 0b72971 + 043e80b commit 768b3e3
Show file tree
Hide file tree
Showing 45 changed files with 307 additions and 381 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ 7.3, 7.4 ]
php: [ 7.4 ]
os: [ ubuntu-20.04 ]
wordpress: [ 5.9 ]
wordpress: [ 5.9.2, latest ]
experimental: [false]
include:
- php: 8.0
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:

- name: Upload Coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
if: matrix.experimental == false && matrix.php == 7.3
if: matrix.experimental == false

- name: Prepare Build
if: startsWith(github.ref, 'refs/tags/')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-pot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- 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\"}"
- name: Commit updated POT file
uses: stefanzweifel/git-auto-commit-action@v4.1.1
uses: stefanzweifel/git-auto-commit-action@v4.13.1
with:
commit_message: 'chore(l10n): update languages/pressbooks-book.pot'
file_pattern: '*.pot'
15 changes: 6 additions & 9 deletions .github/workflows/update-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
- name: Install Transifex Client
run: sudo pip install transifex-client
- name: Pull translations from Transifex
Expand All @@ -17,13 +19,8 @@ jobs:
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
- name: Commit updated translation files
uses: stefanzweifel/[email protected]
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
commit_message: 'chore(l10n): update translations'
file_pattern: '*.mo *.po'
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ This theme is named after Canadian media theorist Marshall McLuhan, who coined t

## Requirements

* PHP >= 7.3
* PHP >= 7.4
* WordPress >= 5.9
* Pressbooks >= 5.33.0
* Pressbooks >= 5.34.0

## Installation

Expand All @@ -41,7 +41,7 @@ Then, from the GitHub Updater interface, navigate to the "Install Theme" tab. En

## Changelog

### 2.17.0
### 2.18.0

* See: https://github.com/pressbooks/pressbooks-book/releases/tag/2.17.0
* See: https://github.com/pressbooks/pressbooks-book/releases/tag/2.18.0
* Full release history available at: https://github.com/pressbooks/pressbooks-book/releases
7 changes: 7 additions & 0 deletions assets/book/typography/styles/_NotoSansAdlamFont.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@
font-weight: normal;
src: url('uploads/assets/fonts/NotoSansAdlam-Regular.ttf') format('truetype');
}

@font-face {
font-family: 'Noto Sans Adlam';
font-style: normal;
font-weight: bold;
src: url('uploads/assets/fonts/NotoSansAdlam-Bold.ttf') format('truetype');
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@
font-weight: 400;
src: url('uploads/assets/fonts/NotoSansCanadianAboriginal-Regular.ttf') format('truetype');
}

@font-face {
font-family: 'Noto Sans Canadian Aboriginal';
font-style: normal;
font-weight: bold;
src: url('uploads/assets/fonts/NotoSansCanadianAboriginal-Bold.ttf') format('truetype');
}
15 changes: 15 additions & 0 deletions assets/book/typography/styles/_NotoSansCherokeeFont.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// 'Noto Sans Cherokee', @import 'NotoSansCherokeeFont'

@font-face {
font-family: 'Noto Sans Cherokee';
font-style: normal;
font-weight: normal;
src: url('uploads/assets/fonts/NotoSansCherokee-Regular.ttf') format('truetype');
}

@font-face {
font-family: 'Noto Sans Cherokee';
font-style: normal;
font-weight: bold;
src: url('uploads/assets/fonts/NotoSansCherokee-Bold.ttf') format('truetype');
}
16 changes: 16 additions & 0 deletions assets/book/typography/styles/_fonts-chr.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// NOTO CHEROKEE
// CHEROKEE FONT SANS

@import 'NotoSansCherokeeFont';

// Sans-serif stack name

$sans-serif-epub-chr: 'Noto Sans Cherokee';
$sans-serif-prince-chr: 'Noto Sans Cherokee';
$sans-serif-web-chr: 'Noto Sans Cherokee';

// Serif stack name

$serif-epub-chr: 'Noto Sans Cherokee';
$serif-prince-chr: 'Noto Sans Cherokee';
$serif-web-chr: 'Noto Sans Cherokee';
2 changes: 1 addition & 1 deletion dist/mix-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"/scripts/pane.js": "/scripts/pane.js?id=7e5b385cb135973c79f7",
"/scripts/collapse-sections.js": "/scripts/collapse-sections.js?id=b902d882dd21410b4387",
"/scripts/lightbox.js": "/scripts/lightbox.js?id=cb2b7b2a5fb303c3095d",
"/styles/book.css": "/styles/book.css?id=f94fcc9f50b9fb2df4eb",
"/styles/book.css": "/styles/book.css?id=bdf831ba0153d8f67af4",
"/styles/web-house-style.css": "/styles/web-house-style.css?id=f2ec506de7eae2e9ddc5",
"/scripts/sharer.js": "/scripts/sharer.js?id=6c4124dc20b7b1bdf887",
"/scripts/lity.js": "/scripts/lity.js?id=b91ed0405760d2e124c1",
Expand Down
2 changes: 1 addition & 1 deletion dist/styles/book.css

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
<header class="header" role="banner">
<div class="header__inside">
<div class="header__brand">
<?php
$root_id = get_network()->site_id;
switch_to_blog( $root_id );
?>
<a aria-label="<?php echo get_bloginfo( 'name', 'display' ); ?>" href="<?php echo network_home_url(); ?>">
<?php
$root_id = get_network()->site_id;
if ( has_custom_logo( $root_id ) ) {
?>
<?php
switch_to_blog( $root_id );
$custom_logo_id = get_theme_mod( 'custom_logo' );
printf(
'<img class="header__logo--img" src="%1$s" srcset="%2$s" alt="%3$s" />',
Expand All @@ -78,12 +78,15 @@
/* translators: %s: name of network */
sprintf( __( 'Logo for %s', 'pressbooks-book' ), get_bloginfo( 'name', 'display' ) )
);
restore_current_blog();
} else {
?>
<?php } else { ?>
<svg class="header__logo--svg" role="img">
<use href="#logo-pressbooks" />
</svg><?php } ?>
</svg>
<?php
}
restore_current_blog();
?>
</a>
</div>
<div class="header__nav">
Expand Down
Binary file modified languages/bg_BG.mo
Binary file not shown.
16 changes: 8 additions & 8 deletions languages/bg_BG.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: McLuhan 2.17.0\n"
"Project-Id-Version: McLuhan 2.18.0\n"
"Report-Msgid-Bugs-To: https://github.com/pressbooks/pressbooks-book/\n"
"POT-Creation-Date: 2022-02-22T21:43:24+00:00\n"
"POT-Creation-Date: 2022-04-12T14:24:19+00:00\n"
"PO-Revision-Date: 2017-06-22 17:45+0000\n"
"Last-Translator: Radost G <[email protected]>, 2020\n"
"Language-Team: Bulgarian (Bulgaria) (https://www.transifex.com/pressbooks/teams/9194/bg_BG/)\n"
Expand Down Expand Up @@ -128,28 +128,28 @@ msgstr "Преминете към съдържанието"
msgid "Logo for %s"
msgstr "Лого за %s"

#: header.php:90
#: header.php:93
msgid "Toggle Menu"
msgstr "Превключване на менюто"

#: header.php:92
#: header.php:95
msgid "Primary Navigation"
msgstr ""

#: header.php:102 partials/content-cover-toc.php:9
#: header.php:105 partials/content-cover-toc.php:9
msgid "Book Contents Navigation"
msgstr ""

#: header.php:105 index.php:14 partials/content-cover-toc.php:3
#: header.php:108 index.php:14 partials/content-cover-toc.php:3
msgid "Contents"
msgstr "Съдържание"

#. translators: %s: the title of the book
#: header.php:114
#: header.php:117
msgid "Go to the cover page of %s"
msgstr "Отидете на заглавната страница на %s"

#: header.php:118 inc/helpers/namespace.php:226
#: header.php:121 inc/helpers/namespace.php:226
msgid "Buy"
msgstr "Купи"

Expand Down
Binary file modified languages/de_DE.mo
Binary file not shown.
16 changes: 8 additions & 8 deletions languages/de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: McLuhan 2.17.0\n"
"Project-Id-Version: McLuhan 2.18.0\n"
"Report-Msgid-Bugs-To: https://github.com/pressbooks/pressbooks-book/\n"
"POT-Creation-Date: 2022-02-22T21:43:24+00:00\n"
"POT-Creation-Date: 2022-04-12T14:24:19+00:00\n"
"PO-Revision-Date: 2017-06-22 17:45+0000\n"
"Last-Translator: nebulon42, 2019\n"
"Language-Team: German (https://www.transifex.com/pressbooks/teams/9194/de/)\n"
Expand Down Expand Up @@ -129,28 +129,28 @@ msgstr "Zum Inhalt springen"
msgid "Logo for %s"
msgstr "Logo für %s"

#: header.php:90
#: header.php:93
msgid "Toggle Menu"
msgstr "Menü umschalten"

#: header.php:92
#: header.php:95
msgid "Primary Navigation"
msgstr ""

#: header.php:102 partials/content-cover-toc.php:9
#: header.php:105 partials/content-cover-toc.php:9
msgid "Book Contents Navigation"
msgstr ""

#: header.php:105 index.php:14 partials/content-cover-toc.php:3
#: header.php:108 index.php:14 partials/content-cover-toc.php:3
msgid "Contents"
msgstr "Inhalt"

#. translators: %s: the title of the book
#: header.php:114
#: header.php:117
msgid "Go to the cover page of %s"
msgstr "Zum Deckblatt von %s"

#: header.php:118 inc/helpers/namespace.php:226
#: header.php:121 inc/helpers/namespace.php:226
msgid "Buy"
msgstr "Kaufen"

Expand Down
Binary file modified languages/en_GB.mo
Binary file not shown.
16 changes: 8 additions & 8 deletions languages/en_GB.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: McLuhan 2.17.0\n"
"Project-Id-Version: McLuhan 2.18.0\n"
"Report-Msgid-Bugs-To: https://github.com/pressbooks/pressbooks-book/\n"
"POT-Creation-Date: 2022-02-22T21:43:24+00:00\n"
"POT-Creation-Date: 2022-04-12T14:24:19+00:00\n"
"PO-Revision-Date: 2017-06-22 17:45+0000\n"
"Last-Translator: Steel Wagstaff <[email protected]>, 2021\n"
"Language-Team: English (United Kingdom) (https://www.transifex.com/pressbooks/teams/9194/en_GB/)\n"
Expand Down Expand Up @@ -124,28 +124,28 @@ msgstr "Skip to content"
msgid "Logo for %s"
msgstr "Logo for %s"

#: header.php:90
#: header.php:93
msgid "Toggle Menu"
msgstr "Toggle Menu"

#: header.php:92
#: header.php:95
msgid "Primary Navigation"
msgstr ""

#: header.php:102 partials/content-cover-toc.php:9
#: header.php:105 partials/content-cover-toc.php:9
msgid "Book Contents Navigation"
msgstr ""

#: header.php:105 index.php:14 partials/content-cover-toc.php:3
#: header.php:108 index.php:14 partials/content-cover-toc.php:3
msgid "Contents"
msgstr "Contents"

#. translators: %s: the title of the book
#: header.php:114
#: header.php:117
msgid "Go to the cover page of %s"
msgstr "Go to the cover page of %s"

#: header.php:118 inc/helpers/namespace.php:226
#: header.php:121 inc/helpers/namespace.php:226
msgid "Buy"
msgstr "Buy"

Expand Down
Binary file modified languages/es_CR.mo
Binary file not shown.
16 changes: 8 additions & 8 deletions languages/es_CR.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: McLuhan 2.17.0\n"
"Project-Id-Version: McLuhan 2.18.0\n"
"Report-Msgid-Bugs-To: https://github.com/pressbooks/pressbooks-book/\n"
"POT-Creation-Date: 2022-02-22T21:43:24+00:00\n"
"POT-Creation-Date: 2022-04-12T14:24:19+00:00\n"
"PO-Revision-Date: 2017-06-22 17:45+0000\n"
"Last-Translator: Steel Wagstaff <[email protected]>, 2021\n"
"Language-Team: Spanish (Costa Rica) (https://www.transifex.com/pressbooks/teams/9194/es_CR/)\n"
Expand Down Expand Up @@ -126,28 +126,28 @@ msgstr "Omitir e ir al contenido"
msgid "Logo for %s"
msgstr "Logotipo para %s"

#: header.php:90
#: header.php:93
msgid "Toggle Menu"
msgstr "Alternar menú"

#: header.php:92
#: header.php:95
msgid "Primary Navigation"
msgstr ""

#: header.php:102 partials/content-cover-toc.php:9
#: header.php:105 partials/content-cover-toc.php:9
msgid "Book Contents Navigation"
msgstr ""

#: header.php:105 index.php:14 partials/content-cover-toc.php:3
#: header.php:108 index.php:14 partials/content-cover-toc.php:3
msgid "Contents"
msgstr "Contenido"

#. translators: %s: the title of the book
#: header.php:114
#: header.php:117
msgid "Go to the cover page of %s"
msgstr "Vaya a la portada de %s"

#: header.php:118 inc/helpers/namespace.php:226
#: header.php:121 inc/helpers/namespace.php:226
msgid "Buy"
msgstr "Comprar"

Expand Down
Binary file modified languages/es_ES.mo
Binary file not shown.
Loading

0 comments on commit 768b3e3

Please sign in to comment.