Can’t translate strings even with .pot file
-
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)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Can’t translate strings even with .pot file’ is closed to new replies.