• I found strange bug Some of the text were not getting translated, so I dug into code and found where the problem was happening exactly:
    class-theme-my-login-template.php line 153

    $title = get_post_field( ‘post_title’, $page_id );

    this title never gets translated. simple solution is to pass it for translation:

    $title = __( get_post_field( ‘post_title’, $page_id ) , ‘theme-my-login’ );

    Though didn’t dig too deep into mechanics to know if this is proper fix;

    https://www.ads-software.com/plugins/theme-my-login/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    That will not work – at least not with PO/MO files.

    Thread Starter untanyz

    (@untanyz)

    Why not? As far as I tested it worked fine.
    Without this in profile page “Log In” and “Log Out” string don’t get translated.
    What would be proper fix? As far as I understand those string are fetched from database, and later passed through “tml_title” filter with only translates “Active” string, maybe include other page translations there too?
    Though I do not understand purpose of these mechanics.

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Because PO files must contain literal strings. You can’t translate a variable.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translation post_tile bug’ is closed to new replies.