| @@ -124,9 +124,14 @@ | ||
| 124 | 124 | self::_renderTextAreaItem( |
| 125 | 125 | esc_html__( 'Chart Description', 'visualizer' ), |
| 126 | 126 | 'description', |
| 127 | 127 | $this->description, |
| 128 | - sprintf( esc_html__( 'Description to display in the structured data schema as explained %1$shere%2$s', 'visualizer' ), '<a href="https://developers.google.com/search/docs/data-types/dataset#dataset" target="_blank">', '</a>' ) | |
| 128 | + sprintf( | |
| 129 | + // translators: %1$s - HTML link tag, %2$s - HTML closing link tag. | |
| 130 | + esc_html__( 'Description to display in the structured data schema as explained %1$shere%2$s', 'visualizer' ), | |
| 131 | + '<a href="https://developers.google.com/search/docs/data-types/dataset#dataset" target="_blank">', | |
| 132 | + '</a>' | |
| 133 | + ) | |
| 129 | 134 | ); |
| 130 | 135 | } |
| 131 | 136 | |
| 132 | 137 | /** |
| @@ -133,9 +138,17 @@ | ||
| 133 | 138 | * Add the correct description for the manual configuration box. |
| 134 | 139 | */ |
| 135 | 140 | protected function _renderManualConfigDescription() { |
| 136 | 141 | self::_renderSectionStart(); |
| 137 | - self::_renderSectionDescription( '<span class="viz-gvlink">' . sprintf( __( 'Configure the graph by providing configuration variables right from the %1$sGoogle Visualization API%2$s. You can refer to to some examples %3$shere%4$s.', 'visualizer' ), '<a href="https://developers.google.com/chart/interactive/docs/gallery/?#configuration-options" target="_blank">', '</a>', '<a href="https://docs.themeisle.com/article/728-manual-configuration" target="_blank">', '</a>' ) . '</span>' ); | |
| 142 | + self::_renderSectionDescription( | |
| 143 | + '<span class="viz-gvlink">' . sprintf( | |
| 144 | + // translators: %1$s - HTML link tag, %2$s - HTML closing link tag, %3$s - HTML link tag, %4$s - HTML closing link tag. | |
| 145 | + __( 'Configure the graph by providing configuration variables right from the %1$sGoogle Visualization API%2$s. You can refer to to some examples %3$shere%4$s.', 'visualizer' ), '<a href="https://developers.google.com/chart/interactive/docs/gallery/?#configuration-options" target="_blank">', | |
| 146 | + '</a>', | |
| 147 | + '<a href="https://docs.themeisle.com/article/728-manual-configuration" target="_blank">', | |
| 148 | + '</a>' | |
| 149 | + ) . '</span>' | |
| 150 | + ); | |
| 138 | 151 | } |
| 139 | 152 | |
| 140 | 153 | /** |
| 141 | 154 | * Add the correct example for the manual configuration box. |
| @@ -172,9 +185,9 @@ | ||
| 172 | 185 | self::_renderSectionEnd(); |
| 173 | 186 | |
| 174 | 187 | $this->_renderActionSettings(); |
| 175 | 188 | if ( ! Visualizer_Module_Admin::proFeaturesLocked() ) { |
| 176 | - echo apply_filters( 'visualizer_pro_upsell', '', 'chart-permissions' ); | |
| 189 | + echo apply_filters( 'visualizer_pro_upsell', '', 'frontend-actions' ); | |
| 177 | 190 | echo '</div>'; |
| 178 | 191 | } |
| 179 | 192 | self::_renderGroupEnd(); |
| 180 | 193 | |
| @@ -184,8 +197,9 @@ | ||
| 184 | 197 | esc_html__( 'Configuration', 'visualizer' ), |
| 185 | 198 | 'manual', |
| 186 | 199 | $this->manual, |
| 187 | 200 | sprintf( |
| 201 | + // translators: %s - the format. | |
| 188 | 202 | esc_html__( 'One per line in valid JSON (key:value) format e.g. %s', 'visualizer' ), |
| 189 | 203 | '<br><code>' . $this->_renderManualConfigExample() . '</code>' |
| 190 | 204 | ), |
| 191 | 205 | '', |
| @@ -269,9 +283,9 @@ | ||
| 269 | 283 | do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'PHP version %s not supported', phpversion() ), 'error', __FILE__, __LINE__ ); |
| 270 | 284 | return false; |
| 271 | 285 | } |
| 272 | 286 | |
| 273 | - return class_exists( 'PhpOffice\PhpSpreadsheet\Spreadsheet' ) && extension_loaded( 'zip' ) && extension_loaded( 'xml' ) && extension_loaded( 'fileinfo' ); | |
| 287 | + return class_exists( 'OpenSpout\Writer\Common\Creator\WriterEntityFactory' ) && extension_loaded( 'zip' ) && extension_loaded( 'xml' ) && extension_loaded( 'fileinfo' ); | |
| 274 | 288 | } |
| 275 | 289 | |
| 276 | 290 | /** |
| 277 | 291 | * Renders select item. |
| @@ -460,9 +474,14 @@ | ||
| 460 | 474 | self::_renderTextItem( |
| 461 | 475 | esc_html__( 'Number Format', 'visualizer' ), |
| 462 | 476 | 'series[' . $index . '][format]', |
| 463 | 477 | isset( $this->series[ $index ]['format'] ) ? $this->series[ $index ]['format'] : '', |
| 464 | - sprintf( esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %1$sICU pattern set%2$s. Use something like #,### to get 1,234 as output, or $# to add dollar sign before digits. Pay attention that if you use % percentage format then your values will be multiplied by 100.', 'visualizer' ), '<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">', '</a>' ), | |
| 478 | + sprintf( | |
| 479 | + // translators: %1$s - HTML link tag, %2$s - HTML closing link tag. | |
| 480 | + esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %1$sICU pattern set%2$s. Use something like #,### to get 1,234 as output, or $# to add dollar sign before digits. Pay attention that if you use % percentage format then your values will be multiplied by 100.', 'visualizer' ), | |
| 481 | + '<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">', | |
| 482 | + '</a>' | |
| 483 | + ), | |
| 465 | 484 | '#,###.##' |
| 466 | 485 | ); |
| 467 | 486 | break; |
| 468 | 487 | case 'date': |
| @@ -471,9 +490,14 @@ | ||
| 471 | 490 | self::_renderTextItem( |
| 472 | 491 | esc_html__( 'Date Format', 'visualizer' ), |
| 473 | 492 | 'series[' . $index . '][format]', |
| 474 | 493 | isset( $this->series[ $index ]['format'] ) ? $this->series[ $index ]['format'] : '', |
| 475 | - sprintf( esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %1$sICU date and time format%2$s.', 'visualizer' ), '<a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax" target="_blank">', '</a>' ), | |
| 494 | + sprintf( | |
| 495 | + // translators: %1$s - HTML link tag, %2$s - HTML closing link tag. | |
| 496 | + esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %1$sICU date and time format%2$s.', 'visualizer' ), | |
| 497 | + '<a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax" target="_blank">', | |
| 498 | + '</a>' | |
| 499 | + ), | |
| 476 | 500 | 'eeee, dd LLLL yyyy' |
| 477 | 501 | ); |
| 478 | 502 | break; |
| 479 | 503 | } |
| @@ -587,13 +611,20 @@ | ||
| 587 | 611 | self::_renderGroupStart( esc_html__( 'Chart Data Filter Configuration', 'visualizer' ) . '<span class="dashicons dashicons-lock"></span>', '', apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-filter-controls' ), 'vz-data-controls' ); |
| 588 | 612 | echo '<div style="position: relative">'; |
| 589 | 613 | } |
| 590 | 614 | self::_renderSectionStart(); |
| 591 | - self::_renderSectionDescription( '<span class="viz-gvlink">' . sprintf( __( 'Configure the data filter controls by providing configuration variables right from the %1$sChart Controls API%2$s. ', 'visualizer' ), '<a href="https://developers.google.com/chart/interactive/docs/gallery/controls#controls-gallery" target="_blank">', '</a>' ) . '</span>' ); | |
| 615 | + self::_renderSectionDescription( | |
| 616 | + '<span class="viz-gvlink">' . sprintf( | |
| 617 | + // translators: %1$s - HTML link tag, %2$s - HTML closing link tag. | |
| 618 | + __( 'Configure the data filter controls by providing configuration variables right from the %1$sChart Controls API%2$s. ', 'visualizer' ), | |
| 619 | + '<a href="https://developers.google.com/chart/interactive/docs/gallery/controls#controls-gallery" target="_blank">', | |
| 620 | + '</a>' | |
| 621 | + ) . '</span>' | |
| 622 | + ); | |
| 592 | 623 | self::_renderSectionEnd(); |
| 593 | 624 | $this->_renderChartControlsSettings(); |
| 594 | 625 | if ( ! Visualizer_Module_Admin::proFeaturesLocked() ) { |
| 595 | - echo apply_filters( 'visualizer_pro_upsell', '', 'chart-permissions' ); | |
| 626 | + echo apply_filters( 'visualizer_pro_upsell', '', 'data-filter-configuration' ); | |
| 596 | 627 | echo '</div>'; |
| 597 | 628 | } |
| 598 | 629 | self::_renderGroupEnd(); |
| 599 | 630 | } |
| @@ -631,9 +662,14 @@ | ||
| 631 | 662 | foreach ( $this->__series as $key => $column ) { |
| 632 | 663 | $column_type = isset( $column['type'] ) ? $column['type'] : ''; |
| 633 | 664 | $label = isset( $column['label'] ) ? $column['label'] : ''; |
| 634 | 665 | $column_label[ $label ] = $label; |
| 635 | - $column_index[ $key ] = sprintf( __( '%1$d — Column Type: %2$s ', 'visualizer' ), $key, ucfirst( $column_type ) ); | |
| 666 | + $column_index[ $key ] = sprintf( | |
| 667 | + // translators: %1$d - the column key, %2$s - the column type. | |
| 668 | + __( '%1$d — Column Type: %2$s ', 'visualizer' ), | |
| 669 | + $key, | |
| 670 | + ucfirst( $column_type ) | |
| 671 | + ); | |
| 636 | 672 | } |
| 637 | 673 | } |
| 638 | 674 | |
| 639 | 675 | self::_renderSelectItem( |