The MU forums have moved to WordPress.org

problem with translation (8 posts)

  1. arturo84
    Member
    Posted 14 years ago #

    hi, i've translated mu 2.7.1, all is ok but when i see the plugins page site.com/wp-admin/plugins.php i see this error message:

    on the top:

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /.../html/wp-admin/includes/mu.php(542) : runtime-created function on line 1

    and after "hi admin! you are ... ":

    Warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, '' was given in /.../html/wp-includes/plugin.php on line 339

    i've checked the po and mo but i don't know what's wrong... please help me...

    Thanks

    Arturo.

  2. arturo84
    Member
    Posted 14 years ago #

    sorry for the up, but i really need help... thanks!

  3. cafespain
    Member
    Posted 14 years ago #

    I don't think many of us have done much translation work, which is probably why you aren't getting much help here.

    It may be worth walking through the source of the plugins page and checking your entry for each of the translatable items and look for strange encoding items.

  4. arturo84
    Member
    Posted 14 years ago #

    i've seen the source but at the line number no string to translate...

    i'm waiting for help... thanks

  5. prefonty
    Member
    Posted 14 years ago #

    arturo84, did you ever find any clues as to how to fix this issue?
    I have the very same situation.

    Thanks
    Yanik

  6. prefonty
    Member
    Posted 14 years ago #

    I found out how to rid myself of these messages.

    Under Site Admin/Options, at the very bottom of the page, make sure you have Plug-ins checked (or in my case since it was in French: Extensions had to be checked)

    Then go back and check for the errors, for me they had disappeared.

    Hope this helps.

    Yanik

  7. yannux
    Member
    Posted 14 years ago #

    Line 540 at wp-admin/includes/mu.php :
    $message = __( 'The plugins page is not visible to normal users. It must be <a href="wpmu-options.php#menu">activated</a> first.' );

    Add escaping char \ resolve the error and display the good message !

    $message = __( 'The plugins page is not visible to normal users. It must be <a href=\"wpmu-options.php#menu\">activated</a> first.' );

    But I can say what the real problem, po file compilation ?
    The .po have escaping \ in this msgid ....

  8. yannux
    Member
    Posted 14 years ago #

    It seems that in the create_function some caracter of $message need to be escaped...

    With some languages there is simple quote in the translated string...

    So when PPH parse the create_function line, it look like :

    add_action('admin_notices', create_function( '', "echo 'La page "Extensions" n'est pas visible pour les utilisateurs classiques. Vous devez précédemment l'activer depuis la page de réglages du site.';" ) );

    Simple quote inside simple quoted string...

About this Topic