Skip to content

Commit

Permalink
Merge pull request #1553 from GravityPDF/translations
Browse files Browse the repository at this point in the history
Update Translations for 6.11 and load earlier
  • Loading branch information
jakejackson1 authored Jul 15, 2024
2 parents 3c8278d + bc81f06 commit 0c0b010
Show file tree
Hide file tree
Showing 19 changed files with 2,374 additions and 2,494 deletions.
1 change: 1 addition & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ Gravity PDF can be run on most modern shared web hosting without any issues. It
* Bug: Self-heal the PDF signing secret key if it becomes invalid
* Bug: Self-heal the Global PDF Settings if it becomes invalid
* Bug: Prevent the page reloading when selecting a tooltip on PDF settings pages
* Bug: Register language files early so startup errors can be translated

= 6.10.2 =
* Bug: Hydrate Nested Forms with Gravity Wiz Populate Anything data
Expand Down
25 changes: 14 additions & 11 deletions pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ public function init() {
*/
public function plugins_loaded() {

/* Register language files early so startup errors can be translated */
load_plugin_textdomain( 'gravity-forms-pdf-extended', false, dirname( plugin_basename( __FILE__ ) ) . '/src/assets/languages/' );

/* Check minimum requirements are met */
$this->is_compatible_wordpress_version();
$this->check_gravity_forms();
Expand Down Expand Up @@ -220,7 +223,7 @@ public function check_php() {

/* Check PHP version is compatible */
if ( ! version_compare( phpversion(), $this->required_php_version, '>=' ) ) {
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag */
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag 3. HTML Anchor Open Tag 4. HTML Anchor Close Tag */
$this->notices[] = sprintf( esc_html__( 'You are running an %1$soutdated version of PHP%2$s. Contact your web hosting provider to update. %3$sGet more information%4$s.', 'gravity-forms-pdf-extended' ), '<a href="https://wordpress.org/support/update-php/">', '</a>', '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#you-are-running-an-outdated-version-of-php">', '</a>' );

return false;
Expand All @@ -240,8 +243,8 @@ public function check_mb_string() {

/* Check MB String is installed */
if ( ! extension_loaded( 'mbstring' ) ) {
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag */
$this->notices[] = sprintf( esc_html__( 'The PHP extension MB String could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-extension-mb-string-could-not-be-detected">', '</a>' );
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag 3. PHP Extension name */
$this->notices[] = sprintf( esc_html__( 'The PHP extension %3$s could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-extension-mb-string-could-not-be-detected">', '</a>', 'MB String' );

return false;
}
Expand Down Expand Up @@ -278,8 +281,8 @@ public function check_mb_string_regex() {
*/
public function check_ctype() {
if ( ! extension_loaded( 'ctype' ) ) {
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag */
$this->notices[] = sprintf( esc_html__( 'The PHP extension Ctype could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-extension-ctype-could-not-be-detected">', '</a>' );
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag 3. PHP Extension name */
$this->notices[] = sprintf( esc_html__( 'The PHP extension %3$s could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-extension-ctype-could-not-be-detected">', '</a>', 'Ctype' );

return false;
}
Expand All @@ -298,8 +301,8 @@ public function check_gd() {

/* Check GD Image Library is installed */
if ( ! extension_loaded( 'gd' ) ) {
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag */
$this->notices[] = sprintf( esc_html__( 'The PHP extension GD Image Library could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-extension-gd-image-library-could-not-be-detected">', '</a>' );
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag 3. PHP Extension name */
$this->notices[] = sprintf( esc_html__( 'The PHP extension %3$s could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-extension-gd-image-library-could-not-be-detected">', '</a>', 'GD Image Library' );

return false;
}
Expand All @@ -318,16 +321,16 @@ public function check_dom() {

/* Check DOM Class is installed */
if ( ! extension_loaded( 'dom' ) || ! class_exists( 'DOMDocument' ) ) {
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag */
$this->notices[] = sprintf( esc_html__( 'The PHP extension DOM could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-dom-extension-was-not-found">', '</a>' );
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag 3. PHP Extension name */
$this->notices[] = sprintf( esc_html__( 'The PHP extension %3$s could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-dom-extension-was-not-found">', '</a>', 'DOM' );

return false;
}

/* Check libxml is loaded */
if ( ! extension_loaded( 'libxml' ) ) {
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag */
$this->notices[] = sprintf( esc_html__( 'The PHP extension libxml could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-extension-libxml-could-not-be-detected">', '</a>' );
/* translators: 1. HTML Anchor Open Tag 2. HTML Anchor Close Tag 3. PHP Extension name */
$this->notices[] = sprintf( esc_html__( 'The PHP extension %3$s could not be detected. Contact your web hosting provider to fix. %1$sGet more information%2$s.', 'gravity-forms-pdf-extended' ), '<a href="https://docs.gravitypdf.com/v6/users/activation-errors#the-php-extension-libxml-could-not-be-detected">', '</a>', 'libxml' );

return false;
}
Expand Down
Binary file modified src/assets/languages/gravity-forms-pdf-extended-de_DE-formal.mo
Binary file not shown.
Loading

0 comments on commit 0c0b010

Please sign in to comment.