• Resolved Anonymous User 18362049

    (@anonymized-18362049)


    Hi, I’ve noticed that I can’t translate label strings because of lack of a default fallback string for labels.

    Inside public/class-fsl-public.php I see this:

    $title = isset($bar_options['title']) ? $bar_options['title'] : '';
    $description = isset($bar_options['description']) ? $bar_options['description'] : '';

    But with these, if I delete strings in the plugin admin page (title, description), I can’t translate the default string. Could you replace the 2 lines above with these:

    $title = (isset($bar_options['title']) && trim($bar_options['title']) !== '') ? $bar_options['title'] : __('Free delivery on orders over {free_shipping_amount}', 'free-shipping-label-pro');
    $description = (isset($bar_options['description']) && trim($bar_options['description']) !== '') ? $bar_options['description'] : __('Add at least {remaining} more to get free shipping!', 'free-shipping-label-pro');

    Or something like that?
    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marin Matosevic

    (@marinmatosevic)

    Hi,

    thank you for your suggestion. This is already implemented in 2.0.1. version that will be released next week.

    Best regards

    Thread Starter Anonymous User 18362049

    (@anonymized-18362049)

    Thank you! I’ll wait for the new release!

    Plugin Author Marin Matosevic

    (@marinmatosevic)

    New version is released.
    We added a “multilingual” option to switch to custom translations.

    Best regards

    Thread Starter Anonymous User 18362049

    (@anonymized-18362049)

    Thank you, I’ll implement it as soon as possible.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t translate strings even with .pot file’ is closed to new replies.