The MU forums have moved to WordPress.org

Where is.. (10 posts)

  1. Konstan
    Member
    Posted 17 years ago #

    ...the blog description string in the php files? The one that says Just another XXXXX weblog ???

    I have it translated via .mo file, but its not translating. Plus, I want to change what it says but I cant seem to find the instance where this is inserted when the blog is created. I've looked at wpmu-functions.php, wp-signup.php and wp-register.php and cant find anything.

    Maybe I'm going blind or something.

  2. dsader
    Member
    Posted 17 years ago #

    add_option('blogdescription', __('Just another ' . $current_site->site_name . ' weblog'), __('Short tagline'));
    from upgrade-schema.php line 239

  3. Konstan
    Member
    Posted 17 years ago #

    Ah, thanks. I had a look at that file and I guess I didnt do a proper search for the terms.

    Seems like it should be translating, since the text is in __(), but it doesnt.

    Why is it in the upgrade-schema file? Does a new blog signup use that?

  4. zappoman
    Member
    Posted 17 years ago #

    Konstan,

    To answer your question, yes, that string is only used at the time of creation of a blog. So for example when the blog is first created. After that it is stored in the DB in the [wp_][X]_options table... where [wp_] is whatever you set your table prefix to and [X] is the blog ID. This is settable by the user through their dashboard/blog settings.

    I would expect that if you translated it, then it would change for new blogs, but not previously created blogs.

  5. Konstan
    Member
    Posted 17 years ago #

    Its not translating it ;)

  6. drmike
    Member
    Posted 17 years ago #

    Um, how would it be translatable? It's different for every blog. Or am I missing something here?

  7. Konstan
    Member
    Posted 17 years ago #

    Well, that line supposedly gets inserted when a new blog is created. The line does appear in the .mo file, but it wont translate when inserted.

    Doesnt really matter, I just edited the text.

  8. drmike
    Member
    Posted 17 years ago #

    OK, I understand now. The translation occurs with output to the browser. The system doesn't translate text when it's going in and out of the database.

  9. Konstan
    Member
    Posted 17 years ago #

    I thought it did. Everyday I learn more about mu :P

    PD: you never sent me the script :P

  10. zappoman
    Member
    Posted 17 years ago #

    Hey, I will admit that I'm not super skilled in the details of translation... but this question really had me scratching my head. After reading the wordpress codex docs on translating, I was like "WOW these guys are real pros, this is great stuff..." (no I'm not really that surprised, just pleased), Anyway it should work. So it doesn't make sense that this wouldn't be translated.

    Then I looked at the code in populate_options() again... and I think I know what the problem is.

    I don't have time to research this completely and fix it, but Konstan, if you are already translating this then you may want to go in and offer a patch to the following (what I suspect) is a bug...

    On line 231 of upgrade-scheme.php the code says...

    
    add_option('blogdescription', __('Just another ' . $current_site->site_name . ' weblog'), __('Short tagline'));
    

    Ok, so I think the reason it's not translating is that... __('Just another ' . $current_site->site_name . ' weblog') gets turned into 'Just another Foo-foo-blah-blah weblog'. Where Foo-foo-blah-blah is whatever your main site name is.

    This then gets passed as the main lookup string for translation, which of course, you don't have in your .po or your .mo file.

    So probably, the intent is for this to be implemented as a parameterized string where a replacement occurs.

    I suspect that this bug has never been found because as Dr. Mike points out, it's really obscure since the eventual goal is that the user would replace this string with their own tag line. Although note that probably 40% of the blogs on the largest wordpressmu site (wordpress.com) still say "Just another Wordpress.com blog"... so we may be giving users a little too much credit.

    Anyway, Konstan, good luck in working on your translation... and if you really want to fix this particular nuance, then I'm sure this is likely the problem.

    Question for the Moderator: What is the correct way of handling a situation like this? Should I post a bug on trac?

About this Topic

  • Started 17 years ago by Konstan
  • Latest reply from zappoman