RavanH, thanks a lot for sharing your solution. I’ve looking for it several hours.
Here’s the code I added to redirect users to the homepage as well:
if (is_home()) {
$redir = get_settings('home');
} else {
$redir = get_permalink();
}
if (!$user_identity) { ?>
<!-- put text for not logged visitors here -->
<a href="<?php bloginfo('url'); ?>/wp-login.php?redirect_to = echo $redir; ?>">Login</a>
etc.
Then how do we generate a .po file from the JS? I mean, if the strings are gettexted on loading, there’s no file we can use to create the .po and .mo files we need for translation, am I wrong?