Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Syntax error in amp-translations.php can block deployments #1416
<?php /* THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. */ $generated_i18n_strings = array( /* translators: Copyright (C) 2018 WordPress.com VIP, XWP, Google, and contributors This file is distributed under the same license as the AMP plugin. */ , /* Plugin Name of the plugin */ __( 'AMP', 'amp' ),
This syntax error doesn't cause a problem for the purposes of translating on WordPress.org since the file isn't actually executed, but rather the gettext function calls are just extracted.
However, the presence of this syntax error causes problems when attempting to deploy a build of the plugin to a hosting environment where PHP syntax checking is part of a
You're right. I noted this syntax error in #1329 (comment) but didn't realize it could cause issues with deployments.
We might be able to work around this by using something like
Otherwise we could a) strip the comma after the file generation or b) fix the underlying problem in https://github.com/WordPress/gutenberg/blob/410f78a705a8aca2ca32a225383dc48cf47e0fe4/packages/i18n/tools/pot-to-php.js