Crocoblock / suggestions

The suggestions for CrocoBlock project
191 stars 78 forks source link

Missing WPML Translation Fields in Crocoblock products #7493

Open SirLouen opened 2 months ago

SirLouen commented 2 months ago

Jet Engine:

Widget Dynamic Repeater → Before Items Markup Widget Dynamic Repeater → After Items Markup:

image

Jet Smart Filters

Widget Sorting Filter → Label Widget Sorting Filter → Placeholder

image

SirLouen commented 2 months ago

Sorted Jet Engine one:

\jet-engine\includes\compatibility\packages\wpml.php Line 503:

            $nodes['jet-listing-dynamic-repeater'] = array(
                'conditions' => array(
                    'widgetType' => 'jet-listing-dynamic-repeater'
                ),
                'fields'     => array(
                    array(
                        'field'       => 'dynamic_field_format',
                        'type'        => esc_html__( 'Repeater: Field format (if used)', 'jet-engine' ),
                        'editor_type' => 'AREA',
                    ),
                    array(
                        'field'       => 'dynamic_field_before',
                        'type'        => esc_html__( 'Repeater: Before items markup (if used)', 'jet-engine' ),
                        'editor_type' => 'AREA',
                    ),
                    array(
                        'field'       => 'dynamic_field_after',
                        'type'        => esc_html__( 'Repeater: After items markup (if used)', 'jet-engine' ),
                        'editor_type' => 'AREA',
                    ),
                ),
            );
SirLouen commented 2 months ago

In the Jet Smart Filters this is the code that works

EDIT: I thought it wasn't working but is was a mistake in another section that was hindering this. This is the final code

\jet-smart-filters\includes\compatibility\wpml\wpml-compatibility.php Line: 115

$nodes_to_translate[ 'jet-smart-filters-sorting' ] = array(
                'conditions'        => array( 'widgetType' => 'jet-smart-filters-sorting' ),
                'fields'            => array(
                    array(
                        'field'       => 'label',
                        'type'        => esc_html__( 'Sorting: Label', 'jet-smart-filters' ),
                        'editor_type' => 'LINE',
                    ),
                    array(
                        'field'       => 'placeholder',
                        'type'        => esc_html__( 'Sorting: Placeholder', 'jet-smart-filters' ),
                        'editor_type' => 'LINE',
                    ),
                ),
                'integration-class' => 'WPML_Integration_Jet_Smart_Filters_Sorting',
            );