• Resolved ghofrani

    (@ghofrani)


    Hello,

    Please if possible We need help to solve this :

    When We try to translate the “Future” String in the post-expirator.po file using loco translate extension, The setting menu page of future pro , does not load completely .
    A pre-loader screen is shown instead .

    Extension Version : publishpress-future-pro-4.8.2
    WordPress Version : WP Persian 6.8.2
    Loco Translate Version : Loco Translate 2.7.2
    Server : xampp PHP 8.1.25

    Thanks
    Saeed Ghofrani Jahromi

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ghofrani

    (@ghofrani)

    Hello,

    Please we want help to solve this :

    We have tested the free version from version 4.8.2 up to version 4.0.1 and the problem still exist .

    Thanks
    Saeed Ghofrani Jahromi

    Thread Starter ghofrani

    (@ghofrani)

    Hello,

    Please if possible we need help for :

    When we change the ‘Future’ to ‘future’ , then the plugin works too .
    But when we change it to any other string , like : ‘Future Pro’ , then the plugin setting page stop working .

    wp-content\plugins\publishpress-future-pro\lib\vendor\publishpress\publishpress-future\src\Modules\Expirator\Controllers\ScheduledActionsController.php

    line : 119

    add_menu_page(
    ('PublishPress Future', 'post-expirator'), ('Future Pro', 'post-expirator'),
    'manage_options',
    'publishpress-future',
    [\PostExpirator_Display::getInstance(), 'future_actions_tabs'],
    'dashicons-clock',
    74
    );

    The Code above , does not work properly . The preloader is shown instead of the settings page .

    Thanks
    Saeed Ghofrani Jahromi

    • This reply was modified 9 months ago by ghofrani. Reason: Adding Edit Code Line
    Thread Starter ghofrani

    (@ghofrani)

    Fallback Translation Strategy (with UIpress)
    Add this JavaScript snippet to your WordPress admin via a custom plugin, theme functions.php, or using a plugin like Code Snippets:

    add_action('admin_footer', function () {
    ?>
    <script>
    document.addEventListener('DOMContentLoaded', function () {
    // Look for any menu item that contains the word "Future"
    const menuItems = document.querySelectorAll('.wp-menu-name, .uip-menu-name, .uip-text');

    menuItems.forEach(item => {
    if (item.textContent.trim() === 'Future') {
    item.textContent = 'آینده'; // Replace with your translated label
    }
    });
    });
    </script>
    <?php
    });

    🧠 Why This Works

    • ✅ It runs after the admin page loads, ensuring UIpress has rendered its custom menu.
    • ✅ It searches for multiple possible class names (.wp-menu-name, .uip-menu-name, .uip-text) to cover both default WordPress and UIpress layouts.
    • ✅ It replaces only the visible label, not the internal slug—so the plugin logic remains intact.
    Plugin Author Steve Burge

    (@stevejburge)

    Hi @ghofrani. Thanks for using PublishPress.

    Sorry, we’re not allowed provide support for the Pro version of plugin here on the WordPress forums: https://ww.wp.xz.cn/support/guidelines/#do-not-post-about-commercial-products

    Please open a support ticket on our site.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Future Plugin Name Translation Problem’ is closed to new replies.