Plugin Directory

Changeset 3457320


Ignore:
Timestamp:
02/09/2026 05:46:34 PM (8 weeks ago)
Author:
jajasolutions
Message:

Version 2.0.5: Fix bundled translations not loading - use load_textdomain() to preload bundled .mo before WP.org JIT translations

Location:
luxe-gallery/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • luxe-gallery/trunk/includes/class-luxe-gallery-shortcode.php

    r3457310 r3457320  
    267267
    268268        // Single CSS file (includes slider + lightbox styles — no external libraries).
    269         wp_enqueue_style( 'luxe-gallery-public', plugin_dir_url( __FILE__ ) . '../public/css/luxe-gallery-public.css', array(), '2.0.4', 'all' );
     269        wp_enqueue_style( 'luxe-gallery-public', plugin_dir_url( __FILE__ ) . '../public/css/luxe-gallery-public.css', array(), '2.0.5', 'all' );
    270270
    271271        // Single JS file (includes custom slider + lightbox — no jQuery, Swiper, or PhotoSwipe).
    272         wp_enqueue_script( 'luxe-gallery-public-js', plugin_dir_url( __FILE__ ) . '../public/js/luxe-gallery-public.js', array(), '2.0.4', true );
     272        wp_enqueue_script( 'luxe-gallery-public-js', plugin_dir_url( __FILE__ ) . '../public/js/luxe-gallery-public.js', array(), '2.0.5', true );
    273273
    274274        // Pass translatable strings to JavaScript.
  • luxe-gallery/trunk/luxe-gallery.php

    r3457310 r3457320  
    44 * Plugin URI:        https://jajasolutions.de/luxe-gallery
    55 * Description:       Premium gallery with category management - Ideal for real estate, vacation rentals and portfolios. Features customizable hero grid, automatic categorization, WebP optimization and immersive fullscreen view for professional presentations.
    6  * Version:           2.0.4
     6 * Version:           2.0.5
    77 * Author:            Janni Hares
    88 * Author URI:        https://jajasolutions.de
     
    2727
    2828/**
    29  * Load plugin textdomain for internationalization
     29 * Load plugin textdomain for internationalization.
     30 *
     31 * WordPress auto-loads translations from translate.wordpress.org, but newly added
     32 * strings may not exist there yet. We merge our bundled .mo on top so that any
     33 * string missing from WP.org is still translated from the bundled file.
    3034 *
    3135 * @since 1.0.0
     
    3337 */
    3438function luxe_gallery_load_textdomain() {
    35     load_plugin_textdomain( 'luxe-gallery', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     39    $locale = determine_locale();
     40    $mofile = plugin_dir_path( __FILE__ ) . 'languages/luxe-gallery-' . $locale . '.mo';
     41
     42    if ( file_exists( $mofile ) ) {
     43        load_textdomain( 'luxe-gallery', $mofile );
     44    }
    3645}
    3746add_action( 'init', 'luxe_gallery_load_textdomain' );
  • luxe-gallery/trunk/public/css/luxe-gallery-public.css

    r3457310 r3457320  
    22 * Luxe Gallery Frontend Styles - Optimized Build
    33 * Includes custom slider + lightbox styles (replaces Swiper CSS + PhotoSwipe CSS)
    4  * @version 2.0.4
     4 * @version 2.0.5
    55 */
    66
  • luxe-gallery/trunk/public/js/luxe-gallery-public.js

    r3457310 r3457320  
    22 * Luxe Gallery Public JavaScript - Zero-Dependency Optimized Build
    33 * Custom slider (replaces Swiper 151KB) + Custom lightbox (replaces PhotoSwipe 68KB)
    4  * @version 2.0.4
     4 * @version 2.0.5
    55 */
    66
  • luxe-gallery/trunk/readme.txt

    r3457310 r3457320  
    66Tested up to: 6.9
    77Requires PHP: 7.4
    8 Stable tag: 2.0.4
     8Stable tag: 2.0.5
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    156156
    157157== Changelog ==
     158
     159= 2.0.5 =
     160* Fixed translations not working: bundled .mo now loads via load_textdomain() before WP.org JIT translations can override with incomplete data
     161* "Show all X photos" button now correctly displays in German (and other languages)
    158162
    159163= 2.0.4 =
Note: See TracChangeset for help on using the changeset viewer.