Browse Source

Standardize localization.

pull/41/head
Ned Zimmerman 7 years ago
parent
commit
2652847029
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 2
      composer.json
  2. 4
      footer.php
  3. 12
      functions.php
  4. 10
      header.php
  5. 8
      inc/activation/namespace.php
  6. 34
      inc/customizer/namespace.php
  7. 2
      inc/filters/namespace.php
  8. 16
      inc/helpers/namespace.php
  9. 2
      inc/intervention.php
  10. 186
      languages/aldine.pot
  11. 358
      languages/pressbooks-aldine.pot
  12. 2
      partials/book.php
  13. 12
      partials/contact-form.php
  14. 10
      partials/content-front-page.php
  15. 18
      partials/content-page-catalog.php
  16. 2
      style.css

2
composer.json

@ -34,7 +34,7 @@
"vendor/bin/phpcs --standard=phpcs.ruleset.xml inc partials *.php"
],
"localize": [
"wp-pot -o=languages/pressbooks-aldine.pot -d=pressbooks-aldine -t 'Pressbooks (Book Oven Inc.) <code@pressbooks.com>' -s '*.php'"
"wp-pot -o=languages/pressbooks-aldine.pot -d=pressbooks-aldine -t 'Pressbooks (Book Oven Inc.) <code@pressbooks.com>' -s '**/*.php'"
],
"readme": ["vendor/bin/wp2md -i readme.txt -o README.md"]
}

4
footer.php

@ -33,12 +33,12 @@ $pb_network_contact_form = get_option( 'pb_network_contact_form' );
<?php dynamic_sidebar( 'network-footer-block-2' ); ?>
<div class="social-media">
<?php if ( $network_facebook ) { ?>
<a class="link near-black hover-silver dib h2 w2 mr3" href="<?php echo $network_facebook; ?>" title="<?php printf( __( '%s on Facebook', 'aldine' ), get_bloginfo( 'name', 'display' ) ); ?>">
<a class="link near-black hover-silver dib h2 w2 mr3" href="<?php echo $network_facebook; ?>" title="<?php printf( __( '%s on Facebook', 'pressbooks-aldine' ), get_bloginfo( 'name', 'display' ) ); ?>">
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M15.117 0H.883C.395 0 0 .395 0 .883v14.234c0 .488.395.883.883.883h7.663V9.804H6.46V7.39h2.086V5.607c0-2.066 1.262-3.19 3.106-3.19.883 0 1.642.064 1.863.094v2.16h-1.28c-1 0-1.195.476-1.195 1.176v1.54h2.39l-.31 2.416h-2.08V16h4.077c.488 0 .883-.395.883-.883V.883C16 .395 15.605 0 15.117 0" fill-rule="nonzero"/></svg>
</a>
<?php } ?>
<?php if ( $network_twitter ) { ?>
<a class="link near-black hover-silver dib h2 w2 mr3" href="<?php echo $network_twitter; ?>" title="<?php printf( __( '%s on Twitter', 'aldine' ), get_bloginfo( 'name', 'display' ) ); ?>">
<a class="link near-black hover-silver dib h2 w2 mr3" href="<?php echo $network_twitter; ?>" title="<?php printf( __( '%s on Twitter', 'pressbooks-aldine' ), get_bloginfo( 'name', 'display' ) ); ?>">
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16 3.038c-.59.26-1.22.437-1.885.517.677-.407 1.198-1.05 1.443-1.816-.634.375-1.337.648-2.085.795-.598-.638-1.45-1.036-2.396-1.036-1.812 0-3.282 1.468-3.282 3.28 0 .258.03.51.085.75C5.152 5.39 2.733 4.084 1.114 2.1.83 2.583.67 3.147.67 3.75c0 1.14.58 2.143 1.46 2.732-.538-.017-1.045-.165-1.487-.41v.04c0 1.59 1.13 2.918 2.633 3.22-.276.074-.566.114-.865.114-.21 0-.416-.02-.617-.058.418 1.304 1.63 2.253 3.067 2.28-1.124.88-2.54 1.404-4.077 1.404-.265 0-.526-.015-.783-.045 1.453.93 3.178 1.474 5.032 1.474 6.038 0 9.34-5 9.34-9.338 0-.143-.004-.284-.01-.425.64-.463 1.198-1.04 1.638-1.7z" fill-rule="nonzero"/></svg>
</a>
<?php } ?>

12
functions.php

