Support » Plugins » [Plugin: Codestyling Localization] Translation of themes defect?

  • Resolved C. Michael Mette


    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.

Viewing 13 replies - 1 through 13 (of 13 total)
  • I’ve got the same problem and didn’t found any solution at the time.

    Maybe a theme API in WordPress?

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

    I have hacked all PATH to work codestyling-localization. Then I generate a new translation ( 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….

    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!

    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]));
    $dn = dirname($values['Template Files'][0]);

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

    But this didn’t help to get the theme-translations back. As you can see on
    (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

    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 – 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.

    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?

    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 ( 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

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

    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

    Thread Starter C. Michael Mette


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

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



    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)

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: Codestyling Localization] Translation of themes defect?’ is closed to new replies.