Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi,

    you can change it through this code (place it in functions.php file of your theme) :

    //Change login errors
    add_filter('login_errors', create_function('$a', "return '<b>Error:</b> Invalid Username or Password';"));

    Found here :

    And it worked for me πŸ™‚

    Thread Starter guigro

    (@guigro)

    That’s right, and it’s not possible to add a string in the po file.

    My suggestion would be to use a string you don’t need or to copy the file where “Published by” is in your child theme and then change it in the code.

    Regards,

    Thread Starter guigro

    (@guigro)

    Hi m4j4,

    in my opinion, if there is no “Published by” in the pho.pot file, then you have to add it at the end, be sure to write exactly what’s in your code (‘Published by’) and then translate it.

    This should work.

    If not, please provide me a link and admin access so I can check it out.

    Regards,
    Guillaume

    Thread Starter guigro

    (@guigro)

    Hello Trajan,

    Sorry I use a plugin for comments so I don’t have this issue.

    I noticed that in comments.php file on line 29 you have those strings :
    printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'pho' ),

    So if you translated the whole file, it should work.
    If not, may you send me the address of the website so I can check it ?

    Thanks,

    Thread Starter guigro

    (@guigro)

    DONE !

    To apply the changes to “Posted on %s” and “by %s” you made in your translation files, go to the inc/template-tags.php file and change :

    Line 96 :
    _x( 'Posted on %s', 'post date', '_s' ),

    To : __( 'Posted on %s', 'pho' ),

    And line 101 :
    _x( 'by %s', 'post author', '_s' ),

    To : __( 'by %s', 'pho' ),

    Thread Starter guigro

    (@guigro)

    I MADE IT !

    Ok so there are the steps :

    In functions.php change this line (33) :
    load_theme_textdomain( 'pho', get_template_directory() . '/languages' );

    To :
    load_theme_textdomain( 'pho', get_stylesheet_directory() . '/languages' );

    This will tell your theme to search in the template folder you’re using to check for the file in your language (useful if you use a child theme).

    Then in you theme (or child theme), put your translations in the /languages/ directory.
    And name them with the default localization system, ie :
    en_US.po & en_US.mo
    fr_FR.po & fr_FR.mo

    or whatever your language is.

    Be careful ! If you think it doesn’t work, it’s because the “Posted on” and “by” from the mansory meta tags are not translated.

    I found that what is not translated is :
    _x( 'Posted on %s', 'post date', '_s' ),
    and things like that.

    I’ll continue to resolve this last issue !

    Thread Starter guigro

    (@guigro)

    I tried today to install it on another WordPress install I have on another server…

    Sorry but still the same issue. It’s not working, like if my translation didn’t exists.

    Thread Starter guigro

    (@guigro)

    Dying with that.

    I tried to have the same process to translate TwentyFourteen theme, and it worked like a charm ! :/

    In pho.pot file, the name of the project is Fanciest Author Box, but I don’t think at all it’s the issue.

    Will continue my investigation…

    Thread Starter guigro

    (@guigro)

    Thread Starter guigro

    (@guigro)

    Sorry but it still don’t work :/
    I also tried to upload all of these files with no success.

    And tried to desactivate all plugins and still the same issue.

    Oh and at the very beginning I tried to name my file fr_FR.po and fr_FR.mo

    So weird it don’t work :/
    And the less I fond a clue the more I think I’m really gonna look dumb when we’ll find out :p

    And I just tried from scratch (I unzipped the theme, changed the name from pho.pot to pho.po and made the translation again) : not working :'(

    Of course, once it will work I will give you the translation to implement in next updates πŸ˜‰

    Thread Starter guigro

    (@guigro)

    Thanks for your answer,

    As you can see on the following screenshots :

    – My WP Admin panel with language (WordPress 4.0) :
    http://hpics.li/d0d02b4

    – My config.php file :
    http://hpics.li/95be298

    – My two pho.pot and pho-fr_FR.po files :
    http://hpics.li/0f002c7

    – And the structure of my folder (I did the same in my original pho folder and in my child theme folder) :
    http://hpics.li/e5e5c80

    I’m sure it must be a dumb things -_- but I feel like I tried everything πŸ™‚

    Thanks a lot for your help !

    Regards,
    Guillaume

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