Garland gets translated (again!)

Ok so I approached it all wrong last time, I guess you have to learn some how right?

Now I have replaced the translated strings with default wordpress ones, so it should all work nicely.

You can check it out on the garland test blog here. Its running the default lt_LT translation file.

23 Comments

  1. niska on 4th November 2009 at 6:42 am

    Thanks!!

  2. niska on 4th November 2009 at 2:42 pm

    Since switching from Garland to Garland Revisited I’ve noticed that *every page* on my blog is blue for a moment, then it switch colors to the colors that I’ve defined.

    Using Firebug for Firefox I can see that every time a page loads, the page myblog.com/?garland_css=1 is called. If it is possible, would you consider adding some kind of caching to this css file?

    I think the code is in file css.php, in garland_css_colors_css().

    Since the old Garland theme didn’t have this behaviour, I hope that it is possible to fix this issue.

    Thanks!

  3. pross on 4th November 2009 at 6:31 pm

    Ive looked into this, never noticed it before. It seems to be a Internet Explorer only issue, Firefox is not affected.
    It is the background images that actually flash, because they are dynamic php created IE will not cache them, firefox has no issue with this.
    I will look further into it.

  4. niska on 4th November 2009 at 7:16 pm

    I’m using Firefox. It seems to be a cache issue. The server sends “No cache” to the browser – which cause the browser to always get a new copy. This was not a issue in the old Garland theme, so it might be something that you’ve added (or removed?).

  5. niska on 4th November 2009 at 8:34 pm

    I’ve tracked down the problem. I think that there is a problem with the webserver. I’ve contacted the webhotel and they are looking into it.

  6. niska on 5th November 2009 at 12:15 pm

    I’ve now tested the theme and almost all texts are automatically translated. Fantastic! 🙂

    I found some texts in commens.php that are not translated/hardcoded. They should be:

    _e(‘Mail (will not be published)’);
    and
    _e(‘(required)’);

    I’ll tell you if I find anything else.

    Thanks again!

  7. pross on 5th November 2009 at 4:42 pm

    Ive changed them, thx for spotting 🙂
    Is the other problem fixed now?

  8. niska on 5th November 2009 at 6:47 pm

    Not yet. But I think there is a problem with the webserver. I’ll get back to you if it isn’t 🙂

  9. pross on 5th November 2009 at 7:46 pm

    I have fixed the flashing images error!!!!

    Check out the test blog : garland.pross.org.uk

    It loads the same in IE as well as FF 🙂

    It was a headers problem, IE would not cache the images.

    here is a quick fix, i will update the theme soon…

    open garland-image.php find these lines:
    header("Vary: Accept-Encoding"); // Handle proxies
    header("Expires: " . gmdate("D, d M Y H:i:s", time() + 864000) . " GMT"); // 10 days

    replace those lines with:
    $interval = 86400;
    $now = time();
    $pretty_lmtime = gmdate('D, d M Y H:i:s', $now) . ' GMT';
    $pretty_extime = gmdate('D, d M Y H:i:s', $now + $interval) . 'GMT';
    // Backwards Compatibility for HTTP/1.0 clients
    header("Last Modified: $pretty_lmtime");
    header("Expires: $pretty_extime");
    // HTTP/1.1 support
    header("Cache-Control: public,max-age=$interval");

  10. niska on 7th November 2009 at 10:05 pm

    Nice. Thanks!

    http://garland.pross.org.uk/?garland_css=1 seems to be loaded on every page view. Maby this can also be improved?

  11. pross on 8th November 2009 at 6:07 pm

    added the same cache code to css.php but with interval of 3600 (1 hour) and it works.

  12. niska on 8th November 2009 at 9:09 pm

    Didn’t work for me. But my blog is in a subdirectory, and on every pageview there are two requests. The first request goes to

    http://www.domain.com/subdir?garland_css=1

    which redirects to

    http://www.domain.com/subdir/?garland_css=1

    Maby if there were no redirect your solution would work.

  13. pross on 8th November 2009 at 9:21 pm

    ok, functions.php line 257 chage it to:
    [php] echo ‘@import url(‘ . get_bloginfo(‘wpurl’) . ‘/?garland_css=1);’;[/php]
    try that.

  14. niska on 9th November 2009 at 7:17 am

    Thanks! No more redirect. You should be able to make that change in your plugin. According to http://codex.wordpress.org/Function_Reference/get_bloginfo
    “Note that directory URLs are missing trailing slashes. “

    It didn’t solve the cache problem though. I have to investigate futher. I still think that there is a problem with the webserver. I’ve checked http://garland.pross.org.uk and there it is working… Strange.

  15. pross on 9th November 2009 at 12:39 pm

    Can you give me a link so i can see whats happening?

  16. niska on 12th November 2009 at 8:24 pm

    Sorry. It’s not public. But there is a problem with the webserver. Not your theme.

    I would recommend you to run the Page Speed Firefox extension by Google. They have several recommendations on how to improve your theme:
    http://code.google.com/intl/en-US/speed/page-speed/

    • pross on 15th November 2009 at 10:50 pm

      The test page has a new ‘test’ version now, it scores much better with the page-speed plugin.

      • Kia on 16th November 2009 at 8:06 am

        Nice! Will you release a new version soon?

  17. pross on 16th November 2009 at 12:28 pm

    yes, couple of days needed first though.

  18. pross on 18th November 2009 at 8:44 pm

    latest has been released early due to a bug, suggest you upgrade, next version will support 2.9 and post image thumbnails, its already running on the test blog.

  19. Kia on 19th November 2009 at 12:43 pm

    Thanks! You’re fast! I’ve installed the update and everything is working very good. I’ll try the new image in the header soon.

    Looking forward to post image thumbnails!

  20. Kia on 19th November 2009 at 5:38 pm

    The “next” link in single.php isn’t right aligned. I’ve tried this in FF, IE and Chrome. I’m using the latest version.

    / Kia

  21. pross on 19th November 2009 at 6:04 pm

    It was commented out in the stylesheet!
    open style.css and find

    /*
    .alignleft {
    float: left;
    }
    .alignright {
    float: right;
    }
    */

    replace with

    .alignleft {
    float: left;
    }
    .alignright {
    float: right;
    }

Leave a Comment