Changeset 3027320
- Timestamp:
- 01/26/2024 11:42:04 AM (2 years ago)
- Location:
- glotpress
- Files:
-
- 16 deleted
- 10 edited
- 1 copied
-
tags/4.0.0-beta.2 (copied) (copied from glotpress/trunk)
-
tags/4.0.0-beta.2/CHANGELOG.md (modified) (3 diffs)
-
tags/4.0.0-beta.2/assets/css/driver-js.css (deleted)
-
tags/4.0.0-beta.2/assets/css/driver-js.min.css (deleted)
-
tags/4.0.0-beta.2/assets/js/driver-js.js (deleted)
-
tags/4.0.0-beta.2/assets/js/driver-js.min.js (deleted)
-
tags/4.0.0-beta.2/assets/js/jquery.webui-popover.js (deleted)
-
tags/4.0.0-beta.2/assets/js/jquery.webui-popover.min.js (deleted)
-
tags/4.0.0-beta.2/assets/js/tour.js (deleted)
-
tags/4.0.0-beta.2/assets/js/tour.min.js (deleted)
-
tags/4.0.0-beta.2/glotpress.php (modified) (2 diffs)
-
tags/4.0.0-beta.2/gp-includes/assets-loader.php (modified) (2 diffs)
-
tags/4.0.0-beta.2/gp-templates/header.php (modified) (1 diff)
-
tags/4.0.0-beta.2/gp-templates/helper-functions.php (modified) (1 diff)
-
trunk/CHANGELOG.md (modified) (3 diffs)
-
trunk/assets/css/driver-js.css (deleted)
-
trunk/assets/css/driver-js.min.css (deleted)
-
trunk/assets/js/driver-js.js (deleted)
-
trunk/assets/js/driver-js.min.js (deleted)
-
trunk/assets/js/jquery.webui-popover.js (deleted)
-
trunk/assets/js/jquery.webui-popover.min.js (deleted)
-
trunk/assets/js/tour.js (deleted)
-
trunk/assets/js/tour.min.js (deleted)
-
trunk/glotpress.php (modified) (2 diffs)
-
trunk/gp-includes/assets-loader.php (modified) (2 diffs)
-
trunk/gp-templates/header.php (modified) (1 diff)
-
trunk/gp-templates/helper-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
glotpress/tags/4.0.0-beta.2/CHANGELOG.md
r3026779 r3027320 1 1 All notable changes to this project will be documented in this file. 2 2 This project adheres to [Semantic Versioning](http://semver.org/). 3 4 ## [4.0.0-beta.2] (January 26, 2024) 5 6 **Bugfixes** 7 8 * Solve some warnings with the glossary suffixes ([#1779]) 9 * Remove Tour code in favor of using the dedicated Tour plugin ([#1745]) 3 10 4 11 ## [4.0.0-beta.1] (January 25, 2024) … … 622 629 623 630 [Unreleased]: https://github.com/GlotPress/GlotPress/compare/3.0.0...HEAD 631 [4.0.0-beta.2]: https://github.com/GlotPress/GlotPress/compare/4.0.0-beta.1...4.0.0-beta.2 624 632 [4.0.0-beta.1]: https://github.com/GlotPress/GlotPress/compare/4.0.0-alpha.11...4.0.0-beta.1 625 633 [4.0.0-alpha.11]: https://github.com/GlotPress/GlotPress/compare/4.0.0-alpha.10...4.0.0-alpha.11 … … 783 791 [#1730]: https://github.com/GlotPress/GlotPress/pull/1730 784 792 [#1729]: https://github.com/GlotPress/GlotPress/pull/1729 785 793 [#1779]: https://github.com/GlotPress/GlotPress/pull/1779 794 [#1745]: https://github.com/GlotPress/GlotPress/pull/1745 -
glotpress/tags/4.0.0-beta.2/glotpress.php
r3026779 r3027320 4 4 * Plugin URI: https://wordpress.org/plugins/glotpress/ 5 5 * Description: GlotPress is a tool to help translators collaborate. 6 * Version: 4.0.0-beta. 16 * Version: 4.0.0-beta.2 7 7 * Requires at least: 4.6 8 * Tested up to: 5.98 * Tested up to: 6.4 9 9 * Requires PHP: 7.4 10 10 * Author: the GlotPress team … … 30 30 */ 31 31 32 define( 'GP_VERSION', '4.0.0-beta. 1' );32 define( 'GP_VERSION', '4.0.0-beta.2' ); 33 33 define( 'GP_DB_VERSION', '980' ); 34 34 define( 'GP_CACHE_VERSION', '3.0' ); -
glotpress/tags/4.0.0-beta.2/gp-includes/assets-loader.php
r2979634 r3027320 17 17 // Register our base style. 18 18 wp_register_style( 'gp-base', $url . '/style' . $suffix, array(), filemtime( $path . 'style' . $suffix ) ); 19 wp_register_style( 'gp-jquery-webui-popover', $url . '/jquery.webui-popover' . $suffix, array( 'gp-base' ), filemtime( $path . 'jquery.webui-popover' . $suffix ) );20 wp_register_style( 'driver-js', $url . '/driver-js' . $suffix, array(), filemtime( $path . 'driver-js' . $suffix ) );21 19 } 22 20 … … 38 36 wp_register_script( 'gp-translations-page', $url . '/translations-page' . $suffix, array( 'gp-editor' ), filemtime( $path . 'translations-page' . $suffix ) ); 39 37 wp_register_script( 'gp-mass-create-sets-page', $url . '/mass-create-sets-page' . $suffix, array( 'gp-editor' ), filemtime( $path . 'mass-create-sets-page' . $suffix ) ); 40 wp_register_script( 'gp-jquery-webui-popover', $url . '/jquery.webui-popover' . $suffix, array( 'jquery' ), filemtime( $path . 'jquery.webui-popover' . $suffix ), false );41 wp_register_script( 'driver-js', $url . '/driver-js' . $suffix, array(), filemtime( $path . 'driver-js' . $suffix ) );42 wp_register_script( 'gp-tour', $url . '/tour' . $suffix, array( 'jquery', 'gp-jquery-webui-popover', 'driver-js' ), filemtime( $path . 'tour' . $suffix ), false );43 44 38 wp_set_script_translations( 'gp-common', 'glotpress' ); 45 39 wp_set_script_translations( 'gp-editor', 'glotpress' ); 46 40 wp_set_script_translations( 'gp-glossary', 'glotpress' ); 47 41 wp_set_script_translations( 'gp-mass-create-sets-page', 'glotpress' ); 48 wp_set_script_translations( 'gp-tour', 'glotpress' );49 50 wp_localize_script( 'gp-tour', 'gp_tour', apply_filters( 'gp_tour', array() ) );51 42 } 52 43 -
glotpress/tags/4.0.0-beta.2/gp-templates/header.php
r2979634 r3027320 7 7 <?php 8 8 // Enqueue the base style so we don't have to load it manually on each page. 9 gp_enqueue_styles( array( 'gp-base', 'driver-js' ) ); 10 gp_enqueue_scripts( array( 'gp-tour', 'driver-js' ) ); 9 gp_enqueue_styles( array( 'gp-base' ) ); 11 10 12 11 gp_head(); -
glotpress/tags/4.0.0-beta.2/gp-templates/helper-functions.php
r3026779 r3027320 406 406 } 407 407 408 // Loop through rules. 409 foreach ( $suffixes[ $type ] as $rule ) { 410 411 // Loop through rule endings. 412 foreach ( $rule['endings'] as $ending_pattern => $new_ending ) { 413 414 // Check if noun ends with known suffix. 415 if ( preg_match( '/' . $rule['preceded'] . $ending_pattern . '\b/i', $term, $match ) ) { 416 417 // Set ending. 418 $old_ending = preg_replace( '/^' . $rule['preceded'] . '/', '', $match[0] ); 419 420 // Format endings using %s or %1$s placeholders to allow using the ending itself in the changing string. 421 // Eg.: '%1$s%1$s' to match 'Commi[t]' -> Commi[tt][ing] 422 $new_ending = sprintf( 423 $new_ending, 424 $old_ending 425 ); 426 427 $change_ending = $old_ending === $new_ending ? false : true; 428 429 // Build suffix with changes and additions. 430 $suffix = ( ! $change_ending ? '' : $new_ending ) . $rule['add']; 431 432 // Set key term. 433 $key = $change_ending ? substr( $term, 0, - strlen( $old_ending ) ) : $term; 434 435 // Check if key term is set. 436 if ( ! isset( $glossary_entries_suffixes[ $key ] ) ) { 437 // Add the key term with empty array. 438 $glossary_entries_suffixes[ $key ] = array(); 408 // Filter out suffixes with empty values. 409 $suffixes = array_filter( $suffixes, fn( $value ) => ! empty( $value ) ); 410 411 if ( ! empty( $suffixes[ $type ] ) ) { 412 // Loop through rules. 413 foreach ( $suffixes[ $type ] as $rule ) { 414 415 // Loop through rule endings. 416 foreach ( $rule['endings'] as $ending_pattern => $new_ending ) { 417 418 // Check if noun ends with known suffix. 419 if ( preg_match( '/' . $rule['preceded'] . $ending_pattern . '\b/i', $term, $match ) ) { 420 421 // Set ending. 422 $old_ending = preg_replace( '/^' . $rule['preceded'] . '/', '', $match[0] ); 423 424 // Format endings using %s or %1$s placeholders to allow using the ending itself in the changing string. 425 // Eg.: '%1$s%1$s' to match 'Commi[t]' -> Commi[tt][ing] 426 $new_ending = sprintf( 427 $new_ending, 428 $old_ending 429 ); 430 431 $change_ending = $old_ending === $new_ending ? false : true; 432 433 // Build suffix with changes and additions. 434 $suffix = ( ! $change_ending ? '' : $new_ending ) . $rule['add']; 435 436 // Set key term. 437 $key = $change_ending ? substr( $term, 0, -strlen( $old_ending ) ) : $term; 438 439 // Check if key term is set. 440 if ( ! isset( $glossary_entries_suffixes[ $key ] ) ) { 441 // Add the key term with empty array. 442 $glossary_entries_suffixes[ $key ] = array(); 443 } 444 445 // If the ending changes, also add the ending. 446 if ( $change_ending ) { 447 448 // Check if ending already exist in array of suffixes. 449 if ( ! in_array( $old_ending, $glossary_entries_suffixes[ $key ], true ) ) { 450 // Add the ending to the suffixes. 451 $glossary_entries_suffixes[ $key ][] = $old_ending; 452 } 453 } 454 455 // Check if suffix already exist in array of suffixes. 456 if ( ! in_array( $suffix, $glossary_entries_suffixes[ $key ], true ) ) { 457 // Add suffix. 458 $glossary_entries_suffixes[ $key ][] = $suffix; 459 } 460 461 break; 439 462 } 440 441 // If the ending changes, also add the ending.442 if ( $change_ending ) {443 444 // Check if ending already exist in array of suffixes.445 if ( ! in_array( $old_ending, $glossary_entries_suffixes[ $key ], true ) ) {446 // Add the ending to the suffixes.447 $glossary_entries_suffixes[ $key ][] = $old_ending;448 }449 }450 451 // Check if suffix already exist in array of suffixes.452 if ( ! in_array( $suffix, $glossary_entries_suffixes[ $key ], true ) ) {453 // Add suffix.454 $glossary_entries_suffixes[ $key ][] = $suffix;455 }456 457 break;458 463 } 459 464 } -
glotpress/trunk/CHANGELOG.md
r3026779 r3027320 1 1 All notable changes to this project will be documented in this file. 2 2 This project adheres to [Semantic Versioning](http://semver.org/). 3 4 ## [4.0.0-beta.2] (January 26, 2024) 5 6 **Bugfixes** 7 8 * Solve some warnings with the glossary suffixes ([#1779]) 9 * Remove Tour code in favor of using the dedicated Tour plugin ([#1745]) 3 10 4 11 ## [4.0.0-beta.1] (January 25, 2024) … … 622 629 623 630 [Unreleased]: https://github.com/GlotPress/GlotPress/compare/3.0.0...HEAD 631 [4.0.0-beta.2]: https://github.com/GlotPress/GlotPress/compare/4.0.0-beta.1...4.0.0-beta.2 624 632 [4.0.0-beta.1]: https://github.com/GlotPress/GlotPress/compare/4.0.0-alpha.11...4.0.0-beta.1 625 633 [4.0.0-alpha.11]: https://github.com/GlotPress/GlotPress/compare/4.0.0-alpha.10...4.0.0-alpha.11 … … 783 791 [#1730]: https://github.com/GlotPress/GlotPress/pull/1730 784 792 [#1729]: https://github.com/GlotPress/GlotPress/pull/1729 785 793 [#1779]: https://github.com/GlotPress/GlotPress/pull/1779 794 [#1745]: https://github.com/GlotPress/GlotPress/pull/1745 -
glotpress/trunk/glotpress.php
r3026779 r3027320 4 4 * Plugin URI: https://wordpress.org/plugins/glotpress/ 5 5 * Description: GlotPress is a tool to help translators collaborate. 6 * Version: 4.0.0-beta. 16 * Version: 4.0.0-beta.2 7 7 * Requires at least: 4.6 8 * Tested up to: 5.98 * Tested up to: 6.4 9 9 * Requires PHP: 7.4 10 10 * Author: the GlotPress team … … 30 30 */ 31 31 32 define( 'GP_VERSION', '4.0.0-beta. 1' );32 define( 'GP_VERSION', '4.0.0-beta.2' ); 33 33 define( 'GP_DB_VERSION', '980' ); 34 34 define( 'GP_CACHE_VERSION', '3.0' ); -
glotpress/trunk/gp-includes/assets-loader.php
r2979634 r3027320 17 17 // Register our base style. 18 18 wp_register_style( 'gp-base', $url . '/style' . $suffix, array(), filemtime( $path . 'style' . $suffix ) ); 19 wp_register_style( 'gp-jquery-webui-popover', $url . '/jquery.webui-popover' . $suffix, array( 'gp-base' ), filemtime( $path . 'jquery.webui-popover' . $suffix ) );20 wp_register_style( 'driver-js', $url . '/driver-js' . $suffix, array(), filemtime( $path . 'driver-js' . $suffix ) );21 19 } 22 20 … … 38 36 wp_register_script( 'gp-translations-page', $url . '/translations-page' . $suffix, array( 'gp-editor' ), filemtime( $path . 'translations-page' . $suffix ) ); 39 37 wp_register_script( 'gp-mass-create-sets-page', $url . '/mass-create-sets-page' . $suffix, array( 'gp-editor' ), filemtime( $path . 'mass-create-sets-page' . $suffix ) ); 40 wp_register_script( 'gp-jquery-webui-popover', $url . '/jquery.webui-popover' . $suffix, array( 'jquery' ), filemtime( $path . 'jquery.webui-popover' . $suffix ), false );41 wp_register_script( 'driver-js', $url . '/driver-js' . $suffix, array(), filemtime( $path . 'driver-js' . $suffix ) );42 wp_register_script( 'gp-tour', $url . '/tour' . $suffix, array( 'jquery', 'gp-jquery-webui-popover', 'driver-js' ), filemtime( $path . 'tour' . $suffix ), false );43 44 38 wp_set_script_translations( 'gp-common', 'glotpress' ); 45 39 wp_set_script_translations( 'gp-editor', 'glotpress' ); 46 40 wp_set_script_translations( 'gp-glossary', 'glotpress' ); 47 41 wp_set_script_translations( 'gp-mass-create-sets-page', 'glotpress' ); 48 wp_set_script_translations( 'gp-tour', 'glotpress' );49 50 wp_localize_script( 'gp-tour', 'gp_tour', apply_filters( 'gp_tour', array() ) );51 42 } 52 43 -
glotpress/trunk/gp-templates/header.php
r2979634 r3027320 7 7 <?php 8 8 // Enqueue the base style so we don't have to load it manually on each page. 9 gp_enqueue_styles( array( 'gp-base', 'driver-js' ) ); 10 gp_enqueue_scripts( array( 'gp-tour', 'driver-js' ) ); 9 gp_enqueue_styles( array( 'gp-base' ) ); 11 10 12 11 gp_head(); -
glotpress/trunk/gp-templates/helper-functions.php
r3026779 r3027320 406 406 } 407 407 408 // Loop through rules. 409 foreach ( $suffixes[ $type ] as $rule ) { 410 411 // Loop through rule endings. 412 foreach ( $rule['endings'] as $ending_pattern => $new_ending ) { 413 414 // Check if noun ends with known suffix. 415 if ( preg_match( '/' . $rule['preceded'] . $ending_pattern . '\b/i', $term, $match ) ) { 416 417 // Set ending. 418 $old_ending = preg_replace( '/^' . $rule['preceded'] . '/', '', $match[0] ); 419 420 // Format endings using %s or %1$s placeholders to allow using the ending itself in the changing string. 421 // Eg.: '%1$s%1$s' to match 'Commi[t]' -> Commi[tt][ing] 422 $new_ending = sprintf( 423 $new_ending, 424 $old_ending 425 ); 426 427 $change_ending = $old_ending === $new_ending ? false : true; 428 429 // Build suffix with changes and additions. 430 $suffix = ( ! $change_ending ? '' : $new_ending ) . $rule['add']; 431 432 // Set key term. 433 $key = $change_ending ? substr( $term, 0, - strlen( $old_ending ) ) : $term; 434 435 // Check if key term is set. 436 if ( ! isset( $glossary_entries_suffixes[ $key ] ) ) { 437 // Add the key term with empty array. 438 $glossary_entries_suffixes[ $key ] = array(); 408 // Filter out suffixes with empty values. 409 $suffixes = array_filter( $suffixes, fn( $value ) => ! empty( $value ) ); 410 411 if ( ! empty( $suffixes[ $type ] ) ) { 412 // Loop through rules. 413 foreach ( $suffixes[ $type ] as $rule ) { 414 415 // Loop through rule endings. 416 foreach ( $rule['endings'] as $ending_pattern => $new_ending ) { 417 418 // Check if noun ends with known suffix. 419 if ( preg_match( '/' . $rule['preceded'] . $ending_pattern . '\b/i', $term, $match ) ) { 420 421 // Set ending. 422 $old_ending = preg_replace( '/^' . $rule['preceded'] . '/', '', $match[0] ); 423 424 // Format endings using %s or %1$s placeholders to allow using the ending itself in the changing string. 425 // Eg.: '%1$s%1$s' to match 'Commi[t]' -> Commi[tt][ing] 426 $new_ending = sprintf( 427 $new_ending, 428 $old_ending 429 ); 430 431 $change_ending = $old_ending === $new_ending ? false : true; 432 433 // Build suffix with changes and additions. 434 $suffix = ( ! $change_ending ? '' : $new_ending ) . $rule['add']; 435 436 // Set key term. 437 $key = $change_ending ? substr( $term, 0, -strlen( $old_ending ) ) : $term; 438 439 // Check if key term is set. 440 if ( ! isset( $glossary_entries_suffixes[ $key ] ) ) { 441 // Add the key term with empty array. 442 $glossary_entries_suffixes[ $key ] = array(); 443 } 444 445 // If the ending changes, also add the ending. 446 if ( $change_ending ) { 447 448 // Check if ending already exist in array of suffixes. 449 if ( ! in_array( $old_ending, $glossary_entries_suffixes[ $key ], true ) ) { 450 // Add the ending to the suffixes. 451 $glossary_entries_suffixes[ $key ][] = $old_ending; 452 } 453 } 454 455 // Check if suffix already exist in array of suffixes. 456 if ( ! in_array( $suffix, $glossary_entries_suffixes[ $key ], true ) ) { 457 // Add suffix. 458 $glossary_entries_suffixes[ $key ][] = $suffix; 459 } 460 461 break; 439 462 } 440 441 // If the ending changes, also add the ending.442 if ( $change_ending ) {443 444 // Check if ending already exist in array of suffixes.445 if ( ! in_array( $old_ending, $glossary_entries_suffixes[ $key ], true ) ) {446 // Add the ending to the suffixes.447 $glossary_entries_suffixes[ $key ][] = $old_ending;448 }449 }450 451 // Check if suffix already exist in array of suffixes.452 if ( ! in_array( $suffix, $glossary_entries_suffixes[ $key ], true ) ) {453 // Add suffix.454 $glossary_entries_suffixes[ $key ][] = $suffix;455 }456 457 break;458 463 } 459 464 }
Note: See TracChangeset
for help on using the changeset viewer.