@ -15,8 +15,8 @@ if ( ! class_exists( 'PressbooksMix\\Assets' ) ) {
if ( ! file_exists( $composer ) ) {
wp_die( sprintf(
'<h1>%1$s</h1><p>%2$s</p>',
__( 'Dependencies Missing', 'aldine' ),
__( 'You must run <code>composer install</code> from the Aldine directory.', 'aldine' )
__( 'Dependencies Missing', 'pressbooks-aldine' ),
__( 'You must run <code>composer install</code> from the Aldine directory.', 'pressbooks-aldine' )
) );
}
require_once $composer;
@ -78,7 +78,7 @@ if ( ! function_exists( 'pressbooks_aldine_setup' ) ) :
// This theme uses wp_nav_menu() in one location.
register_nav_menus( [
'network-footer-menu' => __( 'Network Footer Menu', 'aldine' ),
'network-footer-menu' => __( 'Network Footer Menu', 'pressbooks-aldine' ),
] );
/*
@ -147,7 +147,7 @@ function pressbooks_aldine_widgets_init() {
'after_title' => '</h2>',
];
register_sidebar( [
'name' => __( 'Front Page Content', 'aldine' ),
'name' => __( 'Front Page Content', 'pressbooks-aldine' ),
'description' => __(
'Add content for your network&rsquo;s front page here. Currently, only text widgets are supported.',
'aldine'
@ -159,7 +159,7 @@ function pressbooks_aldine_widgets_init() {
'after_title' => '</h2>',
] );
register_sidebar( [
'name' => __( 'Network Footer Block 1', 'aldine' ),
'name' => __( 'Network Footer Block 1', 'pressbooks-aldine' ),
'description' => __(
'Add content for your network&rsquo;s customizeable footer here.
Currently, only text and image widgets are supported.
@ -169,7 +169,7 @@ function pressbooks_aldine_widgets_init() {
'id' => 'network-footer-block-1',
] + $config );
register_sidebar( [
'name' => __( 'Network Footer Block 2', 'aldine' ),
'name' => __( 'Network Footer Block 2', 'pressbooks-aldine' ),
'description' => __(
'Add content for your network&rsquo;s customizeable footer here.
Currently, only text and image widgets are supported.

10
header.php

@ -26,7 +26,7 @@
<header id="masthead" class="site-header" role="banner">
<div class="container">
<a class="toggle" href="#navigation"><?php _e( 'Toggle menu', 'aldine' ); ?><span class="toggle__icon"></span></a>
<a class="toggle" href="#navigation"><?php _e( 'Toggle menu', 'pressbooks-aldine' ); ?><span class="toggle__icon"></span></a>
<a class="banner__brand" href="<?php echo home_url( '/' ); ?>"><span class="clip"><?php echo get_bloginfo( 'name', 'display' ); ?></span></a>
<nav class="banner__navigation" id="navigation">
<?php if ( function_exists( 'pb_meets_minimum_requirements' ) && pb_meets_minimum_requirements() ) : ?>
@ -36,13 +36,13 @@
<a class="banner__navigation--contact" href="#contact">Contact</a>
<?php endif; ?>
<?php if ( ! is_user_logged_in() ) : ?>
<a class="banner__navigation--signin" href="<?php echo wp_login_url(); ?>"><?php _e( 'Sign in', 'aldine' ); ?></a>
<a class="banner__navigation--signin" href="<?php echo wp_login_url(); ?>"><?php _e( 'Sign in', 'pressbooks-aldine' ); ?></a>
<span class="banner__navigation--sep">/</span>
<a class="banner__navigation--signup" href="<?php echo network_home_url( '/wp-signup.php' ); ?>"><?php _e( 'Sign up', 'aldine' ); ?></a>
<a class="banner__navigation--signup" href="<?php echo network_home_url( '/wp-signup.php' ); ?>"><?php _e( 'Sign up', 'pressbooks-aldine' ); ?></a>
<?php else : ?>
<a class="banner__navigation--admin" href="<?php echo admin_url(); ?>"><?php _e( 'Admin', 'aldine' ); ?></a>
<a class="banner__navigation--admin" href="<?php echo admin_url(); ?>"><?php _e( 'Admin', 'pressbooks-aldine' ); ?></a>
<span class="banner__navigation--sep">/</span>
<a class="banner__navigation--signout" href="<?php echo wp_logout_url(); ?>"><?php _e( 'Sign out', 'aldine' ); ?></a>
<a class="banner__navigation--signout" href="<?php echo wp_logout_url(); ?>"><?php _e( 'Sign out', 'pressbooks-aldine' ); ?></a>
<?php endif; ?>
</nav>
<header class="banner__branding">

8
inc/activation/namespace.php

@ -16,19 +16,19 @@ function create_default_content() {
$default_pages = [
'about' => [
'post_title' => __( 'About', 'aldine' ),
'post_title' => __( 'About', 'pressbooks-aldine' ),
'post_content' => apply_filters( 'pb_root_about_page_content', $about ),
],
'help' => [
'post_title' => __( 'Help', 'aldine' ),
'post_title' => __( 'Help', 'pressbooks-aldine' ),
'post_content' => apply_filters( 'pb_root_help_page_content', $help ),
],
'catalog' => [
'post_title' => __( 'Catalog', 'aldine' ),
'post_title' => __( 'Catalog', 'pressbooks-aldine' ),
'post_content' => '',
],
'home' => [
'post_title' => __( 'Home', 'aldine' ),
'post_title' => __( 'Home', 'pressbooks-aldine' ),
'post_content' => '',
],
];

34
inc/customizer/namespace.php

@ -34,26 +34,26 @@ function customize_register( \WP_Customize_Manager $wp_customize ) {
[
'slug' => 'primary',
'hex' => '#b01109',
'label' => __( 'Primary Color', 'aldine' ),
'description' => __( 'Primary color, used for links and other primary elements.', 'aldine' ),
'label' => __( 'Primary Color', 'pressbooks-aldine' ),
'description' => __( 'Primary color, used for links and other primary elements.', 'pressbooks-aldine' ),
],
[
'slug' => 'accent',
'hex' => '#015d75',
'label' => __( 'Accent Color', 'aldine' ),
'description' => __( 'Accent color, used for flourishes and secondary elements.', 'aldine' ),
'label' => __( 'Accent Color', 'pressbooks-aldine' ),
'description' => __( 'Accent color, used for flourishes and secondary elements.', 'pressbooks-aldine' ),
],
[
'slug' => 'primary_fg',
'hex' => '#ffffff',
'label' => __( 'Primary Foreground Color', 'aldine' ),
'description' => __( 'Used for text on a primary background.', 'aldine' ),
'label' => __( 'Primary Foreground Color', 'pressbooks-aldine' ),
'description' => __( 'Used for text on a primary background.', 'pressbooks-aldine' ),
],
[
'slug' => 'accent_fg',
'hex' => '#ffffff',
'label' => __( 'Accent Foreground Color', 'aldine' ),
'description' => __( 'Used for text on an accent color background.', 'aldine' ),
'label' => __( 'Accent Foreground Color', 'pressbooks-aldine' ),
'description' => __( 'Used for text on an accent color background.', 'pressbooks-aldine' ),
],
] as $color ) {
$wp_customize->add_setting("pb_network_color_{$color['slug']}", [
@ -72,7 +72,7 @@ function customize_register( \WP_Customize_Manager $wp_customize ) {
));
}
$wp_customize->add_section('pb_network_social', [
'title' => __( 'Social Media', 'aldine' ),
'title' => __( 'Social Media', 'pressbooks-aldine' ),
'priority' => 30,
]);
$wp_customize->add_setting('pb_network_facebook', [
@ -80,7 +80,7 @@ function customize_register( \WP_Customize_Manager $wp_customize ) {
'sanitize_callback' => 'esc_url_raw',
]);
$wp_customize->add_control('pb_network_facebook', [
'label' => __( 'Facebook', 'aldine' ),
'label' => __( 'Facebook', 'pressbooks-aldine' ),
'section' => 'pb_network_social',
'settings' => 'pb_network_facebook',
]);
@ -89,21 +89,21 @@ function customize_register( \WP_Customize_Manager $wp_customize ) {
'sanitize_callback' => 'esc_url_raw',
]);
$wp_customize->add_control('pb_network_twitter', [
'label' => __( 'Twitter', 'aldine' ),
'label' => __( 'Twitter', 'pressbooks-aldine' ),
'section' => 'pb_network_social',
'settings' => 'pb_network_twitter',
]);
if ( function_exists( 'pb_meets_minimum_requirements' ) && pb_meets_minimum_requirements() ) {
$wp_customize->add_section('pb_front_page_catalog', [
'title' => __( 'Front Page Catalog', 'aldine' ),
'title' => __( 'Front Page Catalog', 'pressbooks-aldine' ),
'priority' => 25,
]);
$wp_customize->add_setting('pb_front_page_catalog', [
'type' => 'option',
]);
$wp_customize->add_control('pb_front_page_catalog', [
'label' => __( 'Show Front Page Catalog', 'aldine' ),
'label' => __( 'Show Front Page Catalog', 'pressbooks-aldine' ),
'section' => 'pb_front_page_catalog',
'settings' => 'pb_front_page_catalog',
'type' => 'checkbox',
@ -113,21 +113,21 @@ function customize_register( \WP_Customize_Manager $wp_customize ) {
'sanitize_callback' => 'sanitize_text_field',
]);
$wp_customize->add_control('pb_front_page_catalog_title', [
'label' => __( 'Front Page Catalog Title', 'aldine' ),
'label' => __( 'Front Page Catalog Title', 'pressbooks-aldine' ),
'section' => 'pb_front_page_catalog',
'settings' => 'pb_front_page_catalog_title',
]);
}
$wp_customize->add_section('pb_network_contact_form', [
'title' => __( 'Contact Form', 'aldine' ),
'title' => __( 'Contact Form', 'pressbooks-aldine' ),
'priority' => 25,
]);
$wp_customize->add_setting('pb_network_contact_form', [
'type' => 'option',
]);
$wp_customize->add_control('pb_network_contact_form', [
'label' => __( 'Show Contact Form', 'aldine' ),
'label' => __( 'Show Contact Form', 'pressbooks-aldine' ),
'section' => 'pb_network_contact_form',
'settings' => 'pb_network_contact_form',
'type' => 'checkbox',
@ -137,7 +137,7 @@ function customize_register( \WP_Customize_Manager $wp_customize ) {
'sanitize_callback' => 'sanitize_text_field',
]);
$wp_customize->add_control('pb_network_contact_form_title', [
'label' => __( 'Contact Form Title', 'aldine' ),
'label' => __( 'Contact Form Title', 'pressbooks-aldine' ),
'section' => 'pb_network_contact_form',
'settings' => 'pb_network_contact_form_title',
]);

2
inc/filters/namespace.php

@ -35,5 +35,5 @@ function body_classes( array $classes ) {
* Customize excerpt.
*/
function excerpt_more() {
return ' &hellip; <a href="' . get_permalink() . '">' . __( 'Continued', 'aldine' ) . '</a>';
return ' &hellip; <a href="' . get_permalink() . '">' . __( 'Continued', 'pressbooks-aldine' ) . '</a>';
}

16
inc/helpers/namespace.php

@ -100,29 +100,29 @@ function handle_contact_form_submission() {
'message' => esc_textarea( $message ),
];
if ( empty( $name ) ) {
$output['message'] = __( 'Name is required.', 'aldine' );
$output['message'] = __( 'Name is required.', 'pressbooks-aldine' );
$output['status'] = 'error';
$output['field'] = 'visitor_name';
} elseif ( empty( $email ) ) {
$output['message'] = __( 'Email is required.', 'aldine' );
$output['message'] = __( 'Email is required.', 'pressbooks-aldine' );
$output['status'] = 'error';
$output['field'] = 'visitor_email';
} elseif ( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
$output['message'] = __( 'Email is invalid.', 'aldine' );
$output['message'] = __( 'Email is invalid.', 'pressbooks-aldine' );
$output['status'] = 'error';
$output['field'] = 'visitor_email';
} elseif ( empty( $institution ) ) {
$output['message'] = __( 'Institution is required.', 'aldine' );
$output['message'] = __( 'Institution is required.', 'pressbooks-aldine' );
$output['status'] = 'error';
$output['field'] = 'visitor_institution';
} elseif ( empty( $message ) ) {
$output['message'] = __( 'Message is required.', 'aldine' );
$output['message'] = __( 'Message is required.', 'pressbooks-aldine' );
$output['status'] = 'error';
$output['field'] = 'message';
} else {
$sent = wp_mail(
get_option( 'admin_email' ),
sprintf( __( 'Contact Form Submission from %s', 'aldine' ), $name ),
sprintf( __( 'Contact Form Submission from %s', 'pressbooks-aldine' ), $name ),
sprintf(
"From: %1\$s <%2\$s>\nInstitution: %3\$s\n\n%4\$s",
stripslashes( $name ),
@ -133,10 +133,10 @@ function handle_contact_form_submission() {
"From: ${email}\r\nReply-To: ${email}\r\n"
);
if ( $sent ) {
$output['message'] = __( 'Your message was sent!', 'aldine' );
$output['message'] = __( 'Your message was sent!', 'pressbooks-aldine' );
$output['status'] = 'success';
} else {
$output['message'] = __( 'Your message could not be sent.', 'aldine' );
$output['message'] = __( 'Your message could not be sent.', 'pressbooks-aldine' );
$output['status'] = 'error';
}
}

2
inc/intervention.php

@ -9,7 +9,7 @@ use function \Sober\Intervention\intervention;
intervention( 'remove-customizer-items', 'static-front-page', 'all' );
intervention( 'remove-emoji' );
intervention( 'remove-howdy', __( 'Hello,', 'aldine' ) );
intervention( 'remove-howdy', __( 'Hello,', 'pressbooks-aldine' ) );
intervention( 'remove-dashboard-items', [ 'activity', 'quick-draft' ] );
intervention( 'remove-menu-items', [
'posts',

186
languages/aldine.pot

@ -1,186 +0,0 @@
# Copyright (C) 2017 Automattic
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: _s 1.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"
"POT-Creation-Date: 2016-12-23 16:00+0100\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
"Last-Translator:\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"X-Generator: grunt-wp-i18n 0.5.4\n"
#: 404.php:17
msgid "Oops! That page can&rsquo;t be found."
msgstr ""
#: 404.php:21
msgid ""
"It looks like nothing was found at this location. Maybe try one of the "
"links below or a search?"
msgstr ""
#: 404.php:30
msgid "Most Used Categories"
msgstr ""
#: 404.php:47
#. translators: %1$s: smiley
msgid "Try looking in the monthly archives. %1$s"
msgstr ""
#: comments.php:34
#. translators: 1: title.
msgid "One thought on &ldquo;%1$s&rdquo;"
msgstr ""
#: comments.php:67
msgid "Comments are closed."
msgstr ""
#: footer.php:18
msgid "https://wordpress.org/"
msgstr ""
#: footer.php:20
#. translators: %s: CMS name, i.e. WordPress.
msgid "Proudly powered by %s"
msgstr ""
#: footer.php:25
#. translators: 1: Theme name, 2: Theme author.
msgid "Theme: %1$s by %2$s."
msgstr ""
#: functions.php:47
msgid "Primary"
msgstr ""
#: functions.php:105
msgid "Sidebar"
msgstr ""
#: functions.php:107
msgid "Add widgets here."
msgstr ""
#: header.php:24
msgid "Skip to content"
msgstr ""
#: header.php:45
msgid "Primary Menu"
msgstr ""
#: inc/template-tags.php:52
#. translators: used between list items, there is a space after the comma
msgid ", "
msgstr ""
#: inc/template-tags.php:55
#. translators: 1: list of categories.
msgid "Posted in %1$s"
msgstr ""
#: inc/template-tags.php:62
#. translators: 1: list of tags.
msgid "Tagged %1$s"
msgstr ""
#: inc/template-tags.php:72
#. translators: %s: post title
msgid "Leave a Comment<span class=\"screen-reader-text\"> on %s</span>"
msgstr ""
#: inc/template-tags.php:89 template-parts/content-page.php:35
#. translators: %s: Name of current post. Only visible to screen readers
msgid "Edit <span class=\"screen-reader-text\">%s</span>"
msgstr ""
#: search.php:21
#. translators: %s: search query.
msgid "Search Results for: %s"
msgstr ""
#: template-parts/content-none.php:14
msgid "Nothing Found"
msgstr ""
#: template-parts/content-none.php:25
#. translators: 1: link to WP admin new post page.
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
msgstr ""
#: template-parts/content-none.php:38
msgid ""
"Sorry, but nothing matched your search terms. Please try again with some "
"different keywords."
msgstr ""
#: template-parts/content-none.php:44
msgid ""
"It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps "
"searching can help."
msgstr ""
#: template-parts/content-page.php:22 template-parts/content.php:45
msgid "Pages:"
msgstr ""
#: template-parts/content.php:34
#. translators: %s: Name of current post. Only visible to screen readers
msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
msgstr ""
#. Theme Name of the plugin/theme
msgid "_s"
msgstr ""
#. Theme URI of the plugin/theme
msgid "https://underscores.me/"
msgstr ""
#. Description of the plugin/theme
msgid ""
"Hi. I'm a starter theme called <code>_s</code>, or <em>underscores</em>, if "
"you like. I'm a theme meant for hacking so don't use me as a <em>Parent "
"Theme</em>. Instead try turning me into the next, most awesome, WordPress "
"theme out there. That's what I'm here for."
msgstr ""
#. Author of the plugin/theme
msgid "Automattic"
msgstr ""
#. Author URI of the plugin/theme
msgid "https://automattic.com/"
msgstr ""
#: comments.php:40
#. translators: 1: comment count number, 2: title.
msgctxt "comments title"
msgid "%1$s thought on &ldquo;%2$s&rdquo;"
msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
msgstr[0] ""
msgstr[1] ""
#: inc/template-tags.php:29
#. translators: %s: post date.
msgctxt "post date"
msgid "Posted on %s"
msgstr ""
#: inc/template-tags.php:35
#. translators: %s: post author.
msgctxt "post author"
msgid "by %s"
msgstr ""
#: inc/template-tags.php:59
#. translators: used between list items, there is a space after the comma
msgctxt "list item separator"
msgid ", "
msgstr ""

358
languages/pressbooks-aldine.pot

@ -0,0 +1,358 @@
# Copyright (C) 2017 pressbooks-aldine
# This file is distributed under the same license as the pressbooks-aldine package.
msgid ""
msgstr ""
"Project-Id-Version: pressbooks-aldine\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: Pressbooks (Book Oven Inc.) <code@pressbooks.com>\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
"X-Poedit-SourceCharset: UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../404.php:17
msgid "Oops! That page can&rsquo;t be found."
msgstr ""
#: ../404.php:21
msgid "It looks like nothing was found at this location. Maybe try one of the links below or a search?"
msgstr ""
#: ../404.php:30
msgid "Most Used Categories"
msgstr ""
#: ../404.php:47
msgid "Try looking in the monthly archives. %1$s"
msgstr ""
#: ../comments.php:34
msgid "One thought on &ldquo;%1$s&rdquo;"
msgstr ""
#: ../comments.php:40
msgctxt "comments title"
msgid "%1$s thought on &ldquo;%2$s&rdquo;"
msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
msgstr[0] ""
msgstr[1] ""
#: ../comments.php:63
msgid "Comments are closed."
msgstr ""
#: ../footer.php:36
msgid "%s on Facebook"
msgstr ""
#: ../footer.php:41
msgid "%s on Twitter"
msgstr ""
#: ../functions.php:18
msgid "Dependencies Missing"
msgstr ""
#: ../functions.php:19
msgid "You must run <code>composer install</code> from the Aldine directory."
msgstr ""
#: ../functions.php:81
msgid "Network Footer Menu"
msgstr ""
#: ../functions.php:150
msgid "Front Page Content"
msgstr ""
#: ../functions.php:162
msgid "Network Footer Block 1"
msgstr ""
#: ../functions.php:172
msgid "Network Footer Block 2"
msgstr ""
#: ../header.php:25
msgid "Skip to content"
msgstr ""
#: ../header.php:29
msgid "Toggle menu"
msgstr ""
#: ../header.php:39
msgid "Sign in"
msgstr ""
#: ../header.php:41
msgid "Sign up"
msgstr ""
#: ../header.php:43
msgid "Admin"
msgstr ""
#: ../header.php:45
msgid "Sign out"
msgstr ""
#: ../inc/intervention.php:12
msgid "Hello,"
msgstr ""
#: ../inc/activation/namespace.php:19
msgid "About"
msgstr ""
#: ../inc/activation/namespace.php:23
msgid "Help"
msgstr ""
#: ../inc/activation/namespace.php:27, ../page-catalog.php:4
msgid "Catalog"
msgstr ""
#: ../inc/activation/namespace.php:31
msgid "Home"
msgstr ""
#: ../inc/customizer/namespace.php:37
msgid "Primary Color"
msgstr ""
#: ../inc/customizer/namespace.php:38
msgid "Primary color, used for links and other primary elements."
msgstr ""
#: ../inc/customizer/namespace.php:43
msgid "Accent Color"
msgstr ""
#: ../inc/customizer/namespace.php:44
msgid "Accent color, used for flourishes and secondary elements."
msgstr ""
#: ../inc/customizer/namespace.php:49
msgid "Primary Foreground Color"
msgstr ""
#: ../inc/customizer/namespace.php:50
msgid "Used for text on a primary background."
msgstr ""
#: ../inc/customizer/namespace.php:55
msgid "Accent Foreground Color"
msgstr ""
#: ../inc/customizer/namespace.php:56
msgid "Used for text on an accent color background."
msgstr ""
#: ../inc/customizer/namespace.php:75
msgid "Social Media"
msgstr ""
#: ../inc/customizer/namespace.php:83
msgid "Facebook"
msgstr ""
#: ../inc/customizer/namespace.php:92
msgid "Twitter"
msgstr ""
#: ../inc/customizer/namespace.php:99
msgid "Front Page Catalog"
msgstr ""
#: ../inc/customizer/namespace.php:106
msgid "Show Front Page Catalog"
msgstr ""
#: ../inc/customizer/namespace.php:116
msgid "Front Page Catalog Title"
msgstr ""
#: ../inc/customizer/namespace.php:123
msgid "Contact Form"
msgstr ""
#: ../inc/customizer/namespace.php:130
msgid "Show Contact Form"
msgstr ""
#: ../inc/customizer/namespace.php:140
msgid "Contact Form Title"
msgstr ""
#: ../inc/filters/namespace.php:38
msgid "Continued"
msgstr ""
#: ../inc/helpers/namespace.php:103
msgid "Name is required."
msgstr ""
#: ../inc/helpers/namespace.php:107
msgid "Email is required."
msgstr ""
#: ../inc/helpers/namespace.php:111
msgid "Email is invalid."
msgstr ""
#: ../inc/helpers/namespace.php:115
msgid "Institution is required."
msgstr ""
#: ../inc/helpers/namespace.php:119
msgid "Message is required."
msgstr ""
#: ../inc/helpers/namespace.php:125
msgid "Contact Form Submission from %s"
msgstr ""
#: ../inc/helpers/namespace.php:136
msgid "Your message was sent!"
msgstr ""
#: ../inc/helpers/namespace.php:139
msgid "Your message could not be sent."
msgstr ""
#: ../partials/book.php:19
msgid "About this book &rarr;"
msgstr ""
#: ../partials/contact-form.php:11
msgid "Contact Us"
msgstr ""
#: ../partials/contact-form.php:25
msgid "Your name (required)"
msgstr ""
#: ../partials/contact-form.php:25
msgid "Your name*"
msgstr ""
#: ../partials/contact-form.php:29
msgid "Your email address (required)"
msgstr ""
#: ../partials/contact-form.php:29
msgid "Your email*"
msgstr ""
#: ../partials/contact-form.php:33
msgid "Your institution (required)"
msgstr ""
#: ../partials/contact-form.php:33
msgid "Your institution*"
msgstr ""
#: ../partials/contact-form.php:37
msgid "Your message (required)"
msgstr ""
#: ../partials/contact-form.php:37
msgid "Your message here*"
msgstr ""
#: ../partials/contact-form.php:40
msgid "Send"
msgstr ""
#: ../partials/content-front-page.php:19
msgid "Our Latest Titles"
msgstr ""
#: ../partials/content-front-page.php:33
msgid "About Pressbooks"
msgstr ""
#: ../partials/content-front-page.php:34
msgid "Pressbooks is easy-to-use book writing software that lets you create a book in all the formats you need to publish."
msgstr ""
#: ../partials/content-front-page.php:35
msgid "Learn More"
msgstr ""
#: ../partials/content-front-page.php:56
msgid "View Complete Catalog"
msgstr ""
#: ../partials/content-none.php:14
msgid "Nothing Found"
msgstr ""
#: ../partials/content-none.php:25
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
msgstr ""
#: ../partials/content-none.php:38
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
msgstr ""
#: ../partials/content-none.php:44
msgid "It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help."
msgstr ""
#: ../partials/content-page-catalog.php:33
msgid "Search by titles or keyword"
msgstr ""
#: ../partials/content-page-catalog.php:36
msgid "Filter by"
msgstr ""
#: ../partials/content-page-catalog.php:52
msgid "Licenses"
msgstr ""
#: ../partials/content-page-catalog.php:61
msgid "Sort by"
msgstr ""
#: ../partials/content-page-catalog.php:63
msgid "Title"
msgstr ""
#: ../partials/content-page-catalog.php:64
msgid "Subject"
msgstr ""
#: ../partials/content-page-catalog.php:65
msgid "Latest"
msgstr ""
#: ../partials/content-page-catalog.php:76
msgid "Previous"
msgstr ""
#: ../partials/content-page-catalog.php:86
msgid "Next"
msgstr ""
#: ../partials/content-page.php:22, ../partials/content.php:45
msgid "Pages:"
msgstr ""
#: ../partials/content-page.php:35
msgid "Edit <span class=\"screen-reader-text\">%s</span>"
msgstr ""
#: ../partials/content.php:34
msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
msgstr ""
#: ../search.php:21
msgid "Search Results for: %s"
msgstr ""

2
partials/book.php

@ -16,6 +16,6 @@ $date = ( isset( $book['metadata']['datePublished'] ) ) ? str_replace( '-', '',
<a href="<?php echo $book['link']; ?>"><?php echo $book['metadata']['name']; ?></a>
</p>
<p class="book__read-more">
<a href="<?php echo $book['link']; ?>"><?php _e( 'About this book &rarr;', 'aldine' ); ?></a>
<a href="<?php echo $book['link']; ?>"><?php _e( 'About this book &rarr;', 'pressbooks-aldine' ); ?></a>
</p>
</div>

12
partials/contact-form.php

@ -8,7 +8,7 @@
<?php
$contact_form_title = get_option( 'pb_network_contact_form_title', __( 'Contact Us', 'aldine' ) );
$contact_form_title = get_option( 'pb_network_contact_form_title', __( 'Contact Us', 'pressbooks-aldine' ) );
$contact_form_response = \Aldine\Helpers\handle_contact_form_submission();
?>
@ -22,21 +22,21 @@ $contact_form_response = \Aldine\Helpers\handle_contact_form_submission();
<?php wp_nonce_field( 'pb_root_contact_form', 'pb_root_contact_form_nonce' ); ?>
<input type="hidden" name="submitted" value="1">
<p class="form__row<?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_name' ) : ?> form__row--error<?php endif; ?>">
<input type="text" aria-label="<?php _e( 'Your name (required)', 'aldine' ); ?>" placeholder="<?php _e( 'Your name*', 'aldine' ); ?>" name="visitor_name" value="<?php if ( $contact_form_response['status'] === 'error' ) :
<input type="text" aria-label="<?php _e( 'Your name (required)', 'pressbooks-aldine' ); ?>" placeholder="<?php _e( 'Your name*', 'pressbooks-aldine' ); ?>" name="visitor_name" value="<?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['visitor_name'];
endif; ?>" required></p>
<p class="form__row<?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_email' ) : ?> form__row--error<?php endif; ?>">
<input type="email" aria-label="<?php _e( 'Your email address (required)', 'aldine' ); ?>" placeholder="<?php _e( 'Your email*', 'aldine' ); ?>" name="visitor_email" value="<?php if ( $contact_form_response['status'] === 'error' ) :
<input type="email" aria-label="<?php _e( 'Your email address (required)', 'pressbooks-aldine' ); ?>" placeholder="<?php _e( 'Your email*', 'pressbooks-aldine' ); ?>" name="visitor_email" value="<?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['visitor_email'];
endif; ?>" required></p>
<p class="form__row<?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_institution' ) : ?> form__row--error<?php endif; ?>">
<input type="text" aria-label="<?php _e( 'Your institution (required)', 'aldine' ); ?>" placeholder="<?php _e( 'Your institution*', 'aldine' ); ?>" name="visitor_institution" value="<?php if ( $contact_form_response['status'] === 'error' ) :
<input type="text" aria-label="<?php _e( 'Your institution (required)', 'pressbooks-aldine' ); ?>" placeholder="<?php _e( 'Your institution*', 'pressbooks-aldine' ); ?>" name="visitor_institution" value="<?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['visitor_institution'];
endif; ?>" required></p>
<p class="form__row<?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'message' ) : ?> form__row--error<?php endif; ?>">
<textarea type="text" aria-label="<?php _e( 'Your message (required)', 'aldine' ); ?>" placeholder="<?php _e( 'Your message here*', 'aldine' ); ?>" name="message" required><?php if ( $contact_form_response['status'] === 'error' ) :
<textarea type="text" aria-label="<?php _e( 'Your message (required)', 'pressbooks-aldine' ); ?>" placeholder="<?php _e( 'Your message here*', 'pressbooks-aldine' ); ?>" name="message" required><?php if ( $contact_form_response['status'] === 'error' ) :
echo $contact_form_response['values']['message'];
endif; ?></textarea></p>
<p class="form__row"><input class="button button--small button--outline" type="submit" value="<?php _e( 'Send', 'aldine' ); ?>" /></p>
<p class="form__row"><input class="button button--small button--outline" type="submit" value="<?php _e( 'Send', 'pressbooks-aldine' ); ?>" /></p>
</form>
</section>

10
partials/content-front-page.php

@ -16,7 +16,7 @@ use function Aldine\Helpers\get_catalog_data;
$block_count = get_block_count();
$front_page_catalog = get_option( 'pb_front_page_catalog' );
$latest_books_title = get_option( 'pb_front_page_catalog_title', __( 'Our Latest Titles', 'aldine' ) );
$latest_books_title = get_option( 'pb_front_page_catalog_title', __( 'Our Latest Titles', 'pressbooks-aldine' ) );
$page = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1;
$catalog_data = get_catalog_data( $page, 3 );
$previous_page = ( $page > 1 ) ? $page - 1 : 0;
@ -30,9 +30,9 @@ $next_page = $page + 1;
else : ?>
<div class="block flex flex-column items-center justify-center p-0 w-100">
<div class="inside tc">
<h3 class="tc ttu"><?php _e( 'About Pressbooks', 'aldine' ) ?></h3>
<p><?php _e( 'Pressbooks is easy-to-use book writing software that lets you create a book in all the formats you need to publish.', 'aldine' ); ?></p>
<a class="button" href="<?php echo network_home_url( '/about/' ); ?>"><?php _e( 'Learn More', 'aldine' ) ?></a>
<h3 class="tc ttu"><?php _e( 'About Pressbooks', 'pressbooks-aldine' ) ?></h3>
<p><?php _e( 'Pressbooks is easy-to-use book writing software that lets you create a book in all the formats you need to publish.', 'pressbooks-aldine' ); ?></p>
<a class="button" href="<?php echo network_home_url( '/about/' ); ?>"><?php _e( 'Learn More', 'pressbooks-aldine' ) ?></a>
</div>
</div>
<?php endif; ?>
@ -53,7 +53,7 @@ else : ?>
<?php endif; ?>
</div>
<div class="catalog-link">
<a class="button button--outline button--wide" href="<?php echo network_home_url( '/catalog/' ); ?>"><?php _e( 'View Complete Catalog', 'aldine' ); ?></a>
<a class="button button--outline button--wide" href="<?php echo network_home_url( '/catalog/' ); ?>"><?php _e( 'View Complete Catalog', 'pressbooks-aldine' ); ?></a>
</div>
</div>
<?php endif; ?>

18
partials/content-page-catalog.php

@ -30,10 +30,10 @@ $subject_groups = ( function_exists( '\\Pressbooks\\Metadata\\get_thema_subjects
<section class="network-catalog">
<div class="controls">
<div class="search">
<h2><a href="#search"><?php _e( 'Search by titles or keyword', 'aldine' ); ?> <svg class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="#b01109" fill-rule="evenodd"/></svg></a></h2>
<h2><a href="#search"><?php _e( 'Search by titles or keyword', 'pressbooks-aldine' ); ?> <svg class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="#b01109" fill-rule="evenodd"/></svg></a></h2>
</div>
<div class="filters">
<a href="#filter"><?php _e( 'Filter by', 'aldine' ); ?> <svg class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="#b01109" fill-rule="evenodd"/></svg></a>
<a href="#filter"><?php _e( 'Filter by', 'pressbooks-aldine' ); ?> <svg class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="#b01109" fill-rule="evenodd"/></svg></a>
<div id="filter" class="filter-groups">
<?php foreach ( $subject_groups as $key => $val ) : ?>
<div class="<?php echo $key; ?> subjects" id="<?php echo $key; ?>">
@ -49,7 +49,7 @@ $subject_groups = ( function_exists( '\\Pressbooks\\Metadata\\get_thema_subjects
<?php endforeach; ?>
</div>
<div class="licenses" id="licenses">
<a href="#licenses"><?php _e( 'Licenses', 'aldine' ); ?><svg class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="#b01109" fill-rule="evenodd"/></svg></a>
<a href="#licenses"><?php _e( 'Licenses', 'pressbooks-aldine' ); ?><svg class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="#b01109" fill-rule="evenodd"/></svg></a>
<ul class="filter-list">
<?php foreach ( $licenses as $key => $value ) : ?>
<li><a data-filter="<?php echo $key; ?>"><?php echo $value; ?><span class="close">&times;</span></a></li>
@ -58,11 +58,11 @@ $subject_groups = ( function_exists( '\\Pressbooks\\Metadata\\get_thema_subjects
</div>
</div>
<div class="sort">
<a href="#sort"><?php _e( 'Sort by', 'aldine' ); ?> <svg class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="#b01109" fill-rule="evenodd"/></svg></a>
<a href="#sort"><?php _e( 'Sort by', 'pressbooks-aldine' ); ?> <svg class="arrow" width="13" height="8" viewBox="0 0 13 8" xmlns="http://www.w3.org/2000/svg"><path d="M6.255 8L0 0h12.51z" fill="#b01109" fill-rule="evenodd"/></svg></a>
<ul id="sort" class="sorts">
<li><a data-sort="title" href="<?php echo "/catalog/page/$current_page/?orderby=title"; ?>"><?php _e( 'Title', 'aldine' ); ?></a></li>
<li><a data-sort="subject" href="<?php echo "/catalog/page/$current_page/?orderby=subject"; ?>"><?php _e( 'Subject', 'aldine' ); ?></a></li>
<li><a data-sort="latest" href="<?php echo "/catalog/page/$current_page/?orderby=latest"; ?>"><?php _e( 'Latest', 'aldine' ); ?></a></li>
<li><a data-sort="title" href="<?php echo "/catalog/page/$current_page/?orderby=title"; ?>"><?php _e( 'Title', 'pressbooks-aldine' ); ?></a></li>
<li><a data-sort="subject" href="<?php echo "/catalog/page/$current_page/?orderby=subject"; ?>"><?php _e( 'Subject', 'pressbooks-aldine' ); ?></a></li>
<li><a data-sort="latest" href="<?php echo "/catalog/page/$current_page/?orderby=latest"; ?>"><?php _e( 'Latest', 'pressbooks-aldine' ); ?></a></li>
</ul>
</div>
</div>
@ -73,7 +73,7 @@ $subject_groups = ( function_exists( '\\Pressbooks\\Metadata\\get_thema_subjects
</div>
<?php if ( $catalog_data['pages'] > 1 ) : ?>
<nav class="catalog-navigation">
<?php if ( $previous_page ) : ?><a class="previous" data-page="<?php echo $previous_page; ?>" href="<?php echo network_home_url( "/catalog/page/$previous_page/" ); ?>"><?php _e( 'Previous', 'aldine' ); ?></a><?php endif; ?>
<?php if ( $previous_page ) : ?><a class="previous" data-page="<?php echo $previous_page; ?>" href="<?php echo network_home_url( "/catalog/page/$previous_page/" ); ?>"><?php _e( 'Previous', 'pressbooks-aldine' ); ?></a><?php endif; ?>
<div class="pages">
<?php for ( $i = 1; $i <= $catalog_data['pages']; $i++ ) :
if ( $i === $current_page ) : ?>
@ -83,7 +83,7 @@ $subject_groups = ( function_exists( '\\Pressbooks\\Metadata\\get_thema_subjects
<?php endif; ?>
<?php endfor; ?>
</div>
<?php if ( $next_page <= $catalog_data['pages'] ) : ?><a class="next" data-page="<?php echo $next_page; ?>" href="<?php echo network_home_url( "/catalog/page/$next_page/" ); ?>"><?php _e( 'Next', 'aldine' ); ?></a><?php endif; ?>
<?php if ( $next_page <= $catalog_data['pages'] ) : ?><a class="next" data-page="<?php echo $next_page; ?>" href="<?php echo network_home_url( "/catalog/page/$next_page/" ); ?>"><?php _e( 'Next', 'pressbooks-aldine' ); ?></a><?php endif; ?>
</nav>
<?php endif; ?>
</section>

2
style.css

@ -5,7 +5,7 @@ Description: Aldine is the root theme for Pressbooks.
Version: 1.0.0-alpha.6
Author: Pressbooks (Book Oven Inc.)
Author URI: https://pressbooks.org
Text Domain: aldine
Text Domain: pressbooks-aldine
GitHub Theme URI: pressbooks/pressbooks-aldine
Release Asset: true
License: GNU General Public License v2 or later

Loading…
Cancel
Save