-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically copy name to short_name in web app manifest if not greater than 12 characters #212
Conversation
@swissspidy @schlessera the test environment is failing to initialize all of a sudden. The error is cryptic. Any idea what's going on? |
$manifest = $this->get_manifest(); | ||
|
||
/* translators: %d is the max length as a number */ | ||
$description = sprintf( __( 'The <code>short_name</code> is a short version of your website’s name which is displayed when there is not enough space for the full name, for example with the site icon on a phone’s homescreen. It should be a maximum of %d characters long.', 'pwa' ), self::SHORT_NAME_MAX_LENGTH ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use a placeholder for short_name
. Also, the first sentence is very long. I'd split it up to make translators' lives easier.
/* translators: %d is the max length as a number */ | ||
$description = sprintf( __( 'The <code>short_name</code> is a short version of your website’s name which is displayed when there is not enough space for the full name, for example with the site icon on a phone’s homescreen. It should be a maximum of %d characters long.', 'pwa' ), self::SHORT_NAME_MAX_LENGTH ); | ||
|
||
$actions = __( 'You currently may use <code>web_app_manifest</code> filter to set the short name, for example in your theme’s <code>functions.php</code>.', 'pwa' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, I'd use placeholders for the filter and file name here.
The error message indicates that MySQL is not running. Looks like the PWA plugin runs on Travis CI's Xenial build environment, which replaced the Trusty environment late last year. According to the docs, "to speed up boot time and improve performance we’ve disabled all services, including the ones that are started by default on Trusty. Add any services that you want to start by default to your While that would explain the absence of the MySQL service, this would have been a problem already last winter, and not just pop up only now. But let's try to see if updating the config helps. |
Perfect! Setting to |
What 'name' is being copied to the short name? Where do I check to make certain mine is less than 12 characters? I am still receiving this error. |
The name is the Site Title (the |
Oh boy. ok... 12 characters or fewer... Roger that. thanks
…On Mon, Sep 9, 2019 at 3:24 PM Weston Ruter ***@***.***> wrote:
The name is the Site Title (the blogname).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#212>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHC4FRI3MYHYBAPYFTUQNCLQI2WG3ANCNFSM4IMNIHMA>
.
--
Daniel Bisett
Owner & CEO
Austintatious Design <https://austintatiousdesign.co/>
Connect with me on:
<https://www.facebook.com/austintude>
<https://www.linkedin.com/in/austintude> <https://twitter.com/austintude>
<https://www.youtube.com/channel/UCWOEzhwo7rUfg_Re8TRvArg>
|
Lighthouse complains if there is no
short_name
even when thename
is not greater than 12 characters:This PR fixes that problem by copying the
name
as theshort_name
when it is not longer than 12 characters:Site Health
Additionally, checks are added to site health.