WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Codestyling Localization] Translation of themes defect? (14 posts)

  1. C. Michael Mette
    Member
    Posted 4 years ago #

    I really like the plugin, but...

    ...after updating to WP 2.9 the translation of themes is not reachable. I only can translate WordPress and Plugins, if I try to klick on Themes I get the following error message:

    Warning: file_get_contents(/www/htdocs/w00991e6/zuchtschau/wp-content/www/htdocs/w00991e6/zuchtschau//themes/classic/sidebar.php) [function.file-get-contents]: failed to open stream: No such file or directory in /www/htdocs/w00991e6/zuchtschau/wp-content/plugins/codestyling-localization/codestyling-localization.php on line 489

    Can someone help me.

    http://wordpress.org/extend/plugins/codestyling-localization/

  2. yinyinlezinzin
    Member
    Posted 4 years ago #

    I've got the same problem and didn't found any solution at the time.

    Maybe a theme API in WordPress?

  3. faustao
    Member
    Posted 4 years ago #

    I have the same problem and also no localization works for plugins on WP 2.9.

  4. OlafB
    Member
    Posted 4 years ago #

    Hi,
    I have hacked all PATH to work codestyling-localization. Then I generate a new translation (de_DE.mo) nothing works :(
    I think now a false format of the *.mo files are written from the Plugin.

    Have yesterday send a mail to Heiko Rabe, nothing return. What is to do?

    Thanks and sorry for my stupid english....

  5. anmari
    Member
    Posted 4 years ago #

    Hi guys, I spent quite a bit of time on this too.

    As far as I could tell wordpress no longer loads mo files produced by this plugin (as of 2.9) - it will load a mo file produced by poedit.

    So am i trying to learn poedit, but struggling - it seems to "break" easily - broken catalog files etc when it produced the file.

    Please someone fix this plugin or find out why wordpress will not load it's mo files!

  6. Stefan
    Member
    Posted 4 years ago #

    I'm having the same problems. I like this plugin a lot, because it helped me translating lots of plugins to german.
    As can be seen in the error-message, the path to the themes-directory is somehow doubled.
    At least for me this error only occurs within the themes part (not within the plugin- or wordpress-part)
    Hopefully there will be a solution.

    I managed to avoid those warnings (in the admin-section) by replacing
    $dn = dirname(str_replace("\\","/",WP_CONTENT_DIR).str_replace('wp-content', '', $values['Template Files'][0]));
    with
    $dn = dirname($values['Template Files'][0]);

    and
    $main = file_get_contents(WP_CONTENT_DIR.str_replace('wp-content', '', $themefile));
    with
    $main = file_get_contents($themefile);

    But this didn't help to get the theme-translations back. As you can see on http://www.vergleiche-deine-versicherung.de
    (there is still some english/german confusion)

    Best regards.

    By the way: I don't think this plugin generates wrong .mo files. I didn't touch thoses files and the plugin stopped working after upgrading to wp 2.9

  7. salava
    Member
    Posted 4 years ago #

    The same problem here. For all themes and files on standard Linux webhosting I got

    Warning: file_get_contents(/<my-wp>/wp-content/<my-wp>/themes/<theme>/<file>.php) [function.file-get-contents]: failed to open stream: No such file or directory in /<my-wp>/wp-content/plugins/codestyling-localization/codestyling-localization.php on line 489

    where <my-wp> is absolute path to directory with wp installtion.

    On my local AMAHI server [see amahi.org - based on Fedora 12] where the directories structure is not standard I had no warning but no functionality too.

    BTW: Plugin generates good .mo/.po files - I moved .mo file from my theme to one of plugins folder try to edit it and move back and it works.

  8. anmari
    Member
    Posted 4 years ago #

    Are the changes in 2.9 - removed gettext and "merged" pomo reader - (whatever that may mean? ), causing the problems?

    It appears to be a 2.9 problem?

  9. jheu
    Member
    Posted 4 years ago #

    Hi folks! I have the same problem mentioned above. To me it looks like an incompatability of the .mo-files generated by codestyling-localization which do not seem to be readable by WP2.9.

    I re-compiled my .po-file (that is de_DE.po in my case) with poEdit and uploaded the resulting .mo-file (de_DE.mo in my case) to my webspace. It worked!

    Maybe this workaround is helpful for some of you, let's hope for an update of this nice plug-in!

    cu, Juergen

  10. jheu
    Member
    Posted 4 years ago #

    Today there was an update for codestyling-localization and after (automatic) update everything was fine again. Thank you for your work, Heiko (?).
    regards, Juergen

  11. codestyling
    Member
    Posted 4 years ago #

    Hi all,
    the problem has been repaired and the bugfix has been published with version 1.94 now.
    The reason of this problem is a behavior change at WordPress internal core because the management of theme files has been changed signific! Formally in WP versions below 2.9 the theme management stores the theme related files with relative path names (relative to wp-content dir). But with version WP 2.9 the files will be internally collected and stored with the full qualified path. That's why the theme analysis didn't work any longer. The patch now works with older and also new WP 2.9 version.

    Thanks and have fun

  12. C. Michael Mette
    Member
    Posted 4 years ago #

    Happy New Year 2010
    and many thanks for the problem-solving!!!
    I will update all my other weblogs immediately.

  13. Unsal Korkmaz
    Member
    Posted 4 years ago #

    today installed WPmu 2.9.1
    ehm.. got that problem in wpmu.. still

  14. codestyling
    Member
    Posted 3 years ago #

    Currently WP 3.0 will not be identified as MU version even if it is one.
    This is caused by the fact, that the global MU version identifier not longer exists as it does for former MU version.
    That's why the plugin not longer shows mu-plugins as valid translation source. This will be repaired soon with the next version (probaly with 1.97)

Topic Closed

This topic has been closed to new replies.

About this Topic