Plugin Directory

Changeset 3799529


Ignore:
Timestamp:
11/13/2026 01:46:03 AM (3 days ago)
Author:
tsoudaz
Message:

ProdTabs 0.4.8

Location:
prodtabs
Files:
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • prodtabs/tags/0.4.8/assets/css/admin.css

    r3767626 r3799529  
    66        content: "\f163";
    77        font-family: dashicons;
     8}
     9
     10/* Tabs of the product not translated in its language. */
     11#woocommerce-product-data ul.wc-tabs li.prodtabs_options .prodtabs-tab-alert {
     12        width: 16px;
     13        height: 16px;
     14        margin-inline-start: 4px;
     15        color: #996800;
     16        font-size: 16px;
     17        vertical-align: text-bottom;
    818}
    919
  • prodtabs/tags/0.4.8/assets/js/admin-product.js

    r3762148 r3799529  
    414414        }
    415415
     416        /* Tabs not translated yet: icon next to the panel entry ----------------------------------------------- */
     417
     418        if ( settings.untranslated ) {
     419                $( '#woocommerce-product-data ul.wc-tabs li.prodtabs_options > a' ).append(
     420                        $( '<span class="prodtabs-tab-alert dashicons dashicons-warning" aria-hidden="true"></span>' ).attr( 'title', settings.untranslated ),
     421                        $( '<span class="screen-reader-text"></span>' ).text( settings.untranslated )
     422                );
     423        }
     424
    416425        /* Saving -------------------------------------------------------------------------------------------------- */
    417426
  • prodtabs/tags/0.4.8/includes/class-admin-hub.php

    r3767626 r3799529  
    161161
    162162        /**
    163          * Tabs not translated yet, by language (Polylang and WPML): tabs of a product whose translation has no text of its
    164          * own, and shared tabs without a published translation. Counted when the overview opens, on the first
     163         * Tabs not translated yet, by language (Polylang and WPML): tabs of a product that a translation shows with a text
     164         * of the original, its own title or content missing (Product_Tabs::with_fallback()), and shared tabs without a
     165         * published translation. Counted when the overview opens, on the first
    165166         * SCAN_LIMIT products of the default language that have tabs.
    166167         *
    … …  
    200201                                        break 2;
    201202                                }
    202                                 $keys = array();
     203                                $local = array();
    203204                                foreach ( (array) get_post_meta( $id, Tabs::META_LAYOUT, true ) as $entry ) {
    204205                                        if ( is_array( $entry ) && 'local' === ( $entry['type'] ?? '' ) && ! empty( $entry['visible'] ) && isset( $entry['key'] ) ) {
    205                                                 $keys[] = (string) $entry['key'];
     206                                                $local[] = $entry;
    206207                                        }
    207208                                }
    208                                 if ( ! $keys ) {
     209                                if ( ! $local ) {
    209210                                        continue;
    210211                                }
     212                                $source = get_post_meta( $id, Tabs::META_TEXTS, true );
     213                                $source = is_array( $source ) ? $source : array();
    211214                                foreach ( Multilingual::translation_ids( $id, 'product' ) as $translation ) {
    212215                                        $lang = Multilingual::post_language( $translation );
    … …  
    214217                                                continue;
    215218                                        }
    216                                         $texts   = get_post_meta( $translation, Tabs::META_TEXTS, true );
    217                                         $missing = count( array_diff( $keys, array_keys( is_array( $texts ) ? $texts : array() ) ) );
     219                                        // Tabs the shop shows with a text of the original filling a missing title or content.
     220                                        $missing = 0;
     221                                        foreach ( Tabs::join( $local, get_post_meta( $translation, Tabs::META_TEXTS, true ) ) as $entry ) {
     222                                                $shown    = Product_Tabs::with_fallback( $entry, $source );
     223                                                $missing += empty( $shown['translated'] ) && ! Product_Tabs::missing( 'title', $shown['title'] ) && ! Product_Tabs::missing( 'content', $shown['content'] ) ? 1 : 0;
     224                                        }
    218225                                        if ( $missing ) {
    219226                                                $counts[ $lang ] = ( $counts[ $lang ] ?? 0 ) + $missing;
  • prodtabs/tags/0.4.8/includes/class-admin-product.php

    r3762148 r3799529  
    6868                wp_enqueue_script( 'prodtabs-admin-product', PRODTABS_URL . 'assets/js/admin-product.js', $deps, Plugin::asset_version( 'assets/js/admin-product.js' ), true );
    6969                Display::copy_script();
     70                $untranslated = get_the_ID() ? self::untranslated( (int) get_the_ID() ) : 0;
    7071                wp_localize_script(
    7172                        'prodtabs-admin-product',
    7273                        'prodtabsProduct',
    7374                        array(
    74                                 'ajaxUrl'   => admin_url( 'admin-ajax.php' ),
    75                                 'nonce'     => wp_create_nonce( self::NONCE_AJAX ),
    76                                 'productId' => (int) get_the_ID(),
    77                                 'i18n'      => array(
     75                                'ajaxUrl'      => admin_url( 'admin-ajax.php' ),
     76                                'nonce'        => wp_create_nonce( self::NONCE_AJAX ),
     77                                'productId'    => (int) get_the_ID(),
     78                                /* translators: %d: number of tabs. */
     79                                'untranslated' => $untranslated ? sprintf( _n( '%d tab not translated yet', '%d tabs not translated yet', $untranslated, 'prodtabs' ), $untranslated ) : '',
     80                                'i18n'         => array(
    7881                                        /* translators: %s: tab title. */
    7982                                        'moveUp'        => __( 'Move “%s” up', 'prodtabs' ),
    … …  
    209212
    210213        /**
     214         * Visible tabs of a product that the shop shows untranslated in its language: tabs of its own with a text of the
     215         * source or of a shared tab filling a missing title or content, and shared tabs without a published translation in
     216         * it. A tab of its own with texts in other languages only is left out: the shop does not show it in this one.
     217         * Flagged next to the panel entry.
     218         *
     219         * @param int $product_id Product id.
     220         */
     221        private static function untranslated( int $product_id ): int {
     222                $lang    = Multilingual::post_language( $product_id );
     223                $product = '' !== $lang ? wc_get_product( $product_id ) : null;
     224                if ( ! $product ) {
     225                        return 0;
     226                }
     227                $source = self::source_texts( $product_id );
     228                $count  = 0;
     229                foreach ( Product_Tabs::with_auto( Product_Tabs::get( $product_id ), $product ) as $entry ) {
     230                        if ( empty( $entry['visible'] ) ) {
     231                                continue;
     232                        }
     233                        if ( 'local' === $entry['type'] ? 'fallback' === self::fallback_state( $entry, $source ) : ( 'library' === $entry['type'] && self::library_untranslated( (int) $entry['library_id'], $lang ) ) ) {
     234                                ++$count;
     235                        }
     236                }
     237                return $count;
     238        }
     239
     240        /**
     241         * How the shop shows a tab of the product in its language (Product_Tabs::with_fallback()): 'fallback' when a text of
     242         * the source or of a shared tab fills a missing title or content; 'incomplete' when the shop leaves the tab out
     243         * because its title or its content is still missing, a fallback or not; 'other' when the tab has no text in this
     244         * language and nothing to fall back on (texts in other languages only), and the shop leaves it out; '' otherwise
     245         * (its own texts, or a tab without any text saved yet, such as a new one).
     246         *
     247         * @param array $entry  Local entry.
     248         * @param array $source Texts of the source product, by key.
     249         */
     250        private static function fallback_state( array $entry, array $source ): string {
     251                $shown   = Product_Tabs::with_fallback( $entry, $source );
     252                $title   = Product_Tabs::missing( 'title', $shown['title'] );
     253                $content = Product_Tabs::missing( 'content', $shown['content'] );
     254                if ( $title !== $content ) {
     255                        return 'incomplete';
     256                }
     257                if ( $title ) {
     258                        return empty( $entry['translated'] ) ? 'other' : '';
     259                }
     260                return empty( $shown['translated'] ) ? 'fallback' : '';
     261        }
     262
     263        /**
     264         * Whether a published shared tab has no published translation in a language: the shop shows the original.
     265         *
     266         * @param int    $id   Shared tab id stored in the product.
     267         * @param string $lang Language of the product.
     268         */
     269        private static function library_untranslated( int $id, string $lang ): bool {
     270                if ( '' === $lang || ! Library::get_tab( $id ) ) {
     271                        return false;
     272                }
     273                $translation = Multilingual::translation( $id, Library::POST_TYPE, $lang );
     274                return ! $translation || 'publish' !== get_post_status( $translation );
     275        }
     276
     277        /**
    211278         * Texts of the source of a translation, shown to translators as a reference.
    212279         *
    … …  
    287354                        if ( 'library' === $type && ! Library::get_tab( (int) $entry['library_id'] ) ) {
    288355                                $notes[] = __( 'Not published: not shown in the shop.', 'prodtabs' );
     356                        } elseif ( 'library' === $type && self::library_untranslated( (int) $entry['library_id'], (string) $context['lang'] ) ) {
     357                                $notes[] = __( 'Not translated', 'prodtabs' );
    289358                        }
    290359                        if ( ! empty( $entry['auto'] ) ) {
    291360                                $notes[] = __( 'Added automatically', 'prodtabs' );
    292361                        }
    293                         if ( 'local' === $type && empty( $entry['translated'] ) ) {
     362                        $state = 'local' === $type ? self::fallback_state( $entry, $context['source'] ) : '';
     363                        if ( 'fallback' === $state ) {
    294364                                $notes[] = __( 'Not translated', 'prodtabs' );
     365                        } elseif ( 'incomplete' === $state ) {
     366                                $notes[] = __( 'Title or content missing: not shown in the shop.', 'prodtabs' );
     367                        } elseif ( 'other' === $state ) {
     368                                $notes[] = __( '(tab of another language: not shown in this one)', 'prodtabs' );
    295369                        }
    296370                }
    … …  
    448522                        </div>
    449523                <?php endif; ?>
    450                 <?php if ( empty( $entry['translated'] ) ) : ?>
     524                <?php if ( 'fallback' === self::fallback_state( $entry, $context['source'] ) ) : ?>
    451525                        <div class="prodtabs-message prodtabs-message--warning">
    452526                                <p><?php esc_html_e( 'Not translated in this language yet: the shop shows the text of the original language. Type the translation below.', 'prodtabs' ); ?></p>
  • prodtabs/tags/0.4.8/includes/class-cache-purge.php

    r3762148 r3799529  
    6363                                // The translations of a source show its list and its texts where they have none of their own.
    6464                                self::products( Multilingual::source_product( (int) $object_id ) ? array( (int) $object_id ) : Multilingual::translation_ids( (int) $object_id, 'product' ) );
     65                                if ( Tabs::META_LAYOUT === $meta_key ) {
     66                                        delete_transient( 'prodtabs_products_with_tabs' ); // Count of Admin_Hub::products_with_tabs().
     67                                }
    6568                        }
    6669                        return;
  • prodtabs/tags/0.4.8/includes/class-multilingual.php

    r3762148 r3799529  
    2929                // After Polylang's own reading of wpml-config.xml (priority 20).
    3030                add_filter( 'pll_copy_post_metas', array( __CLASS__, 'polylang_metas' ), 30, 5 );
     31                add_action( 'pll_post_synchronized', array( __CLASS__, 'polylang_copied' ), 10, 4 );
    3132                add_action( 'add_option_' . Settings::OPTION, array( __CLASS__, 'register_native_titles' ), 10, 2 );
    3233                add_action( 'update_option_' . Settings::OPTION, array( __CLASS__, 'register_native_titles' ), 10, 2 );
    … …  
    115116
    116117        /**
    117          * Metas Polylang copies when a translation is created and keeps synchronized afterwards: the structure, never the
    118          * texts. A new translation has no text of its own: until it is translated, it shows the original as not translated
    119          * (hidden by the "Tabs not translated yet" setting, counted in the overview), as with WPML. A product without
    120          * structure never synchronizes its absence over a translation that has one: Polylang would delete the tabs of every
    121          * language.
     118         * Metas Polylang copies when a translation is created and keeps synchronized afterwards: the structure always, the
     119         * texts (tab texts, shop title) when Polylang copies the description too. A new translation has no text of its
     120         * own: until it is translated, it shows the original as not translated (hidden by the "Tabs not translated yet"
     121         * setting, counted in the overview), as with WPML. With Polylang Pro, "Duplicate content" copies the texts into the
     122         * new translation, and synchronized posts keep them the same in every language. A product without structure never
     123         * synchronizes its absence over a translation that has one: Polylang would delete the tabs of every language.
    122124         *
    123125         * @param string[] $keys Meta keys.
    … …  
    131133                $keys[] = Tabs::META_LAYOUT;
    132134                $keys[] = Library::META_SCOPE; // The same products in every language.
    133                 if ( ! $sync ) {
    134                         // Polylang copies the fields to translate of wpml-config.xml at creation: tab texts and shop title stay out.
    135                         $keys = array_diff( $keys, array( Tabs::META_TEXTS, Library::META_SHOP_TITLE ) );
    136                 }
     135                $texts  = array( Tabs::META_TEXTS, Library::META_SHOP_TITLE );
     136                // Polylang copies the fields to translate of wpml-config.xml at creation, and Polylang Pro all the fields of
     137                // synchronized posts before its reading of wpml-config.xml takes them out.
     138                $keys = self::polylang_copies_texts( (int) $from, (int) $to, (bool) $sync ) ? array_merge( $keys, $texts ) : array_diff( $keys, $texts );
    137139                $keys = array_values( array_unique( $keys ) );
    138140                if ( $sync && $from && $to && ! get_post_meta( (int) $from, Tabs::META_LAYOUT, true ) && get_post_meta( (int) $to, Tabs::META_LAYOUT, true ) ) {
    … …  
    140142                }
    141143                return $keys;
     144        }
     145
     146        /**
     147         * Whether Polylang copies the description of a post to another one: synchronized posts of Polylang Pro (from their
     148         * creation), or a new translation created while "Duplicate content" is on.
     149         *
     150         * @param int  $from Post the metas come from.
     151         * @param int  $to   Post the metas go to.
     152         * @param bool $sync True for the synchronization, false for the copy at creation.
     153         */
     154        private static function polylang_copies_texts( int $from, int $to, bool $sync ): bool {
     155                if ( ! $from || ! $to || ! function_exists( 'PLL' ) ) {
     156                        return false;
     157                }
     158                if ( isset( PLL()->sync_post_model ) && PLL()->sync_post_model->are_synchronized( $from, $to ) ) {
     159                        return true;
     160                }
     161                // Option of Polylang Pro, by post type and by user; its machine translation turns it off while it translates.
     162                $duplicate = $sync ? null : get_user_meta( get_current_user_id(), 'pll_duplicate_content', true );
     163                return is_array( $duplicate ) && ! empty( $duplicate[ get_post_type( $from ) ] );
     164        }
     165
     166        /**
     167         * Copy of a post by Polylang Pro (bulk translation "Copy"): the description is copied once, the texts too.
     168         * Synchronized posts get theirs through polylang_metas().
     169         *
     170         * @param int    $from     Source post.
     171         * @param int    $to       Copy.
     172         * @param string $lang     Language of the copy.
     173         * @param string $strategy copy, or sync for synchronized posts.
     174         */
     175        public static function polylang_copied( $from, $to, $lang, $strategy ): void {
     176                if ( 'copy' !== $strategy || ! in_array( get_post_type( (int) $from ), array( 'product', Library::POST_TYPE ), true ) ) {
     177                        return;
     178                }
     179                foreach ( array( Tabs::META_TEXTS, Library::META_SHOP_TITLE ) as $key ) {
     180                        $value = get_post_meta( (int) $from, $key, true );
     181                        if ( '' === $value || array() === $value ) {
     182                                delete_post_meta( (int) $to, $key );
     183                        } else {
     184                                update_post_meta( (int) $to, $key, wp_slash( $value ) );
     185                        }
     186                }
    142187        }
    143188
  • prodtabs/tags/0.4.8/includes/class-product-tabs.php

    r3762148 r3799529  
    111111
    112112        /**
    113          * Entries of a product for the shop. Texts missing in the language of the product come from the source product
    114          * (the original with WPML, the default language with Polylang), then from the library tab a tab was customized
    115          * from; a tab with no text anywhere is left out. A translation without a list of its own uses the list of its source.
     113         * Entries of a product for the shop. A title or a content missing in the language of the product comes from the
     114         * source product (the original with WPML, the default language with Polylang); a tab without any text, in its
     115         * language or in the source, shows the library tab it was customized from (with_fallback()). A tab still without a
     116         * title or a content is left out. A translation without a list of its own uses the list of its source.
    116117         *
    117118         * @param int $product_id Product id.
    … …  
    132133                $source_texts = null;
    133134                foreach ( $entries as $i => $entry ) {
    134                         if ( 'local' !== ( $entry['type'] ?? '' ) || ! empty( $entry['translated'] ) ) {
     135                        if ( 'local' !== ( $entry['type'] ?? '' ) || ( ! self::missing( 'title', $entry['title'] ) && ! self::missing( 'content', $entry['content'] ) ) ) {
    135136                                continue;
    136137                        }
    … …  
    140141                                $source_texts = is_array( $source_texts ) ? $source_texts : array();
    141142                        }
    142                         $text = $source_texts[ $entry['key'] ] ?? null;
    143                         if ( is_array( $text ) && '' !== ( $text['title'] ?? '' ) ) {
    144                                 $entries[ $i ]['title']   = (string) $text['title'];
    145                                 $entries[ $i ]['content'] = (string) ( $text['content'] ?? '' );
    146                                 continue;
    147                         }
    148                         $library = ! empty( $entry['origin'] ) ? Library::resolve( (int) $entry['origin'] ) : null;
    149                         if ( $library ) {
    150                                 $entries[ $i ]['title']   = $library['title'];
    151                                 $entries[ $i ]['content'] = $library['content'];
    152                         }
     143                        $entries[ $i ] = self::with_fallback( $entry, $source_texts );
    153144                }
    154145                $entries = Tabs::normalize( $entries );
    155146                return $entries ? Tabs::with_natives( $entries, Settings::get( 'native_order' ) ) : array();
     147        }
     148
     149        /**
     150         * Texts the shop shows for a tab of a product: a title or a content missing in the language of the product comes
     151         * from the source product for this key, field by field. Only a tab without any text, neither saved in its language
     152         * nor in the source, takes the title and the content of the library tab it was customized from: a customized tab
     153         * that lost its title or its content stays without it, and the shop leaves it out. The one rule of the fallback,
     154         * read by the shop, the product screen and the overview.
     155         *
     156         * @param array $entry        Local entry with the texts of the language of the product (see Tabs::join()).
     157         * @param array $source_texts Texts of the source product, by key.
     158         * @return array The entry with the texts the shop shows; 'translated' false when one of them comes from a fallback.
     159         */
     160        public static function with_fallback( array $entry, array $source_texts ): array {
     161                $saved = ! empty( $entry['translated'] ); // Texts saved in the language of the product (Tabs::join()).
     162                $text  = $source_texts[ $entry['key'] ?? '' ] ?? null;
     163                foreach ( array( 'title', 'content' ) as $field ) {
     164                        $value = is_array( $text ) && isset( $text[ $field ] ) && is_scalar( $text[ $field ] ) ? (string) $text[ $field ] : '';
     165                        if ( self::missing( $field, (string) $entry[ $field ] ) && ! self::missing( $field, $value ) ) {
     166                                $entry[ $field ]     = $value;
     167                                $entry['translated'] = false;
     168                        }
     169                }
     170                if ( $saved || ! self::missing( 'title', $entry['title'] ) || ! self::missing( 'content', $entry['content'] ) || empty( $entry['origin'] ) ) {
     171                        return $entry;
     172                }
     173                $library = Library::resolve( (int) $entry['origin'] );
     174                if ( $library ) {
     175                        $entry['title']      = (string) $library['title'];
     176                        $entry['content']    = (string) $library['content'];
     177                        $entry['translated'] = false;
     178                }
     179                return $entry;
     180        }
     181
     182        /**
     183         * Whether a text of a tab is missing: no title to click on, or a content that shows nothing.
     184         *
     185         * @param string $field title or content.
     186         * @param string $value Text.
     187         */
     188        public static function missing( string $field, string $value ): bool {
     189                return 'title' === $field ? '' === trim( $value ) : Tabs::is_blank( $value );
    156190        }
    157191
  • prodtabs/tags/0.4.8/languages/prodtabs.pot

    r3767626 r3799529  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ProdTabs: Multilingual Product Tabs for WooCommerce 0.4.7\n"
     5"Project-Id-Version: ProdTabs: Multilingual Product Tabs for WooCommerce 0.4.8\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/prodtabs\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-10-26T01:29:16+00:00\n"
     12"POT-Creation-Date: 2026-11-13T01:09:35+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
    … …  
    5050
    5151#: includes/class-admin-hub.php:80
    52 #: includes/class-admin-hub.php:411
     52#: includes/class-admin-hub.php:418
    5353#: includes/class-admin-settings.php:48
    5454msgid "Settings"
    5555msgstr ""
    5656
    57 #: includes/class-admin-hub.php:307
     57#: includes/class-admin-hub.php:314
    5858#: includes/class-admin-import.php:439
    59 #: includes/class-admin-product.php:393
     59#: includes/class-admin-product.php:467
    6060#: includes/class-admin-settings.php:293
    6161msgid "Description"
    6262msgstr ""
    6363
    64 #: includes/class-admin-hub.php:308
     64#: includes/class-admin-hub.php:315
    6565#: includes/class-admin-import.php:440
    66 #: includes/class-admin-product.php:394
     66#: includes/class-admin-product.php:468
    6767#: includes/class-admin-settings.php:294
    6868msgid "Additional information"
    6969msgstr ""
    7070
    71 #: includes/class-admin-hub.php:309
     71#: includes/class-admin-hub.php:316
    7272#: includes/class-admin-import.php:441
    73 #: includes/class-admin-product.php:395
     73#: includes/class-admin-product.php:469
    7474#: includes/class-admin-settings.php:295
    7575msgid "Reviews"
    7676msgstr ""
    7777
    78 #: includes/class-admin-hub.php:406
     78#: includes/class-admin-hub.php:413
    7979msgid "Tabs of each product, tabs shared between products, and the WooCommerce tabs for the whole shop."
    8080msgstr ""
    8181
    82 #: includes/class-admin-hub.php:410
    83 #: includes/class-admin-hub.php:482
     82#: includes/class-admin-hub.php:417
     83#: includes/class-admin-hub.php:489
    8484#: includes/class-admin-library.php:197
    8585#: includes/class-admin-settings.php:262
    … …  
    8787msgstr ""
    8888
    89 #: includes/class-admin-hub.php:418
     89#: includes/class-admin-hub.php:425
    9090msgid "shared tab"
    9191msgid_plural "shared tabs"
    … …  
    9393msgstr[1] ""
    9494
    95 #: includes/class-admin-hub.php:422
     95#: includes/class-admin-hub.php:429
    9696msgid "product with tabs of its own"
    9797msgid_plural "products with tabs of their own"
    … …  
    100100
    101101#. translators: %s: name of the translation plugin.
    102 #: includes/class-admin-hub.php:430
     102#: includes/class-admin-hub.php:437
    103103#, php-format
    104104msgid "language, with %s"
    … …  
    107107msgstr[1] ""
    108108
    109 #: includes/class-admin-hub.php:438
     109#: includes/class-admin-hub.php:445
    110110msgid "product with Custom Product Tabs (YIKES)"
    111111msgid_plural "products with Custom Product Tabs (YIKES)"
    … …  
    113113msgstr[1] ""
    114114
    115 #: includes/class-admin-hub.php:445
     115#: includes/class-admin-hub.php:452
    116116#: includes/class-admin-settings.php:124
    117117msgid "WooCommerce tabs"
    … …  
    119119
    120120#. translators: %s: name of a WooCommerce tab.
    121 #: includes/class-admin-hub.php:451
     121#: includes/class-admin-hub.php:458
    122122#, php-format
    123123msgid "%s (hidden)"
    124124msgstr ""
    125125
    126 #: includes/class-admin-hub.php:456
     126#: includes/class-admin-hub.php:463
    127127msgid "In this order on every product. A product can hide or move a tab."
    128128msgstr ""
    129129
    130 #: includes/class-admin-hub.php:457
     130#: includes/class-admin-hub.php:464
    131131msgid "Rename, hide or reorder"
    132132msgstr ""
    133133
    134 #: includes/class-admin-hub.php:461
     134#: includes/class-admin-hub.php:468
    135135#: includes/class-admin-settings.php:118
    136136#: includes/class-library.php:31
    … …  
    140140msgstr ""
    141141
    142 #: includes/class-admin-hub.php:465
     142#: includes/class-admin-hub.php:472
    143143msgid "None yet. Write shipping or returns once, add them to your products or show them on the whole catalog."
    144144msgstr ""
    145145
    146146#. translators: %d: number of shared tabs.
    147 #: includes/class-admin-hub.php:468
     147#: includes/class-admin-hub.php:475
    148148#, php-format
    149149msgid "%d shared tab"
    … …  
    153153
    154154#. translators: %d: number of shared tabs.
    155 #: includes/class-admin-hub.php:471
     155#: includes/class-admin-hub.php:478
    156156#, php-format
    157157msgid "%d shown on its own by its “Show on” setting"
    … …  
    161161
    162162#. translators: Sentence of the shared tabs card. 1: number of shared tabs, such as "3 shared tabs"; 2: how many of them show on their own, such as "2 shown on their own by their “Show on” setting".
    163 #: includes/class-admin-hub.php:473
     163#: includes/class-admin-hub.php:480
    164164#, php-format
    165165msgid "%1$s, %2$s."
    … …  
    167167
    168168#. translators: Sentence of the shared tabs card. %s: number of shared tabs, such as "3 shared tabs". Only adds the punctuation that ends the sentence.
    169 #: includes/class-admin-hub.php:476
     169#: includes/class-admin-hub.php:483
    170170#, php-format
    171171msgid "%s."
    172172msgstr ""
    173173
    174 #: includes/class-admin-hub.php:483
     174#: includes/class-admin-hub.php:490
    175175msgid "See the list"
    176176msgstr ""
    177177
    178 #: includes/class-admin-hub.php:488
     178#: includes/class-admin-hub.php:495
    179179msgid "Tabs anywhere"
    180180msgstr ""
    181181
    182 #: includes/class-admin-hub.php:489
     182#: includes/class-admin-hub.php:496
    183183msgid "In a page, a page builder, or a theme that does not show the tabs: a shortcode, or the “Product tabs (ProdTabs)” block."
    184184msgstr ""
    185185
    186 #: includes/class-admin-hub.php:491
     186#: includes/class-admin-hub.php:498
    187187msgid "See the shortcodes"
    188188msgstr ""
    189189
    190 #: includes/class-admin-hub.php:494
     190#: includes/class-admin-hub.php:501
    191191msgid "every tab of the product of the page"
    192192msgstr ""
    193193
    194 #: includes/class-admin-hub.php:496
     194#: includes/class-admin-hub.php:503
    195195msgid "the tabs of a product, on any page"
    196196msgstr ""
    197197
    198 #: includes/class-admin-hub.php:498
     198#: includes/class-admin-hub.php:505
    199199msgid "one tab of the product, by its anchor; add title=\"no\" to leave its title out"
    200200msgstr ""
    201201
    202 #: includes/class-admin-hub.php:500
     202#: includes/class-admin-hub.php:507
    203203msgid "a shared tab, on any page"
    204204msgstr ""
    205205
    206 #: includes/class-admin-hub.php:502
     206#: includes/class-admin-hub.php:509
    207207msgid "The shortcode of each tab is ready to copy in the Tabs panel of the product, and on the screen of each shared tab."
    208208msgstr ""
    209209
    210 #: includes/class-admin-hub.php:507
     210#: includes/class-admin-hub.php:514
    211211#: includes/class-admin-settings.php:174
    212212msgid "Languages"
    … …  
    214214
    215215#. translators: %d: number of tabs.
    216 #: includes/class-admin-hub.php:518
     216#: includes/class-admin-hub.php:525
     217#: includes/class-admin-product.php:79
    217218#, php-format
    218219msgid "%d tab not translated yet"
    … …  
    221222msgstr[1] ""
    222223
    223 #: includes/class-admin-hub.php:531
     224#: includes/class-admin-hub.php:538
    224225#: includes/class-admin-settings.php:414
    225226msgid "No translation plugin found. ProdTabs works with WPML, Polylang, TranslatePress and Weglot."
    … …  
    227228
    228229#. translators: %s: name of the translation plugin.
    229 #: includes/class-admin-hub.php:534
     230#: includes/class-admin-hub.php:541
    230231#, php-format
    231232msgid "%s is active: a product and its translations share one list of tabs, and each language keeps its own texts."
    … …  
    233234
    234235#. translators: %s: name of the translation plugin.
    235 #: includes/class-admin-hub.php:537
     236#: includes/class-admin-hub.php:544
    236237#, php-format
    237238msgid "%s is active: tab titles and contents are translated on the page."
    … …  
    239240
    240241#. translators: %d: number of tabs.
    241 #: includes/class-admin-hub.php:548
     242#: includes/class-admin-hub.php:555
    242243#, php-format
    243244msgid "%d tab is not translated yet in one of the languages: it stays hidden there until then."
    … …  
    247248
    248249#. translators: %d: number of tabs.
    249 #: includes/class-admin-hub.php:550
     250#: includes/class-admin-hub.php:557
    250251#, php-format
    251252msgid "%d tab is not translated yet in one of the languages: it shows its original text there until then."
    … …  
    254255msgstr[1] ""
    255256
    256 #: includes/class-admin-hub.php:555
     257#: includes/class-admin-hub.php:562
    257258msgid "Check the setup"
    258259msgstr ""
    259260
    260 #: includes/class-admin-hub.php:560
     261#: includes/class-admin-hub.php:567
    261262msgid "Custom Product Tabs (YIKES)"
    262263msgstr ""
    263264
    264265#. translators: 1: number of products, 2: number of reusable tabs.
    265 #: includes/class-admin-hub.php:566
     266#: includes/class-admin-hub.php:573
    266267#: includes/class-admin-settings.php:446
    267268#, php-format
    … …  
    270271
    271272#. translators: %d: number of products.
    272 #: includes/class-admin-hub.php:568
     273#: includes/class-admin-hub.php:575
    273274#: includes/class-admin-import.php:336
    274275#: includes/class-admin-library.php:110
    … …  
    282283
    283284#. translators: %d: number of reusable tabs.
    284 #: includes/class-admin-hub.php:570
     285#: includes/class-admin-hub.php:577
    285286#: includes/class-admin-settings.php:450
    286287#, php-format
    … …  
    290291msgstr[1] ""
    291292
    292 #: includes/class-admin-hub.php:574
     293#: includes/class-admin-hub.php:581
    293294msgid "The import keeps the order and the links to tabs, and can be undone."
    294295msgstr ""
    295296
    296 #: includes/class-admin-hub.php:577
     297#: includes/class-admin-hub.php:584
    297298msgid "Open the import"
    298299msgstr ""
    299300
    300 #: includes/class-admin-hub.php:592
     301#: includes/class-admin-hub.php:599
    301302msgid "ProdTabs Premium"
    302303msgstr ""
    303304
    304 #: includes/class-admin-hub.php:594
     305#: includes/class-admin-hub.php:601
    305306msgid "FAQ tabs with schema.org FAQPage structured data"
    306307msgstr ""
    307308
    308 #: includes/class-admin-hub.php:595
     309#: includes/class-admin-hub.php:602
    309310msgid "Your tab texts in the content analysis of Yoast SEO and Rank Math"
    310311msgstr ""
    311312
    312 #: includes/class-admin-hub.php:596
     313#: includes/class-admin-hub.php:603
    313314msgid "Shared tabs shown by category, tag or brand"
    314315msgstr ""
    315316
    316 #: includes/class-admin-hub.php:597
     317#: includes/class-admin-hub.php:604
    317318msgid "Add or remove a shared tab on many products at once"
    318319msgstr ""
    319320
    320 #: includes/class-admin-hub.php:598
     321#: includes/class-admin-hub.php:605
    321322msgid "Tab texts translated in a spreadsheet, one column per language"
    322323msgstr ""
    323324
    324325#. translators: Price of the Premium license for one shop. Use the currency of the pricing page the button opens: euros in French (refficience.com/prodtabs/), US dollars in every other language.
    325 #: includes/class-admin-hub.php:603
     326#: includes/class-admin-hub.php:610
    326327msgid "$49 a year for your shop"
    327328msgstr ""
    328329
    329 #: includes/class-admin-hub.php:605
     330#: includes/class-admin-hub.php:612
    330331msgid "Discover ProdTabs Premium"
    331332msgstr ""
    332333
    333 #: includes/class-admin-hub.php:605
    334 #: includes/class-admin-hub.php:622
    335 #: includes/class-admin-hub.php:626
    336 #: includes/class-admin-hub.php:627
    337 #: includes/class-admin-hub.php:628
     334#: includes/class-admin-hub.php:612
    338335#: includes/class-admin-hub.php:629
    339 #: includes/class-admin-hub.php:640
     336#: includes/class-admin-hub.php:633
     337#: includes/class-admin-hub.php:634
     338#: includes/class-admin-hub.php:635
     339#: includes/class-admin-hub.php:636
     340#: includes/class-admin-hub.php:647
    340341#: includes/class-admin-import.php:623
    341 #: includes/class-admin-product.php:167
    342 #: includes/class-admin-product.php:510
     342#: includes/class-admin-product.php:170
     343#: includes/class-admin-product.php:584
    343344#: includes/class-review-ask.php:117
    344345msgid "(opens in a new tab)"
    345346msgstr ""
    346347
    347 #: includes/class-admin-hub.php:612
     348#: includes/class-admin-hub.php:619
    348349msgid "Good to know"
    349350msgstr ""
    350351
    351 #: includes/class-admin-hub.php:614
     352#: includes/class-admin-hub.php:621
    352353msgid "No tracking and no ads in your dashboard."
    353354msgstr ""
    354355
    355 #: includes/class-admin-hub.php:615
     356#: includes/class-admin-hub.php:622
    356357msgid "Your tabs are standard WordPress data. Deactivating or deleting ProdTabs keeps them, unless you ask otherwise in Settings, Uninstall."
    357358msgstr ""
    358359
    359 #: includes/class-admin-hub.php:616
     360#: includes/class-admin-hub.php:623
    360361msgid "Built for WPML and Polylang, and works with TranslatePress and Weglot."
    361362msgstr ""
    362363
    363 #: includes/class-admin-hub.php:617
     364#: includes/class-admin-hub.php:624
    364365msgid "Translated on translate.wordpress.org: each language arrives with the WordPress updates once approved."
    365366msgstr ""
    366367
    367 #: includes/class-admin-hub.php:621
     368#: includes/class-admin-hub.php:628
    368369msgid "ProdTabs is not translated into your language yet. Translate it on translate.wordpress.org: once your translation is approved, write to us and get a one-year ProdTabs Premium license for one site."
    369370msgstr ""
    370371
    371 #: includes/class-admin-hub.php:622
     372#: includes/class-admin-hub.php:629
    372373msgid "Translate ProdTabs"
    373374msgstr ""
    374375
    375 #: includes/class-admin-hub.php:626
     376#: includes/class-admin-hub.php:633
    376377msgid "Plugin page"
    377378msgstr ""
    378379
    379 #: includes/class-admin-hub.php:627
     380#: includes/class-admin-hub.php:634
    380381msgid "Changelog"
    381382msgstr ""
    382383
    383 #: includes/class-admin-hub.php:628
     384#: includes/class-admin-hub.php:635
    384385msgid "Contact support"
    385386msgstr ""
    386387
    387 #: includes/class-admin-hub.php:629
     388#: includes/class-admin-hub.php:636
    388389msgid "Rate ProdTabs"
    389390msgstr ""
    390391
    391 #: includes/class-admin-hub.php:635
    392 #: includes/class-admin-hub.php:638
     392#: includes/class-admin-hub.php:642
     393#: includes/class-admin-hub.php:645
    393394msgid "Support information"
    394395msgstr ""
    395396
    396 #: includes/class-admin-hub.php:636
     397#: includes/class-admin-hub.php:643
    397398msgid "This report helps us answer you: versions, settings, theme, active plugins and the address of the site, with no customer data. The button opens our support form with the report filled in. You see it there, you can leave it out, and it reaches us only when you send your message."
    398399msgstr ""
    399400
    400 #: includes/class-admin-hub.php:640
     401#: includes/class-admin-hub.php:647
    401402msgid "Contact support with this report"
    402403msgstr ""
    403404
    404 #: includes/class-admin-hub.php:641
     405#: includes/class-admin-hub.php:648
    405406msgid "Report copied."
    406407msgstr ""
    407408
    408 #: includes/class-admin-hub.php:641
     409#: includes/class-admin-hub.php:648
    409410#: includes/class-admin-library.php:288
    410411#: includes/class-display.php:161
    … …  
    756757
    757758#: includes/class-admin-import.php:455
     759#: includes/class-admin-product.php:368
    758760msgid "(tab of another language: not shown in this one)"
    759761msgstr ""
    760762
    761763#: includes/class-admin-import.php:460
    762 #: includes/class-admin-product.php:93
    763 #: includes/class-admin-product.php:316
     764#: includes/class-admin-product.php:96
     765#: includes/class-admin-product.php:390
    764766msgid "(no title)"
    765767msgstr ""
    766768
    767769#: includes/class-admin-import.php:462
    768 #: includes/class-admin-product.php:285
     770#: includes/class-admin-product.php:352
    769771msgid "Shared"
    770772msgstr ""
    … …  
    10041006
    10051007#: includes/class-admin-library.php:55
    1006 #: includes/class-admin-product.php:460
     1008#: includes/class-admin-product.php:534
    10071009msgid "Content"
    10081010msgstr ""
    … …  
    11191121
    11201122#. translators: %s: tab title.
    1121 #: includes/class-admin-product.php:79
    1122 #: includes/class-admin-product.php:328
     1123#: includes/class-admin-product.php:82
     1124#: includes/class-admin-product.php:402
    11231125#, php-format
    11241126msgid "Move “%s” up"
    … …  
    11261128
    11271129#. translators: %s: tab title.
    1128 #: includes/class-admin-product.php:81
    1129 #: includes/class-admin-product.php:331
     1130#: includes/class-admin-product.php:84
     1131#: includes/class-admin-product.php:405
    11301132#, php-format
    11311133msgid "Move “%s” down"
    … …  
    11331135
    11341136#. translators: %s: tab title.
    1135 #: includes/class-admin-product.php:83
    1136 #: includes/class-admin-product.php:354
     1137#: includes/class-admin-product.php:86
     1138#: includes/class-admin-product.php:428
    11371139#, php-format
    11381140msgid "Remove “%s”"
    … …  
    11401142
    11411143#. translators: 1: tab title, 2: new position, 3: number of tabs.
    1142 #: includes/class-admin-product.php:85
     1144#: includes/class-admin-product.php:88
    11431145#, php-format
    11441146msgid "“%1$s” moved to position %2$d of %3$d."
    … …  
    11461148
    11471149#. translators: %s: tab title.
    1148 #: includes/class-admin-product.php:87
     1150#: includes/class-admin-product.php:90
    11491151#, php-format
    11501152msgid "“%s” added."
    … …  
    11521154
    11531155#. translators: %s: tab title.
    1154 #: includes/class-admin-product.php:89
     1156#: includes/class-admin-product.php:92
    11551157#, php-format
    11561158msgid "“%s” removed."
    … …  
    11581160
    11591161#. translators: %s: tab title.
    1160 #: includes/class-admin-product.php:91
     1162#: includes/class-admin-product.php:94
    11611163#, php-format
    11621164msgid "Remove the tab “%s”? Its content will be lost when you update the product."
    11631165msgstr ""
    11641166
    1165 #: includes/class-admin-product.php:92
     1167#: includes/class-admin-product.php:95
    11661168msgid "Go back to the shared version? The changes made to this tab on this product will be lost when you update the product."
    11671169msgstr ""
    11681170
    1169 #: includes/class-admin-product.php:94
     1171#: includes/class-admin-product.php:97
    11701172msgid "Something went wrong. Reload the page and try again."
    11711173msgstr ""
    11721174
    1173 #: includes/class-admin-product.php:95
     1175#: includes/class-admin-product.php:98
    11741176msgid "New tab"
    11751177msgstr ""
    11761178
    1177 #: includes/class-admin-product.php:126
     1179#: includes/class-admin-product.php:129
    11781180msgid "This product is a translation: its tabs, their order and their visibility follow the original product. Translate the texts of its own tabs here, or in the translation editor."
    11791181msgstr ""
    11801182
    1181 #: includes/class-admin-product.php:128
     1183#: includes/class-admin-product.php:131
    11821184msgid "Tabs shown on this product, in this order. Drag a tab or use its arrows to move it."
    11831185msgstr ""
    11841186
    1185 #: includes/class-admin-product.php:140
     1187#: includes/class-admin-product.php:143
    11861188msgid "This product only shows the WooCommerce tabs. Add a tab of its own, or a shared tab."
    11871189msgstr ""
    11881190
    1189 #: includes/class-admin-product.php:145
     1191#: includes/class-admin-product.php:148
    11901192msgid "Add a tab"
    11911193msgstr ""
    11921194
    1193 #: includes/class-admin-product.php:157
     1195#: includes/class-admin-product.php:160
    11941196msgid "Add a shared tab"
    11951197msgstr ""
    11961198
    1197 #: includes/class-admin-product.php:158
    1198 #: includes/class-admin-product.php:159
     1199#: includes/class-admin-product.php:161
     1200#: includes/class-admin-product.php:162
    11991201msgid "Add a shared tab…"
    12001202msgstr ""
    12011203
    1202 #: includes/class-admin-product.php:167
     1204#: includes/class-admin-product.php:170
    12031205msgid "Create a shared tab, to use on several products"
    12041206msgstr ""
    12051207
    1206 #: includes/class-admin-product.php:194
     1208#: includes/class-admin-product.php:197
    12071209msgid "Shortcode of all the tabs of this product"
    12081210msgstr ""
    12091211
    12101212#. translators: 1: title of the tab in the shop, 2: name of the library tab.
    1211 #: includes/class-admin-product.php:245
     1213#: includes/class-admin-product.php:312
    12121214#, php-format
    12131215msgid "%1$s (%2$s)"
    12141216msgstr ""
    12151217
    1216 #: includes/class-admin-product.php:280
     1218#: includes/class-admin-product.php:347
    12171219msgid "WooCommerce"
    12181220msgstr ""
    12191221
    1220 #: includes/class-admin-product.php:285
     1222#: includes/class-admin-product.php:352
    12211223msgid "This product"
    12221224msgstr ""
    12231225
    1224 #: includes/class-admin-product.php:288
     1226#: includes/class-admin-product.php:355
    12251227msgid "Not published: not shown in the shop."
    12261228msgstr ""
    12271229
    1228 #: includes/class-admin-product.php:291
     1230#: includes/class-admin-product.php:357
     1231#: includes/class-admin-product.php:364
     1232msgid "Not translated"
     1233msgstr ""
     1234
     1235#: includes/class-admin-product.php:360
    12291236msgid "Added automatically"
    12301237msgstr ""
    12311238
    1232 #: includes/class-admin-product.php:294
    1233 msgid "Not translated"
    1234 msgstr ""
    1235 
    1236 #: includes/class-admin-product.php:313
     1239#: includes/class-admin-product.php:366
     1240msgid "Title or content missing: not shown in the shop."
     1241msgstr ""
     1242
     1243#: includes/class-admin-product.php:387
    12371244msgid "Drag to move"
    12381245msgstr ""
    12391246
    1240 #: includes/class-admin-product.php:325
     1247#: includes/class-admin-product.php:399
    12411248#: includes/class-admin-settings.php:307
    12421249msgid "Visible"
    12431250msgstr ""
    12441251
    1245 #: includes/class-admin-product.php:337
    1246 #: includes/class-admin-product.php:346
     1252#: includes/class-admin-product.php:411
     1253#: includes/class-admin-product.php:420
    12471254msgid "Details"
    12481255msgstr ""
    12491256
    1250 #: includes/class-admin-product.php:346
     1257#: includes/class-admin-product.php:420
    12511258msgid "Edit"
    12521259msgstr ""
    12531260
    1254 #: includes/class-admin-product.php:406
     1261#: includes/class-admin-product.php:480
    12551262msgid "(deleted shared tab)"
    12561263msgstr ""
    12571264
    12581265#. translators: %s: library tab title.
    1259 #: includes/class-admin-product.php:442
     1266#: includes/class-admin-product.php:516
    12601267#, php-format
    12611268msgid "Customized from the shared tab “%s”: changes made to the shared tab no longer apply to this product."
    12621269msgstr ""
    12631270
    1264 #: includes/class-admin-product.php:445
     1271#: includes/class-admin-product.php:519
    12651272msgid "Go back to the shared version"
    12661273msgstr ""
    12671274
    1268 #: includes/class-admin-product.php:452
     1275#: includes/class-admin-product.php:526
    12691276msgid "Not translated in this language yet: the shop shows the text of the original language. Type the translation below."
    12701277msgstr ""
    12711278
    1272 #: includes/class-admin-product.php:456
     1279#: includes/class-admin-product.php:530
    12731280msgid "Title"
    12741281msgstr ""
    12751282
    1276 #: includes/class-admin-product.php:461
     1283#: includes/class-admin-product.php:535
    12771284msgid "This content contains code that the visual editor would change (icons, scripts, styles): it opens in the code editor."
    12781285msgstr ""
    12791286
    1280 #: includes/class-admin-product.php:466
     1287#: includes/class-admin-product.php:540
    12811288msgid "Text of the original language"
    12821289msgstr ""
    12831290
    12841291#. translators: %s: anchor such as #tab-shipping.
    1285 #: includes/class-admin-product.php:474
     1292#: includes/class-admin-product.php:548
    12861293#, php-format
    12871294msgid "Direct link to this tab: %s"
    12881295msgstr ""
    12891296
    1290 #: includes/class-admin-product.php:478
    1291 #: includes/class-admin-product.php:518
    1292 #: includes/class-admin-product.php:614
     1297#: includes/class-admin-product.php:552
     1298#: includes/class-admin-product.php:592
     1299#: includes/class-admin-product.php:688
    12931300msgid "Shortcode of this tab"
    12941301msgstr ""
    12951302
    1296 #: includes/class-admin-product.php:500
     1303#: includes/class-admin-product.php:574
    12971304msgid "This shared tab no longer exists. Remove it from the product, or add another one."
    12981305msgstr ""
    12991306
    1300 #: includes/class-admin-product.php:505
     1307#: includes/class-admin-product.php:579
    13011308msgid "Shared content (read only)"
    13021309msgstr ""
    13031310
    1304 #: includes/class-admin-product.php:510
     1311#: includes/class-admin-product.php:584
    13051312msgid "Edit the shared tab"
    13061313msgstr ""
    13071314
    1308 #: includes/class-admin-product.php:513
     1315#: includes/class-admin-product.php:587
    13091316msgid "Customize for this product"
    13101317msgstr ""
    13111318
    1312 #: includes/class-admin-product.php:516
     1319#: includes/class-admin-product.php:590
    13131320msgid "Shared tab: changes made to it apply to every product that uses it. Customize it to change it on this product only."
    13141321msgstr ""
    13151322
    1316 #: includes/class-admin-product.php:521
     1323#: includes/class-admin-product.php:595
    13171324msgid "Added automatically by the “Show on” setting of the shared tab. Uncheck Visible to hide it on this product."
    13181325msgstr ""
    13191326
    1320 #: includes/class-admin-product.php:542
     1327#: includes/class-admin-product.php:616
    13211328msgid "Content of this tab: the description of the product, in the main editor at the top of this screen."
    13221329msgstr ""
    13231330
    1324 #: includes/class-admin-product.php:545
     1331#: includes/class-admin-product.php:619
    13251332msgid "The description is empty: WooCommerce does not show this tab."
    13261333msgstr ""
    13271334
    1328 #: includes/class-admin-product.php:546
     1335#: includes/class-admin-product.php:620
    13291336msgid "Go to the description"
    13301337msgstr ""
    13311338
    1332 #: includes/class-admin-product.php:549
     1339#: includes/class-admin-product.php:623
    13331340msgid "Content made by WooCommerce: the attributes shown on the product page, and the weight and dimensions."
    13341341msgstr ""
    13351342
    1336 #: includes/class-admin-product.php:561
     1343#: includes/class-admin-product.php:635
    13371344msgid "Weight"
    13381345msgstr ""
    13391346
    1340 #: includes/class-admin-product.php:564
     1347#: includes/class-admin-product.php:638
    13411348msgid "Dimensions"
    13421349msgstr ""
    13431350
    1344 #: includes/class-admin-product.php:567
     1351#: includes/class-admin-product.php:641
    13451352msgid "Nothing to show: WooCommerce does not show this tab on this product."
    13461353msgstr ""
    13471354
    1348 #: includes/class-admin-product.php:572
     1355#: includes/class-admin-product.php:646
    13491356msgid "Content of this tab: the customer reviews of the product."
    13501357msgstr ""
    13511358
    1352 #: includes/class-admin-product.php:574
     1359#: includes/class-admin-product.php:648
    13531360msgid "Reviews are off for the whole shop: WooCommerce does not show this tab."
    13541361msgstr ""
    13551362
    1356 #: includes/class-admin-product.php:576
     1363#: includes/class-admin-product.php:650
    13571364msgid "Reviews are off for this product: WooCommerce does not show this tab."
    13581365msgstr ""
    13591366
    1360 #: includes/class-admin-product.php:579
     1367#: includes/class-admin-product.php:653
    13611368msgid "No reviews yet: the tab shows the review form."
    13621369msgstr ""
    13631370
    13641371#. translators: %d: number of reviews.
    1365 #: includes/class-admin-product.php:582
     1372#: includes/class-admin-product.php:656
    13661373#, php-format
    13671374msgid "%d review."
    … …  
    13701377msgstr[1] ""
    13711378
    1372 #: includes/class-admin-product.php:591
     1379#: includes/class-admin-product.php:665
    13731380msgid "What the shop shows (as saved)"
    13741381msgstr ""
    13751382
    1376 #: includes/class-admin-product.php:612
     1383#: includes/class-admin-product.php:686
    13771384msgid "As saved: changes made on this screen show here once the product is updated."
    13781385msgstr ""
    13791386
    1380 #: includes/class-admin-product.php:649
     1387#: includes/class-admin-product.php:723
    13811388msgid "The tabs of this product were not saved: the form was too long for the server (max_input_vars setting of PHP). Your host can raise this limit."
    13821389msgstr ""
    13831390
    1384 #: includes/class-admin-product.php:664
     1391#: includes/class-admin-product.php:738
    13851392msgid "The list of tabs of this product was changed in another language while you were editing it. The texts you typed were saved, but not your changes to the list: check the Tabs panel and make them again."
    13861393msgstr ""
  • prodtabs/tags/0.4.8/prodtabs.php

    r3767626 r3799529  
    44 * Plugin URI:           https://refficience.com/en/prodtabs/
    55 * Description:          Custom product tabs, shared tabs and settings for the WooCommerce tabs, built for multilingual shops. Imports your tabs from Custom Product Tabs (YIKES) in one click.
    6  * Version:              0.4.7
     6 * Version:              0.4.8
    77 * Requires at least:    6.5
    88 * Requires PHP:         7.4
    … …  
    2222defined( 'ABSPATH' ) || exit;
    2323
    24 define( 'PRODTABS_VERSION', '0.4.7' );
     24define( 'PRODTABS_VERSION', '0.4.8' );
    2525define( 'PRODTABS_FILE', __FILE__ );
    2626define( 'PRODTABS_DIR', plugin_dir_path( __FILE__ ) );
  • prodtabs/tags/0.4.8/readme.txt

    r3767626 r3799529  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 0.4.7
     7Stable tag: 0.4.8
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    5151
    5252* **WPML and WooCommerce Multilingual**: a `wpml-config.xml` file is included. The list of tabs is copied to every language; the titles and texts of the tabs are what you translate, tab by tab. Texts are stored by tab, not by position, so reordering tabs does not change them. Tested with WPML 5.2, String Translation and WooCommerce Multilingual 5.7.
    53 * **Polylang**: Polylang reads the same file. The list of tabs stays the same in every language, wherever you change it, and each language keeps its own texts. Tested with Polylang 3.8.
     53* **Polylang**: Polylang reads the same file. The list of tabs stays the same in every language, wherever you change it, and each language keeps its own texts. With Polylang Pro, the tab texts follow the description: "Duplicate content" and the bulk translation "Copy" copy them, synchronized products keep them the same in every language, and machine translation translates them with the rest of the product. Tested with Polylang 3.8, Polylang Pro 3.9 and Polylang for WooCommerce 2.2.
    5454* **Shared tabs** are translated like your posts. A translated product shows the translated shared tab, or the original one until it is translated.
    5555* A text not translated yet shows in the original language instead of disappearing, or stays hidden until it is translated if you prefer. The overview counts the tabs left to translate in each language.
    … …  
    136136= How do I translate tabs with Polylang? =
    137137
    138 Create the translation of the product: its tabs show the texts of the original, marked as not translated, until you type their translation in the Tabs panel. The list of tabs stays the same in every language. Shared tabs are translated in ProdTabs > Shared tabs.
     138Create the translation of the product: its tabs show the texts of the original, marked as not translated, until you type their translation in the Tabs panel. A warning icon next to Tabs in the Product data box tells you that some are left. The list of tabs stays the same in every language. Shared tabs are translated in ProdTabs > Shared tabs. With Polylang Pro, a translation made with "Duplicate content" or the bulk translation "Copy" starts with the texts of the original, like its description, ready to be translated.
    139139
    140140= Does it work with my theme? =
    … …  
    176176
    177177== Changelog ==
     178
     179= 0.4.8 =
     180* Polylang Pro: "Duplicate content", the bulk translation "Copy" and synchronized products now carry the tab texts, like the description.
     181* A tab translated in part (title only, or content only) shows the original text for the missing part, marked as not translated.
     182* Product screen: a warning icon next to Tabs when tabs are left to translate. The panel marks shared tabs without a translation, and tabs without a title or content, which the shop does not show.
     183* Overview: the number of products with tabs updates as soon as tabs are added or removed.
    178184
    179185= 0.4.7 =
  • prodtabs/trunk/assets/css/admin.css

    r3767626 r3799529  
    66        content: "\f163";
    77        font-family: dashicons;
     8}
     9
     10/* Tabs of the product not translated in its language. */
     11#woocommerce-product-data ul.wc-tabs li.prodtabs_options .prodtabs-tab-alert {
     12        width: 16px;
     13        height: 16px;
     14        margin-inline-start: 4px;
     15        color: #996800;
     16        font-size: 16px;
     17        vertical-align: text-bottom;
    818}
    919
  • prodtabs/trunk/assets/js/admin-product.js

    r3762148 r3799529  
    414414        }
    415415
     416        /* Tabs not translated yet: icon next to the panel entry ----------------------------------------------- */
     417
     418        if ( settings.untranslated ) {
     419                $( '#woocommerce-product-data ul.wc-tabs li.prodtabs_options > a' ).append(
     420                        $( '<span class="prodtabs-tab-alert dashicons dashicons-warning" aria-hidden="true"></span>' ).attr( 'title', settings.untranslated ),
     421                        $( '<span class="screen-reader-text"></span>' ).text( settings.untranslated )
     422                );
     423        }
     424
    416425        /* Saving -------------------------------------------------------------------------------------------------- */
    417426
  • prodtabs/trunk/includes/class-admin-hub.php

    r3767626 r3799529  
    161161
    162162        /**
    163          * Tabs not translated yet, by language (Polylang and WPML): tabs of a product whose translation has no text of its
    164          * own, and shared tabs without a published translation. Counted when the overview opens, on the first
     163         * Tabs not translated yet, by language (Polylang and WPML): tabs of a product that a translation shows with a text
     164         * of the original, its own title or content missing (Product_Tabs::with_fallback()), and shared tabs without a
     165         * published translation. Counted when the overview opens, on the first
    165166         * SCAN_LIMIT products of the default language that have tabs.
    166167         *
    … …  
    200201                                        break 2;
    201202                                }
    202                                 $keys = array();
     203                                $local = array();
    203204                                foreach ( (array) get_post_meta( $id, Tabs::META_LAYOUT, true ) as $entry ) {
    204205                                        if ( is_array( $entry ) && 'local' === ( $entry['type'] ?? '' ) && ! empty( $entry['visible'] ) && isset( $entry['key'] ) ) {
    205                                                 $keys[] = (string) $entry['key'];
     206                                                $local[] = $entry;
    206207                                        }
    207208                                }
    208                                 if ( ! $keys ) {
     209                                if ( ! $local ) {
    209210                                        continue;
    210211                                }
     212                                $source = get_post_meta( $id, Tabs::META_TEXTS, true );
     213                                $source = is_array( $source ) ? $source : array();
    211214                                foreach ( Multilingual::translation_ids( $id, 'product' ) as $translation ) {
    212215                                        $lang = Multilingual::post_language( $translation );
    … …  
    214217                                                continue;
    215218                                        }
    216                                         $texts   = get_post_meta( $translation, Tabs::META_TEXTS, true );
    217                                         $missing = count( array_diff( $keys, array_keys( is_array( $texts ) ? $texts : array() ) ) );
     219                                        // Tabs the shop shows with a text of the original filling a missing title or content.
     220                                        $missing = 0;
     221                                        foreach ( Tabs::join( $local, get_post_meta( $translation, Tabs::META_TEXTS, true ) ) as $entry ) {
     222                                                $shown    = Product_Tabs::with_fallback( $entry, $source );
     223                                                $missing += empty( $shown['translated'] ) && ! Product_Tabs::missing( 'title', $shown['title'] ) && ! Product_Tabs::missing( 'content', $shown['content'] ) ? 1 : 0;
     224                                        }
    218225                                        if ( $missing ) {
    219226                                                $counts[ $lang ] = ( $counts[ $lang ] ?? 0 ) + $missing;
  • prodtabs/trunk/includes/class-admin-product.php

    r3762148 r3799529  
    6868                wp_enqueue_script( 'prodtabs-admin-product', PRODTABS_URL . 'assets/js/admin-product.js', $deps, Plugin::asset_version( 'assets/js/admin-product.js' ), true );
    6969                Display::copy_script();
     70                $untranslated = get_the_ID() ? self::untranslated( (int) get_the_ID() ) : 0;
    7071                wp_localize_script(
    7172                        'prodtabs-admin-product',
    7273                        'prodtabsProduct',
    7374                        array(
    74                                 'ajaxUrl'   => admin_url( 'admin-ajax.php' ),
    75                                 'nonce'     => wp_create_nonce( self::NONCE_AJAX ),
    76                                 'productId' => (int) get_the_ID(),
    77                                 'i18n'      => array(
     75                                'ajaxUrl'      => admin_url( 'admin-ajax.php' ),
     76                                'nonce'        => wp_create_nonce( self::NONCE_AJAX ),
     77                                'productId'    => (int) get_the_ID(),
     78                                /* translators: %d: number of tabs. */
     79                                'untranslated' => $untranslated ? sprintf( _n( '%d tab not translated yet', '%d tabs not translated yet', $untranslated, 'prodtabs' ), $untranslated ) : '',
     80                                'i18n'         => array(
    7881                                        /* translators: %s: tab title. */
    7982                                        'moveUp'        => __( 'Move “%s” up', 'prodtabs' ),
    … …  
    209212
    210213        /**
     214         * Visible tabs of a product that the shop shows untranslated in its language: tabs of its own with a text of the
     215         * source or of a shared tab filling a missing title or content, and shared tabs without a published translation in
     216         * it. A tab of its own with texts in other languages only is left out: the shop does not show it in this one.
     217         * Flagged next to the panel entry.
     218         *
     219         * @param int $product_id Product id.
     220         */
     221        private static function untranslated( int $product_id ): int {
     222                $lang    = Multilingual::post_language( $product_id );
     223                $product = '' !== $lang ? wc_get_product( $product_id ) : null;
     224                if ( ! $product ) {
     225                        return 0;
     226                }
     227                $source = self::source_texts( $product_id );
     228                $count  = 0;
     229                foreach ( Product_Tabs::with_auto( Product_Tabs::get( $product_id ), $product ) as $entry ) {
     230                        if ( empty( $entry['visible'] ) ) {
     231                                continue;
     232                        }
     233                        if ( 'local' === $entry['type'] ? 'fallback' === self::fallback_state( $entry, $source ) : ( 'library' === $entry['type'] && self::library_untranslated( (int) $entry['library_id'], $lang ) ) ) {
     234                                ++$count;
     235                        }
     236                }
     237                return $count;
     238        }
     239
     240        /**
     241         * How the shop shows a tab of the product in its language (Product_Tabs::with_fallback()): 'fallback' when a text of
     242         * the source or of a shared tab fills a missing title or content; 'incomplete' when the shop leaves the tab out
     243         * because its title or its content is still missing, a fallback or not; 'other' when the tab has no text in this
     244         * language and nothing to fall back on (texts in other languages only), and the shop leaves it out; '' otherwise
     245         * (its own texts, or a tab without any text saved yet, such as a new one).
     246         *
     247         * @param array $entry  Local entry.
     248         * @param array $source Texts of the source product, by key.
     249         */
     250        private static function fallback_state( array $entry, array $source ): string {
     251                $shown   = Product_Tabs::with_fallback( $entry, $source );
     252                $title   = Product_Tabs::missing( 'title', $shown['title'] );
     253                $content = Product_Tabs::missing( 'content', $shown['content'] );
     254                if ( $title !== $content ) {
     255                        return 'incomplete';
     256                }
     257                if ( $title ) {
     258                        return empty( $entry['translated'] ) ? 'other' : '';
     259                }
     260                return empty( $shown['translated'] ) ? 'fallback' : '';
     261        }
     262
     263        /**
     264         * Whether a published shared tab has no published translation in a language: the shop shows the original.
     265         *
     266         * @param int    $id   Shared tab id stored in the product.
     267         * @param string $lang Language of the product.
     268         */
     269        private static function library_untranslated( int $id, string $lang ): bool {
     270                if ( '' === $lang || ! Library::get_tab( $id ) ) {
     271                        return false;
     272                }
     273                $translation = Multilingual::translation( $id, Library::POST_TYPE, $lang );
     274                return ! $translation || 'publish' !== get_post_status( $translation );
     275        }
     276
     277        /**
    211278         * Texts of the source of a translation, shown to translators as a reference.
    212279         *
    … …  
    287354                        if ( 'library' === $type && ! Library::get_tab( (int) $entry['library_id'] ) ) {
    288355                                $notes[] = __( 'Not published: not shown in the shop.', 'prodtabs' );
     356                        } elseif ( 'library' === $type && self::library_untranslated( (int) $entry['library_id'], (string) $context['lang'] ) ) {
     357                                $notes[] = __( 'Not translated', 'prodtabs' );
    289358                        }
    290359                        if ( ! empty( $entry['auto'] ) ) {
    291360                                $notes[] = __( 'Added automatically', 'prodtabs' );
    292361                        }
    293                         if ( 'local' === $type && empty( $entry['translated'] ) ) {
     362                        $state = 'local' === $type ? self::fallback_state( $entry, $context['source'] ) : '';
     363                        if ( 'fallback' === $state ) {
    294364                                $notes[] = __( 'Not translated', 'prodtabs' );
     365                        } elseif ( 'incomplete' === $state ) {
     366                                $notes[] = __( 'Title or content missing: not shown in the shop.', 'prodtabs' );
     367                        } elseif ( 'other' === $state ) {
     368                                $notes[] = __( '(tab of another language: not shown in this one)', 'prodtabs' );
    295369                        }
    296370                }
    … …  
    448522                        </div>
    449523                <?php endif; ?>
    450                 <?php if ( empty( $entry['translated'] ) ) : ?>
     524                <?php if ( 'fallback' === self::fallback_state( $entry, $context['source'] ) ) : ?>
    451525                        <div class="prodtabs-message prodtabs-message--warning">
    452526                                <p><?php esc_html_e( 'Not translated in this language yet: the shop shows the text of the original language. Type the translation below.', 'prodtabs' ); ?></p>
  • prodtabs/trunk/includes/class-cache-purge.php

    r3762148 r3799529  
    6363                                // The translations of a source show its list and its texts where they have none of their own.
    6464                                self::products( Multilingual::source_product( (int) $object_id ) ? array( (int) $object_id ) : Multilingual::translation_ids( (int) $object_id, 'product' ) );
     65                                if ( Tabs::META_LAYOUT === $meta_key ) {
     66                                        delete_transient( 'prodtabs_products_with_tabs' ); // Count of Admin_Hub::products_with_tabs().
     67                                }
    6568                        }
    6669                        return;
  • prodtabs/trunk/includes/class-multilingual.php

    r3762148 r3799529  
    2929                // After Polylang's own reading of wpml-config.xml (priority 20).
    3030                add_filter( 'pll_copy_post_metas', array( __CLASS__, 'polylang_metas' ), 30, 5 );
     31                add_action( 'pll_post_synchronized', array( __CLASS__, 'polylang_copied' ), 10, 4 );
    3132                add_action( 'add_option_' . Settings::OPTION, array( __CLASS__, 'register_native_titles' ), 10, 2 );
    3233                add_action( 'update_option_' . Settings::OPTION, array( __CLASS__, 'register_native_titles' ), 10, 2 );
    … …  
    115116
    116117        /**
    117          * Metas Polylang copies when a translation is created and keeps synchronized afterwards: the structure, never the
    118          * texts. A new translation has no text of its own: until it is translated, it shows the original as not translated
    119          * (hidden by the "Tabs not translated yet" setting, counted in the overview), as with WPML. A product without
    120          * structure never synchronizes its absence over a translation that has one: Polylang would delete the tabs of every
    121          * language.
     118         * Metas Polylang copies when a translation is created and keeps synchronized afterwards: the structure always, the
     119         * texts (tab texts, shop title) when Polylang copies the description too. A new translation has no text of its
     120         * own: until it is translated, it shows the original as not translated (hidden by the "Tabs not translated yet"
     121         * setting, counted in the overview), as with WPML. With Polylang Pro, "Duplicate content" copies the texts into the
     122         * new translation, and synchronized posts keep them the same in every language. A product without structure never
     123         * synchronizes its absence over a translation that has one: Polylang would delete the tabs of every language.
    122124         *
    123125         * @param string[] $keys Meta keys.
    … …  
    131133                $keys[] = Tabs::META_LAYOUT;
    132134                $keys[] = Library::META_SCOPE; // The same products in every language.
    133                 if ( ! $sync ) {
    134                         // Polylang copies the fields to translate of wpml-config.xml at creation: tab texts and shop title stay out.
    135                         $keys = array_diff( $keys, array( Tabs::META_TEXTS, Library::META_SHOP_TITLE ) );
    136                 }
     135                $texts  = array( Tabs::META_TEXTS, Library::META_SHOP_TITLE );
     136                // Polylang copies the fields to translate of wpml-config.xml at creation, and Polylang Pro all the fields of
     137                // synchronized posts before its reading of wpml-config.xml takes them out.
     138                $keys = self::polylang_copies_texts( (int) $from, (int) $to, (bool) $sync ) ? array_merge( $keys, $texts ) : array_diff( $keys, $texts );
    137139                $keys = array_values( array_unique( $keys ) );
    138140                if ( $sync && $from && $to && ! get_post_meta( (int) $from, Tabs::META_LAYOUT, true ) && get_post_meta( (int) $to, Tabs::META_LAYOUT, true ) ) {
    … …  
    140142                }
    141143                return $keys;
     144        }
     145
     146        /**
     147         * Whether Polylang copies the description of a post to another one: synchronized posts of Polylang Pro (from their
     148         * creation), or a new translation created while "Duplicate content" is on.
     149         *
     150         * @param int  $from Post the metas come from.
     151         * @param int  $to   Post the metas go to.
     152         * @param bool $sync True for the synchronization, false for the copy at creation.
     153         */
     154        private static function polylang_copies_texts( int $from, int $to, bool $sync ): bool {
     155                if ( ! $from || ! $to || ! function_exists( 'PLL' ) ) {
     156                        return false;
     157                }
     158                if ( isset( PLL()->sync_post_model ) && PLL()->sync_post_model->are_synchronized( $from, $to ) ) {
     159                        return true;
     160                }
     161                // Option of Polylang Pro, by post type and by user; its machine translation turns it off while it translates.
     162                $duplicate = $sync ? null : get_user_meta( get_current_user_id(), 'pll_duplicate_content', true );
     163                return is_array( $duplicate ) && ! empty( $duplicate[ get_post_type( $from ) ] );
     164        }
     165
     166        /**
     167         * Copy of a post by Polylang Pro (bulk translation "Copy"): the description is copied once, the texts too.
     168         * Synchronized posts get theirs through polylang_metas().
     169         *
     170         * @param int    $from     Source post.
     171         * @param int    $to       Copy.
     172         * @param string $lang     Language of the copy.
     173         * @param string $strategy copy, or sync for synchronized posts.
     174         */
     175        public static function polylang_copied( $from, $to, $lang, $strategy ): void {
     176                if ( 'copy' !== $strategy || ! in_array( get_post_type( (int) $from ), array( 'product', Library::POST_TYPE ), true ) ) {
     177                        return;
     178                }
     179                foreach ( array( Tabs::META_TEXTS, Library::META_SHOP_TITLE ) as $key ) {
     180                        $value = get_post_meta( (int) $from, $key, true );
     181                        if ( '' === $value || array() === $value ) {
     182                                delete_post_meta( (int) $to, $key );
     183                        } else {
     184                                update_post_meta( (int) $to, $key, wp_slash( $value ) );
     185                        }
     186                }
    142187        }
    143188
  • prodtabs/trunk/includes/class-product-tabs.php

    r3762148 r3799529  
    111111
    112112        /**
    113          * Entries of a product for the shop. Texts missing in the language of the product come from the source product
    114          * (the original with WPML, the default language with Polylang), then from the library tab a tab was customized
    115          * from; a tab with no text anywhere is left out. A translation without a list of its own uses the list of its source.
     113         * Entries of a product for the shop. A title or a content missing in the language of the product comes from the
     114         * source product (the original with WPML, the default language with Polylang); a tab without any text, in its
     115         * language or in the source, shows the library tab it was customized from (with_fallback()). A tab still without a
     116         * title or a content is left out. A translation without a list of its own uses the list of its source.
    116117         *
    117118         * @param int $product_id Product id.
    … …  
    132133                $source_texts = null;
    133134                foreach ( $entries as $i => $entry ) {
    134                         if ( 'local' !== ( $entry['type'] ?? '' ) || ! empty( $entry['translated'] ) ) {
     135                        if ( 'local' !== ( $entry['type'] ?? '' ) || ( ! self::missing( 'title', $entry['title'] ) && ! self::missing( 'content', $entry['content'] ) ) ) {
    135136                                continue;
    136137                        }
    … …  
    140141                                $source_texts = is_array( $source_texts ) ? $source_texts : array();
    141142                        }
    142                         $text = $source_texts[ $entry['key'] ] ?? null;
    143                         if ( is_array( $text ) && '' !== ( $text['title'] ?? '' ) ) {
    144                                 $entries[ $i ]['title']   = (string) $text['title'];
    145                                 $entries[ $i ]['content'] = (string) ( $text['content'] ?? '' );
    146                                 continue;
    147                         }
    148                         $library = ! empty( $entry['origin'] ) ? Library::resolve( (int) $entry['origin'] ) : null;
    149                         if ( $library ) {
    150                                 $entries[ $i ]['title']   = $library['title'];
    151                                 $entries[ $i ]['content'] = $library['content'];
    152                         }
     143                        $entries[ $i ] = self::with_fallback( $entry, $source_texts );
    153144                }
    154145                $entries = Tabs::normalize( $entries );
    155146                return $entries ? Tabs::with_natives( $entries, Settings::get( 'native_order' ) ) : array();
     147        }
     148
     149        /**
     150         * Texts the shop shows for a tab of a product: a title or a content missing in the language of the product comes
     151         * from the source product for this key, field by field. Only a tab without any text, neither saved in its language
     152         * nor in the source, takes the title and the content of the library tab it was customized from: a customized tab
     153         * that lost its title or its content stays without it, and the shop leaves it out. The one rule of the fallback,
     154         * read by the shop, the product screen and the overview.
     155         *
     156         * @param array $entry        Local entry with the texts of the language of the product (see Tabs::join()).
     157         * @param array $source_texts Texts of the source product, by key.
     158         * @return array The entry with the texts the shop shows; 'translated' false when one of them comes from a fallback.
     159         */
     160        public static function with_fallback( array $entry, array $source_texts ): array {
     161                $saved = ! empty( $entry['translated'] ); // Texts saved in the language of the product (Tabs::join()).
     162                $text  = $source_texts[ $entry['key'] ?? '' ] ?? null;
     163                foreach ( array( 'title', 'content' ) as $field ) {
     164                        $value = is_array( $text ) && isset( $text[ $field ] ) && is_scalar( $text[ $field ] ) ? (string) $text[ $field ] : '';
     165                        if ( self::missing( $field, (string) $entry[ $field ] ) && ! self::missing( $field, $value ) ) {
     166                                $entry[ $field ]     = $value;
     167                                $entry['translated'] = false;
     168                        }
     169                }
     170                if ( $saved || ! self::missing( 'title', $entry['title'] ) || ! self::missing( 'content', $entry['content'] ) || empty( $entry['origin'] ) ) {
     171                        return $entry;
     172                }
     173                $library = Library::resolve( (int) $entry['origin'] );
     174                if ( $library ) {
     175                        $entry['title']      = (string) $library['title'];
     176                        $entry['content']    = (string) $library['content'];
     177                        $entry['translated'] = false;
     178                }
     179                return $entry;
     180        }
     181
     182        /**
     183         * Whether a text of a tab is missing: no title to click on, or a content that shows nothing.
     184         *
     185         * @param string $field title or content.
     186         * @param string $value Text.
     187         */
     188        public static function missing( string $field, string $value ): bool {
     189                return 'title' === $field ? '' === trim( $value ) : Tabs::is_blank( $value );
    156190        }
    157191
  • prodtabs/trunk/languages/prodtabs.pot

    r3767626 r3799529  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ProdTabs: Multilingual Product Tabs for WooCommerce 0.4.7\n"
     5"Project-Id-Version: ProdTabs: Multilingual Product Tabs for WooCommerce 0.4.8\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/prodtabs\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-10-26T01:29:16+00:00\n"
     12"POT-Creation-Date: 2026-11-13T01:09:35+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
    … …  
    5050
    5151#: includes/class-admin-hub.php:80
    52 #: includes/class-admin-hub.php:411
     52#: includes/class-admin-hub.php:418
    5353#: includes/class-admin-settings.php:48
    5454msgid "Settings"
    5555msgstr ""
    5656
    57 #: includes/class-admin-hub.php:307
     57#: includes/class-admin-hub.php:314
    5858#: includes/class-admin-import.php:439
    59 #: includes/class-admin-product.php:393
     59#: includes/class-admin-product.php:467
    6060#: includes/class-admin-settings.php:293
    6161msgid "Description"
    6262msgstr ""
    6363
    64 #: includes/class-admin-hub.php:308
     64#: includes/class-admin-hub.php:315
    6565#: includes/class-admin-import.php:440
    66 #: includes/class-admin-product.php:394
     66#: includes/class-admin-product.php:468
    6767#: includes/class-admin-settings.php:294
    6868msgid "Additional information"
    6969msgstr ""
    7070
    71 #: includes/class-admin-hub.php:309
     71#: includes/class-admin-hub.php:316
    7272#: includes/class-admin-import.php:441
    73 #: includes/class-admin-product.php:395
     73#: includes/class-admin-product.php:469
    7474#: includes/class-admin-settings.php:295
    7575msgid "Reviews"
    7676msgstr ""
    7777
    78 #: includes/class-admin-hub.php:406
     78#: includes/class-admin-hub.php:413
    7979msgid "Tabs of each product, tabs shared between products, and the WooCommerce tabs for the whole shop."
    8080msgstr ""
    8181
    82 #: includes/class-admin-hub.php:410
    83 #: includes/class-admin-hub.php:482
     82#: includes/class-admin-hub.php:417
     83#: includes/class-admin-hub.php:489
    8484#: includes/class-admin-library.php:197
    8585#: includes/class-admin-settings.php:262
    … …  
    8787msgstr ""
    8888
    89 #: includes/class-admin-hub.php:418
     89#: includes/class-admin-hub.php:425
    9090msgid "shared tab"
    9191msgid_plural "shared tabs"
    … …  
    9393msgstr[1] ""
    9494
    95 #: includes/class-admin-hub.php:422
     95#: includes/class-admin-hub.php:429
    9696msgid "product with tabs of its own"
    9797msgid_plural "products with tabs of their own"
    … …  
    100100
    101101#. translators: %s: name of the translation plugin.
    102 #: includes/class-admin-hub.php:430
     102#: includes/class-admin-hub.php:437
    103103#, php-format
    104104msgid "language, with %s"
    … …  
    107107msgstr[1] ""
    108108
    109 #: includes/class-admin-hub.php:438
     109#: includes/class-admin-hub.php:445
    110110msgid "product with Custom Product Tabs (YIKES)"
    111111msgid_plural "products with Custom Product Tabs (YIKES)"
    … …  
    113113msgstr[1] ""
    114114
    115 #: includes/class-admin-hub.php:445
     115#: includes/class-admin-hub.php:452
    116116#: includes/class-admin-settings.php:124
    117117msgid "WooCommerce tabs"
    … …  
    119119
    120120#. translators: %s: name of a WooCommerce tab.
    121 #: includes/class-admin-hub.php:451
     121#: includes/class-admin-hub.php:458
    122122#, php-format
    123123msgid "%s (hidden)"
    124124msgstr ""
    125125
    126 #: includes/class-admin-hub.php:456
     126#: includes/class-admin-hub.php:463
    127127msgid "In this order on every product. A product can hide or move a tab."
    128128msgstr ""
    129129
    130 #: includes/class-admin-hub.php:457
     130#: includes/class-admin-hub.php:464
    131131msgid "Rename, hide or reorder"
    132132msgstr ""
    133133
    134 #: includes/class-admin-hub.php:461
     134#: includes/class-admin-hub.php:468
    135135#: includes/class-admin-settings.php:118
    136136#: includes/class-library.php:31
    … …  
    140140msgstr ""
    141141
    142 #: includes/class-admin-hub.php:465
     142#: includes/class-admin-hub.php:472
    143143msgid "None yet. Write shipping or returns once, add them to your products or show them on the whole catalog."
    144144msgstr ""
    145145
    146146#. translators: %d: number of shared tabs.
    147 #: includes/class-admin-hub.php:468
     147#: includes/class-admin-hub.php:475
    148148#, php-format
    149149msgid "%d shared tab"
    … …  
    153153
    154154#. translators: %d: number of shared tabs.
    155 #: includes/class-admin-hub.php:471
     155#: includes/class-admin-hub.php:478
    156156#, php-format
    157157msgid "%d shown on its own by its “Show on” setting"
    … …  
    161161
    162162#. translators: Sentence of the shared tabs card. 1: number of shared tabs, such as "3 shared tabs"; 2: how many of them show on their own, such as "2 shown on their own by their “Show on” setting".
    163 #: includes/class-admin-hub.php:473
     163#: includes/class-admin-hub.php:480
    164164#, php-format
    165165msgid "%1$s, %2$s."
    … …  
    167167
    168168#. translators: Sentence of the shared tabs card. %s: number of shared tabs, such as "3 shared tabs". Only adds the punctuation that ends the sentence.
    169 #: includes/class-admin-hub.php:476
     169#: includes/class-admin-hub.php:483
    170170#, php-format
    171171msgid "%s."
    172172msgstr ""
    173173
    174 #: includes/class-admin-hub.php:483
     174#: includes/class-admin-hub.php:490
    175175msgid "See the list"
    176176msgstr ""
    177177
    178 #: includes/class-admin-hub.php:488
     178#: includes/class-admin-hub.php:495
    179179msgid "Tabs anywhere"
    180180msgstr ""
    181181
    182 #: includes/class-admin-hub.php:489
     182#: includes/class-admin-hub.php:496
    183183msgid "In a page, a page builder, or a theme that does not show the tabs: a shortcode, or the “Product tabs (ProdTabs)” block."
    184184msgstr ""
    185185
    186 #: includes/class-admin-hub.php:491
     186#: includes/class-admin-hub.php:498
    187187msgid "See the shortcodes"
    188188msgstr ""
    189189
    190 #: includes/class-admin-hub.php:494
     190#: includes/class-admin-hub.php:501
    191191msgid "every tab of the product of the page"
    192192msgstr ""
    193193
    194 #: includes/class-admin-hub.php:496
     194#: includes/class-admin-hub.php:503
    195195msgid "the tabs of a product, on any page"
    196196msgstr ""
    197197
    198 #: includes/class-admin-hub.php:498
     198#: includes/class-admin-hub.php:505
    199199msgid "one tab of the product, by its anchor; add title=\"no\" to leave its title out"
    200200msgstr ""
    201201
    202 #: includes/class-admin-hub.php:500
     202#: includes/class-admin-hub.php:507
    203203msgid "a shared tab, on any page"
    204204msgstr ""
    205205
    206 #: includes/class-admin-hub.php:502
     206#: includes/class-admin-hub.php:509
    207207msgid "The shortcode of each tab is ready to copy in the Tabs panel of the product, and on the screen of each shared tab."
    208208msgstr ""
    209209
    210 #: includes/class-admin-hub.php:507
     210#: includes/class-admin-hub.php:514
    211211#: includes/class-admin-settings.php:174
    212212msgid "Languages"
    … …  
    214214
    215215#. translators: %d: number of tabs.
    216 #: includes/class-admin-hub.php:518
     216#: includes/class-admin-hub.php:525
     217#: includes/class-admin-product.php:79
    217218#, php-format
    218219msgid "%d tab not translated yet"
    … …  
    221222msgstr[1] ""
    222223
    223 #: includes/class-admin-hub.php:531
     224#: includes/class-admin-hub.php:538
    224225#: includes/class-admin-settings.php:414
    225226msgid "No translation plugin found. ProdTabs works with WPML, Polylang, TranslatePress and Weglot."
    … …  
    227228
    228229#. translators: %s: name of the translation plugin.
    229 #: includes/class-admin-hub.php:534
     230#: includes/class-admin-hub.php:541
    230231#, php-format
    231232msgid "%s is active: a product and its translations share one list of tabs, and each language keeps its own texts."
    … …  
    233234
    234235#. translators: %s: name of the translation plugin.
    235 #: includes/class-admin-hub.php:537
     236#: includes/class-admin-hub.php:544
    236237#, php-format
    237238msgid "%s is active: tab titles and contents are translated on the page."
    … …  
    239240
    240241#. translators: %d: number of tabs.
    241 #: includes/class-admin-hub.php:548
     242#: includes/class-admin-hub.php:555
    242243#, php-format
    243244msgid "%d tab is not translated yet in one of the languages: it stays hidden there until then."
    … …  
    247248
    248249#. translators: %d: number of tabs.
    249 #: includes/class-admin-hub.php:550
     250#: includes/class-admin-hub.php:557
    250251#, php-format
    251252msgid "%d tab is not translated yet in one of the languages: it shows its original text there until then."
    … …  
    254255msgstr[1] ""
    255256
    256 #: includes/class-admin-hub.php:555
     257#: includes/class-admin-hub.php:562
    257258msgid "Check the setup"
    258259msgstr ""
    259260
    260 #: includes/class-admin-hub.php:560
     261#: includes/class-admin-hub.php:567
    261262msgid "Custom Product Tabs (YIKES)"
    262263msgstr ""
    263264
    264265#. translators: 1: number of products, 2: number of reusable tabs.
    265 #: includes/class-admin-hub.php:566
     266#: includes/class-admin-hub.php:573
    266267#: includes/class-admin-settings.php:446
    267268#, php-format
    … …  
    270271
    271272#. translators: %d: number of products.
    272 #: includes/class-admin-hub.php:568
     273#: includes/class-admin-hub.php:575
    273274#: includes/class-admin-import.php:336
    274275#: includes/class-admin-library.php:110
    … …  
    282283
    283284#. translators: %d: number of reusable tabs.
    284 #: includes/class-admin-hub.php:570
     285#: includes/class-admin-hub.php:577
    285286#: includes/class-admin-settings.php:450
    286287#, php-format
    … …  
    290291msgstr[1] ""
    291292
    292 #: includes/class-admin-hub.php:574
     293#: includes/class-admin-hub.php:581
    293294msgid "The import keeps the order and the links to tabs, and can be undone."
    294295msgstr ""
    295296
    296 #: includes/class-admin-hub.php:577
     297#: includes/class-admin-hub.php:584
    297298msgid "Open the import"
    298299msgstr ""
    299300
    300 #: includes/class-admin-hub.php:592
     301#: includes/class-admin-hub.php:599
    301302msgid "ProdTabs Premium"
    302303msgstr ""
    303304
    304 #: includes/class-admin-hub.php:594
     305#: includes/class-admin-hub.php:601
    305306msgid "FAQ tabs with schema.org FAQPage structured data"
    306307msgstr ""
    307308
    308 #: includes/class-admin-hub.php:595
     309#: includes/class-admin-hub.php:602
    309310msgid "Your tab texts in the content analysis of Yoast SEO and Rank Math"
    310311msgstr ""
    311312
    312 #: includes/class-admin-hub.php:596
     313#: includes/class-admin-hub.php:603
    313314msgid "Shared tabs shown by category, tag or brand"
    314315msgstr ""
    315316
    316 #: includes/class-admin-hub.php:597
     317#: includes/class-admin-hub.php:604
    317318msgid "Add or remove a shared tab on many products at once"
    318319msgstr ""
    319320
    320 #: includes/class-admin-hub.php:598
     321#: includes/class-admin-hub.php:605
    321322msgid "Tab texts translated in a spreadsheet, one column per language"
    322323msgstr ""
    323324
    324325#. translators: Price of the Premium license for one shop. Use the currency of the pricing page the button opens: euros in French (refficience.com/prodtabs/), US dollars in every other language.
    325 #: includes/class-admin-hub.php:603
     326#: includes/class-admin-hub.php:610
    326327msgid "$49 a year for your shop"
    327328msgstr ""
    328329
    329 #: includes/class-admin-hub.php:605
     330#: includes/class-admin-hub.php:612
    330331msgid "Discover ProdTabs Premium"
    331332msgstr ""
    332333
    333 #: includes/class-admin-hub.php:605
    334 #: includes/class-admin-hub.php:622
    335 #: includes/class-admin-hub.php:626
    336 #: includes/class-admin-hub.php:627
    337 #: includes/class-admin-hub.php:628
     334#: includes/class-admin-hub.php:612
    338335#: includes/class-admin-hub.php:629
    339 #: includes/class-admin-hub.php:640
     336#: includes/class-admin-hub.php:633
     337#: includes/class-admin-hub.php:634
     338#: includes/class-admin-hub.php:635
     339#: includes/class-admin-hub.php:636
     340#: includes/class-admin-hub.php:647
    340341#: includes/class-admin-import.php:623
    341 #: includes/class-admin-product.php:167
    342 #: includes/class-admin-product.php:510
     342#: includes/class-admin-product.php:170
     343#: includes/class-admin-product.php:584
    343344#: includes/class-review-ask.php:117
    344345msgid "(opens in a new tab)"
    345346msgstr ""
    346347
    347 #: includes/class-admin-hub.php:612
     348#: includes/class-admin-hub.php:619
    348349msgid "Good to know"
    349350msgstr ""
    350351
    351 #: includes/class-admin-hub.php:614
     352#: includes/class-admin-hub.php:621
    352353msgid "No tracking and no ads in your dashboard."
    353354msgstr ""
    354355
    355 #: includes/class-admin-hub.php:615
     356#: includes/class-admin-hub.php:622
    356357msgid "Your tabs are standard WordPress data. Deactivating or deleting ProdTabs keeps them, unless you ask otherwise in Settings, Uninstall."
    357358msgstr ""
    358359
    359 #: includes/class-admin-hub.php:616
     360#: includes/class-admin-hub.php:623
    360361msgid "Built for WPML and Polylang, and works with TranslatePress and Weglot."
    361362msgstr ""
    362363
    363 #: includes/class-admin-hub.php:617
     364#: includes/class-admin-hub.php:624
    364365msgid "Translated on translate.wordpress.org: each language arrives with the WordPress updates once approved."
    365366msgstr ""
    366367
    367 #: includes/class-admin-hub.php:621
     368#: includes/class-admin-hub.php:628
    368369msgid "ProdTabs is not translated into your language yet. Translate it on translate.wordpress.org: once your translation is approved, write to us and get a one-year ProdTabs Premium license for one site."
    369370msgstr ""
    370371
    371 #: includes/class-admin-hub.php:622
     372#: includes/class-admin-hub.php:629
    372373msgid "Translate ProdTabs"
    373374msgstr ""
    374375
    375 #: includes/class-admin-hub.php:626
     376#: includes/class-admin-hub.php:633
    376377msgid "Plugin page"
    377378msgstr ""
    378379
    379 #: includes/class-admin-hub.php:627
     380#: includes/class-admin-hub.php:634
    380381msgid "Changelog"
    381382msgstr ""
    382383
    383 #: includes/class-admin-hub.php:628
     384#: includes/class-admin-hub.php:635
    384385msgid "Contact support"
    385386msgstr ""
    386387
    387 #: includes/class-admin-hub.php:629
     388#: includes/class-admin-hub.php:636
    388389msgid "Rate ProdTabs"
    389390msgstr ""
    390391
    391 #: includes/class-admin-hub.php:635
    392 #: includes/class-admin-hub.php:638
     392#: includes/class-admin-hub.php:642
     393#: includes/class-admin-hub.php:645
    393394msgid "Support information"
    394395msgstr ""
    395396
    396 #: includes/class-admin-hub.php:636
     397#: includes/class-admin-hub.php:643
    397398msgid "This report helps us answer you: versions, settings, theme, active plugins and the address of the site, with no customer data. The button opens our support form with the report filled in. You see it there, you can leave it out, and it reaches us only when you send your message."
    398399msgstr ""
    399400
    400 #: includes/class-admin-hub.php:640
     401#: includes/class-admin-hub.php:647
    401402msgid "Contact support with this report"
    402403msgstr ""
    403404
    404 #: includes/class-admin-hub.php:641
     405#: includes/class-admin-hub.php:648
    405406msgid "Report copied."
    406407msgstr ""
    407408
    408 #: includes/class-admin-hub.php:641
     409#: includes/class-admin-hub.php:648
    409410#: includes/class-admin-library.php:288
    410411#: includes/class-display.php:161
    … …  
    756757
    757758#: includes/class-admin-import.php:455
     759#: includes/class-admin-product.php:368
    758760msgid "(tab of another language: not shown in this one)"
    759761msgstr ""
    760762
    761763#: includes/class-admin-import.php:460
    762 #: includes/class-admin-product.php:93
    763 #: includes/class-admin-product.php:316
     764#: includes/class-admin-product.php:96
     765#: includes/class-admin-product.php:390
    764766msgid "(no title)"
    765767msgstr ""
    766768
    767769#: includes/class-admin-import.php:462
    768 #: includes/class-admin-product.php:285
     770#: includes/class-admin-product.php:352
    769771msgid "Shared"
    770772msgstr ""
    … …  
    10041006
    10051007#: includes/class-admin-library.php:55
    1006 #: includes/class-admin-product.php:460
     1008#: includes/class-admin-product.php:534
    10071009msgid "Content"
    10081010msgstr ""
    … …  
    11191121
    11201122#. translators: %s: tab title.
    1121 #: includes/class-admin-product.php:79
    1122 #: includes/class-admin-product.php:328
     1123#: includes/class-admin-product.php:82
     1124#: includes/class-admin-product.php:402
    11231125#, php-format
    11241126msgid "Move “%s” up"
    … …  
    11261128
    11271129#. translators: %s: tab title.
    1128 #: includes/class-admin-product.php:81
    1129 #: includes/class-admin-product.php:331
     1130#: includes/class-admin-product.php:84
     1131#: includes/class-admin-product.php:405
    11301132#, php-format
    11311133msgid "Move “%s” down"
    … …  
    11331135
    11341136#. translators: %s: tab title.
    1135 #: includes/class-admin-product.php:83
    1136 #: includes/class-admin-product.php:354
     1137#: includes/class-admin-product.php:86
     1138#: includes/class-admin-product.php:428
    11371139#, php-format
    11381140msgid "Remove “%s”"
    … …  
    11401142
    11411143#. translators: 1: tab title, 2: new position, 3: number of tabs.
    1142 #: includes/class-admin-product.php:85
     1144#: includes/class-admin-product.php:88
    11431145#, php-format
    11441146msgid "“%1$s” moved to position %2$d of %3$d."
    … …  
    11461148
    11471149#. translators: %s: tab title.
    1148 #: includes/class-admin-product.php:87
     1150#: includes/class-admin-product.php:90
    11491151#, php-format
    11501152msgid "“%s” added."
    … …  
    11521154
    11531155#. translators: %s: tab title.
    1154 #: includes/class-admin-product.php:89
     1156#: includes/class-admin-product.php:92
    11551157#, php-format
    11561158msgid "“%s” removed."
    … …  
    11581160
    11591161#. translators: %s: tab title.
    1160 #: includes/class-admin-product.php:91
     1162#: includes/class-admin-product.php:94
    11611163#, php-format
    11621164msgid "Remove the tab “%s”? Its content will be lost when you update the product."
    11631165msgstr ""
    11641166
    1165 #: includes/class-admin-product.php:92
     1167#: includes/class-admin-product.php:95
    11661168msgid "Go back to the shared version? The changes made to this tab on this product will be lost when you update the product."
    11671169msgstr ""
    11681170
    1169 #: includes/class-admin-product.php:94
     1171#: includes/class-admin-product.php:97
    11701172msgid "Something went wrong. Reload the page and try again."
    11711173msgstr ""
    11721174
    1173 #: includes/class-admin-product.php:95
     1175#: includes/class-admin-product.php:98
    11741176msgid "New tab"
    11751177msgstr ""
    11761178
    1177 #: includes/class-admin-product.php:126
     1179#: includes/class-admin-product.php:129
    11781180msgid "This product is a translation: its tabs, their order and their visibility follow the original product. Translate the texts of its own tabs here, or in the translation editor."
    11791181msgstr ""
    11801182
    1181 #: includes/class-admin-product.php:128
     1183#: includes/class-admin-product.php:131
    11821184msgid "Tabs shown on this product, in this order. Drag a tab or use its arrows to move it."
    11831185msgstr ""
    11841186
    1185 #: includes/class-admin-product.php:140
     1187#: includes/class-admin-product.php:143
    11861188msgid "This product only shows the WooCommerce tabs. Add a tab of its own, or a shared tab."
    11871189msgstr ""
    11881190
    1189 #: includes/class-admin-product.php:145
     1191#: includes/class-admin-product.php:148
    11901192msgid "Add a tab"
    11911193msgstr ""
    11921194
    1193 #: includes/class-admin-product.php:157
     1195#: includes/class-admin-product.php:160
    11941196msgid "Add a shared tab"
    11951197msgstr ""
    11961198
    1197 #: includes/class-admin-product.php:158
    1198 #: includes/class-admin-product.php:159
     1199#: includes/class-admin-product.php:161
     1200#: includes/class-admin-product.php:162
    11991201msgid "Add a shared tab…"
    12001202msgstr ""
    12011203
    1202 #: includes/class-admin-product.php:167
     1204#: includes/class-admin-product.php:170
    12031205msgid "Create a shared tab, to use on several products"
    12041206msgstr ""
    12051207
    1206 #: includes/class-admin-product.php:194
     1208#: includes/class-admin-product.php:197
    12071209msgid "Shortcode of all the tabs of this product"
    12081210msgstr ""
    12091211
    12101212#. translators: 1: title of the tab in the shop, 2: name of the library tab.
    1211 #: includes/class-admin-product.php:245
     1213#: includes/class-admin-product.php:312
    12121214#, php-format
    12131215msgid "%1$s (%2$s)"
    12141216msgstr ""
    12151217
    1216 #: includes/class-admin-product.php:280
     1218#: includes/class-admin-product.php:347
    12171219msgid "WooCommerce"
    12181220msgstr ""
    12191221
    1220 #: includes/class-admin-product.php:285
     1222#: includes/class-admin-product.php:352
    12211223msgid "This product"
    12221224msgstr ""
    12231225
    1224 #: includes/class-admin-product.php:288
     1226#: includes/class-admin-product.php:355
    12251227msgid "Not published: not shown in the shop."
    12261228msgstr ""
    12271229
    1228 #: includes/class-admin-product.php:291
     1230#: includes/class-admin-product.php:357
     1231#: includes/class-admin-product.php:364
     1232msgid "Not translated"
     1233msgstr ""
     1234
     1235#: includes/class-admin-product.php:360
    12291236msgid "Added automatically"
    12301237msgstr ""
    12311238
    1232 #: includes/class-admin-product.php:294
    1233 msgid "Not translated"
    1234 msgstr ""
    1235 
    1236 #: includes/class-admin-product.php:313
     1239#: includes/class-admin-product.php:366
     1240msgid "Title or content missing: not shown in the shop."
     1241msgstr ""
     1242
     1243#: includes/class-admin-product.php:387
    12371244msgid "Drag to move"
    12381245msgstr ""
    12391246
    1240 #: includes/class-admin-product.php:325
     1247#: includes/class-admin-product.php:399
    12411248#: includes/class-admin-settings.php:307
    12421249msgid "Visible"
    12431250msgstr ""
    12441251
    1245 #: includes/class-admin-product.php:337
    1246 #: includes/class-admin-product.php:346
     1252#: includes/class-admin-product.php:411
     1253#: includes/class-admin-product.php:420
    12471254msgid "Details"
    12481255msgstr ""
    12491256
    1250 #: includes/class-admin-product.php:346
     1257#: includes/class-admin-product.php:420
    12511258msgid "Edit"
    12521259msgstr ""
    12531260
    1254 #: includes/class-admin-product.php:406
     1261#: includes/class-admin-product.php:480
    12551262msgid "(deleted shared tab)"
    12561263msgstr ""
    12571264
    12581265#. translators: %s: library tab title.
    1259 #: includes/class-admin-product.php:442
     1266#: includes/class-admin-product.php:516
    12601267#, php-format
    12611268msgid "Customized from the shared tab “%s”: changes made to the shared tab no longer apply to this product."
    12621269msgstr ""
    12631270
    1264 #: includes/class-admin-product.php:445
     1271#: includes/class-admin-product.php:519
    12651272msgid "Go back to the shared version"
    12661273msgstr ""
    12671274
    1268 #: includes/class-admin-product.php:452
     1275#: includes/class-admin-product.php:526
    12691276msgid "Not translated in this language yet: the shop shows the text of the original language. Type the translation below."
    12701277msgstr ""
    12711278
    1272 #: includes/class-admin-product.php:456
     1279#: includes/class-admin-product.php:530
    12731280msgid "Title"
    12741281msgstr ""
    12751282
    1276 #: includes/class-admin-product.php:461
     1283#: includes/class-admin-product.php:535
    12771284msgid "This content contains code that the visual editor would change (icons, scripts, styles): it opens in the code editor."
    12781285msgstr ""
    12791286
    1280 #: includes/class-admin-product.php:466
     1287#: includes/class-admin-product.php:540
    12811288msgid "Text of the original language"
    12821289msgstr ""
    12831290
    12841291#. translators: %s: anchor such as #tab-shipping.
    1285 #: includes/class-admin-product.php:474
     1292#: includes/class-admin-product.php:548
    12861293#, php-format
    12871294msgid "Direct link to this tab: %s"
    12881295msgstr ""
    12891296
    1290 #: includes/class-admin-product.php:478
    1291 #: includes/class-admin-product.php:518
    1292 #: includes/class-admin-product.php:614
     1297#: includes/class-admin-product.php:552
     1298#: includes/class-admin-product.php:592
     1299#: includes/class-admin-product.php:688
    12931300msgid "Shortcode of this tab"
    12941301msgstr ""
    12951302
    1296 #: includes/class-admin-product.php:500
     1303#: includes/class-admin-product.php:574
    12971304msgid "This shared tab no longer exists. Remove it from the product, or add another one."
    12981305msgstr ""
    12991306
    1300 #: includes/class-admin-product.php:505
     1307#: includes/class-admin-product.php:579
    13011308msgid "Shared content (read only)"
    13021309msgstr ""
    13031310
    1304 #: includes/class-admin-product.php:510
     1311#: includes/class-admin-product.php:584
    13051312msgid "Edit the shared tab"
    13061313msgstr ""
    13071314
    1308 #: includes/class-admin-product.php:513
     1315#: includes/class-admin-product.php:587
    13091316msgid "Customize for this product"
    13101317msgstr ""
    13111318
    1312 #: includes/class-admin-product.php:516
     1319#: includes/class-admin-product.php:590
    13131320msgid "Shared tab: changes made to it apply to every product that uses it. Customize it to change it on this product only."
    13141321msgstr ""
    13151322
    1316 #: includes/class-admin-product.php:521
     1323#: includes/class-admin-product.php:595
    13171324msgid "Added automatically by the “Show on” setting of the shared tab. Uncheck Visible to hide it on this product."
    13181325msgstr ""
    13191326
    1320 #: includes/class-admin-product.php:542
     1327#: includes/class-admin-product.php:616
    13211328msgid "Content of this tab: the description of the product, in the main editor at the top of this screen."
    13221329msgstr ""
    13231330
    1324 #: includes/class-admin-product.php:545
     1331#: includes/class-admin-product.php:619
    13251332msgid "The description is empty: WooCommerce does not show this tab."
    13261333msgstr ""
    13271334
    1328 #: includes/class-admin-product.php:546
     1335#: includes/class-admin-product.php:620
    13291336msgid "Go to the description"
    13301337msgstr ""
    13311338
    1332 #: includes/class-admin-product.php:549
     1339#: includes/class-admin-product.php:623
    13331340msgid "Content made by WooCommerce: the attributes shown on the product page, and the weight and dimensions."
    13341341msgstr ""
    13351342
    1336 #: includes/class-admin-product.php:561
     1343#: includes/class-admin-product.php:635
    13371344msgid "Weight"
    13381345msgstr ""
    13391346
    1340 #: includes/class-admin-product.php:564
     1347#: includes/class-admin-product.php:638
    13411348msgid "Dimensions"
    13421349msgstr ""
    13431350
    1344 #: includes/class-admin-product.php:567
     1351#: includes/class-admin-product.php:641
    13451352msgid "Nothing to show: WooCommerce does not show this tab on this product."
    13461353msgstr ""
    13471354
    1348 #: includes/class-admin-product.php:572
     1355#: includes/class-admin-product.php:646
    13491356msgid "Content of this tab: the customer reviews of the product."
    13501357msgstr ""
    13511358
    1352 #: includes/class-admin-product.php:574
     1359#: includes/class-admin-product.php:648
    13531360msgid "Reviews are off for the whole shop: WooCommerce does not show this tab."
    13541361msgstr ""
    13551362
    1356 #: includes/class-admin-product.php:576
     1363#: includes/class-admin-product.php:650
    13571364msgid "Reviews are off for this product: WooCommerce does not show this tab."
    13581365msgstr ""
    13591366
    1360 #: includes/class-admin-product.php:579
     1367#: includes/class-admin-product.php:653
    13611368msgid "No reviews yet: the tab shows the review form."
    13621369msgstr ""
    13631370
    13641371#. translators: %d: number of reviews.
    1365 #: includes/class-admin-product.php:582
     1372#: includes/class-admin-product.php:656
    13661373#, php-format
    13671374msgid "%d review."
    … …  
    13701377msgstr[1] ""
    13711378
    1372 #: includes/class-admin-product.php:591
     1379#: includes/class-admin-product.php:665
    13731380msgid "What the shop shows (as saved)"
    13741381msgstr ""
    13751382
    1376 #: includes/class-admin-product.php:612
     1383#: includes/class-admin-product.php:686
    13771384msgid "As saved: changes made on this screen show here once the product is updated."
    13781385msgstr ""
    13791386
    1380 #: includes/class-admin-product.php:649
     1387#: includes/class-admin-product.php:723
    13811388msgid "The tabs of this product were not saved: the form was too long for the server (max_input_vars setting of PHP). Your host can raise this limit."
    13821389msgstr ""
    13831390
    1384 #: includes/class-admin-product.php:664
     1391#: includes/class-admin-product.php:738
    13851392msgid "The list of tabs of this product was changed in another language while you were editing it. The texts you typed were saved, but not your changes to the list: check the Tabs panel and make them again."
    13861393msgstr ""
  • prodtabs/trunk/prodtabs.php

    r3767626 r3799529  
    44 * Plugin URI:           https://refficience.com/en/prodtabs/
    55 * Description:          Custom product tabs, shared tabs and settings for the WooCommerce tabs, built for multilingual shops. Imports your tabs from Custom Product Tabs (YIKES) in one click.
    6  * Version:              0.4.7
     6 * Version:              0.4.8
    77 * Requires at least:    6.5
    88 * Requires PHP:         7.4
    … …  
    2222defined( 'ABSPATH' ) || exit;
    2323
    24 define( 'PRODTABS_VERSION', '0.4.7' );
     24define( 'PRODTABS_VERSION', '0.4.8' );
    2525define( 'PRODTABS_FILE', __FILE__ );
    2626define( 'PRODTABS_DIR', plugin_dir_path( __FILE__ ) );
  • prodtabs/trunk/readme.txt

    r3767626 r3799529  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 0.4.7
     7Stable tag: 0.4.8
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    5151
    5252* **WPML and WooCommerce Multilingual**: a `wpml-config.xml` file is included. The list of tabs is copied to every language; the titles and texts of the tabs are what you translate, tab by tab. Texts are stored by tab, not by position, so reordering tabs does not change them. Tested with WPML 5.2, String Translation and WooCommerce Multilingual 5.7.
    53 * **Polylang**: Polylang reads the same file. The list of tabs stays the same in every language, wherever you change it, and each language keeps its own texts. Tested with Polylang 3.8.
     53* **Polylang**: Polylang reads the same file. The list of tabs stays the same in every language, wherever you change it, and each language keeps its own texts. With Polylang Pro, the tab texts follow the description: "Duplicate content" and the bulk translation "Copy" copy them, synchronized products keep them the same in every language, and machine translation translates them with the rest of the product. Tested with Polylang 3.8, Polylang Pro 3.9 and Polylang for WooCommerce 2.2.
    5454* **Shared tabs** are translated like your posts. A translated product shows the translated shared tab, or the original one until it is translated.
    5555* A text not translated yet shows in the original language instead of disappearing, or stays hidden until it is translated if you prefer. The overview counts the tabs left to translate in each language.
    … …  
    136136= How do I translate tabs with Polylang? =
    137137
    138 Create the translation of the product: its tabs show the texts of the original, marked as not translated, until you type their translation in the Tabs panel. The list of tabs stays the same in every language. Shared tabs are translated in ProdTabs > Shared tabs.
     138Create the translation of the product: its tabs show the texts of the original, marked as not translated, until you type their translation in the Tabs panel. A warning icon next to Tabs in the Product data box tells you that some are left. The list of tabs stays the same in every language. Shared tabs are translated in ProdTabs > Shared tabs. With Polylang Pro, a translation made with "Duplicate content" or the bulk translation "Copy" starts with the texts of the original, like its description, ready to be translated.
    139139
    140140= Does it work with my theme? =
    … …  
    176176
    177177== Changelog ==
     178
     179= 0.4.8 =
     180* Polylang Pro: "Duplicate content", the bulk translation "Copy" and synchronized products now carry the tab texts, like the description.
     181* A tab translated in part (title only, or content only) shows the original text for the missing part, marked as not translated.
     182* Product screen: a warning icon next to Tabs when tabs are left to translate. The panel marks shared tabs without a translation, and tabs without a title or content, which the shop does not show.
     183* Overview: the number of products with tabs updates as soon as tabs are added or removed.
    178184
    179185= 0.4.7 =
Note: See TracChangeset for help on using the changeset viewer.