Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

Feature request: Multi-Language-Support

#41

Hey, I searched a file where I can edit the language.

am I right, that the text-strings are in the files without any variables?

Would it help if I add a new folder wp-content/language/ and set variables (like $text_greeting) into the files where text-strings are and include a language.php (include 'wp-content/language/language.php';) to every file?

So it would be possible to make omb multilangual ;)

Or do you have other plans for this?

Reported by Johannes Schirge · May 5th, 2009 @ 12:52 AM

State: resolved
Milestone: 0.6

Activity

  1. Brian Jesse Hendrickson
    Brian Jesse Hendrickson
    • State changed from new to open

    Yes, that would be great! I totally support any approach because right now there is none :-)

    In addition to the wordpress theme there are templates for omb pages down this path /app/omb/views and /app/omb/views/posts and /app/omb/views/identities

    Eventually I want to create database-driven/dynamic translation so that users can create new translations while using omb.

    May 5th, 2009 @ 02:01 AM

  2. Johannes Schirge
    Johannes Schirge

    I tried database-driven/dynamic translation. My approach was not bad, but I wasn't able to realize it. Not enough skills for that ^^

    If it's okay I'll create a text-based translation. The beginning looks promising ;-)

    May 5th, 2009 @ 01:13 PM

  3. Johannes Schirge
    Johannes Schirge

    Okay, here is the first preview. I changed the theme p2 and the folders you said.

    But there are many more variables left and I didn't understand the structure completely.

    in /wp-content/language/lang_chooser.php you can edit the selected language with $language_selected.

    May 5th, 2009 @ 05:24 PM

  4. Brian Jesse Hendrickson
  5. Brian Jesse Hendrickson
    Brian Jesse Hendrickson
    • State changed from open to resolved

    thanks a lot, Shen, I've just committed this to the master branch.

    I created this patch, and applied it to my latest SVN version without a problem. I haven't committed to GitHub yet.

    there could be trouble when you pull updates from my git, because I didn't actually do a PULL from your repo. (I created a patch that applied your changes and used that)

    however, Git is pretty smart and I bet it will successfully figure out where to put all the hunks and which ones have already been applied.

    I am attaching the patch, here is how I applied it:

    git clone git://github.com/voitto/openmicroblogger.git

    mv openmicroblogger omb

    patch -p0 < Shenlang.diff

    May 8th, 2009 @ 12:21 AM

  6. Johannes Schirge
    Johannes Schirge

    Hey, I downloaded and extracted the patch to my gid-omb-folder.

    I only entered patch -p0 Shenpatch.diff and got an error message (attached).

    Do I always have to enter git clone git@github.com:Shen/openmicroblogger.git to sync my local-folder with the source-folder?

    or is there a possibility to update from souce?

    Am I right that git pull origin master pulls my personal git and not the main source?

    May 8th, 2009 @ 05:04 AM

  7. Brian Jesse Hendrickson
    Brian Jesse Hendrickson
    • State changed from resolved to open

    let me think about this for a minute

    May 8th, 2009 @ 04:38 PM

  8. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    you can do this

    git pull git://github.com/voitto/openmicroblogger.git master

    I tried it, and it said I would just have to fix one file

    CONFLICT (content): Merge conflict in app/omb/views/posts/_profile.html

    I did it like this

    git clone git://github.com/Shen/openmicroblogger.git

    cd openmicroblogger

    git pull git://github.com/voitto/openmicroblogger.git master

    May 8th, 2009 @ 04:48 PM

  9. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    here's how I was able to apply your patch

    git clone git://github.com/voitto/openmicroblogger.git

    mv openmicroblogger omb

    // roll back to the revision Shen started with

    cd omb

    git checkout 87b076b11585dad7bfa4bdd6e3e8790753032676

    cd ..

    patch -p0 <Shenpatch.diff

    but there is a problem, if I now pull it throws some errors

    git pull git://github.com/voitto/openmicroblogger.git

    May 8th, 2009 @ 05:11 PM

  10. Brian Jesse Hendrickson
    Brian Jesse Hendrickson
    • State changed from open to resolved

    May 8th, 2009 @ 11:32 PM

  11. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    wait til you see the new app called "translate" !!! in 0.3b66

    May 9th, 2009 @ 06:55 PM

  12. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    the lang_chooser was lame/broken but I just posted fixes to http://dbscript.net/omb.zip

    May 10th, 2009 @ 12:18 AM

  13. Johannes Schirge
    Johannes Schirge

    Hey Brian, wow!! Thats really impressive! Great feature :-)

    But some notes: Every user can see the language of other people and can choose it. But only the owner of the language can change it. So every user has to add a new language file and has to make all translations twice if he wants to add new translations. This could be solved by an import-function.

    But if you have a lot of people using omb there will be a plurality of language-files (maybe of the same language) which users could choose and nobody knows which on is most completed.

    May 10th, 2009 @ 12:35 AM

  14. Brian Jesse Hendrickson
    Brian Jesse Hendrickson
    • State changed from resolved to open

    You raise good points.

    There is an [import] function now. If you click export you can copy that serialized array and [paste] it to the "data" field when creating a new translation.

    Most people would find the language they want and use it. if they didn't like part of it they could @reply the author and suggest a fix, OR they could export it, create a new lang and paste into the data field and make the modifications they want.

    people could choose a translation-style from an author they like, might be a unique and cool social feature?

    I don't have to worry yet about too many people :-)

    May 10th, 2009 @ 02:02 AM

  15. Johannes Schirge
    Johannes Schirge

    Yes, its really a cool feature :)

    how about displaying in percent the translation-status of the several translations.

    And never forget to this of the future! ;) bleeper.de a german laconica-clone gets well-established in a short time :)

    Maybe we should remove german language as standard so that only english is like a template.

    May 10th, 2009 @ 03:20 AM

  16. Johannes Schirge
    Johannes Schirge

    Forget my latest scentence. It doesn't make sense ;) Keep the german language-file :)

    There is an update for Theme P2 Language and the eng.php file attached. The ger.php will follow as soon as it is translated.

    I upload it here because I don't get my gid fork synced or overwritten with the master-version :(

    May 11th, 2009 @ 03:23 AM

  17. Johannes Schirge
    Johannes Schirge

    Just had a few minutes. Update ger.php / eng.php

    May 11th, 2009 @ 03:47 AM

  18. Johannes Schirge
    Johannes Schirge

    sidebar.php generates an error on line 155.

    $before = "

    <?php echo $txt['recent_projects']; ?>

    \n";

    I tried to resolve it with

    $before = "

    " . $txt['recent_projects'] . "

    \n";

    but it did't work. Error message is away, but text, too ;)

    May 11th, 2009 @ 04:13 AM

  19. Johannes Schirge
    Johannes Schirge

    similar error on line 19 + 23 in page.php :(

    May 11th, 2009 @ 04:31 AM

  20. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    Hi Johannes, thanks again for all the stuff you've been building!

    your page.php

        <?php the_content('<p class="serif">'<?php echo $txt['page_read_rest']; ?>'&rarr;</p>'); ?>
    
        <?php if ( comments_open() ) comments_template(); ?>
    
        <?php wp_link_pages(array('before' => '<p><strong>'<?php echo $txt['page_pages']; ?>'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    

    should be like this I think

        <?php the_content('<p class="serif">'.$txt['page_read_rest'].'&rarr;</p>'); ?>
    
        <?php if ( comments_open() ) comments_template(); ?>
    
        <?php wp_link_pages(array('before' => '<p><strong>'.$txt['page_pages'].'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    

    AND

    line 155 in sidebar

    $before = "<li><h2>".$txt['recent_projects']."</h2>\n";
    
    

    I will go ahead and make these changes when I install your code, unless you post an updated version here.

    really would like to help you fix your github repo! also I do use assembla SVN for all of my commits before I send patches to github

    maybe you can do something like this:

    git clone git@github.com:Shen/openmicroblogger.git

    cd openmicroblogger

    git checkout 87b076b11585dad7bfa4bdd6e3e8790753032676

    git pull git://github.com/voitto/openmicroblogger.git

    git commit -a -m "syncing up"

    git push origin master

    cheers! p.s. tinyblog.de looks really cool, good domain name too

    May 11th, 2009 @ 05:36 AM

  21. Johannes Schirge
    Johannes Schirge

    Thanks for your help. I have added the code as you said and updated ger.php again. so the attached files are up to date.

    I will try to activate git again. And do it as you said. Hope it will work :)

    tinyblog.de is not mine. But great to see that some people starting to use omb :) My Domains are tiquer.me /tiquer.de

    May 11th, 2009 @ 07:41 AM

  22. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    this is cool I will get the updates merged soon, thanks a lot. or let me know if you put them in your github

    here's what I notice right now on GitHub

    if I do

    git clone voitto/openmicroblogger

    git pull Shen/openmicroblogger

    then I [diff]

    these files have some differences, maybe the line-enders were switched to Mac or something?

    openmicroblogger/install.php

    openmicroblogger/db/library/json.php

    openmicroblogger/db/library/xpertmailer/ABOUT

    openmicroblogger/resource/flash_upload.php

    openmicroblogger/resource/jqUploader.css

    openmicroblogger/resource/jquery.ajaxfileupload.js

    openmicroblogger/resource/micro_player/skin.xml

    openmicroblogger/resource/jquery.ui/*

    openmicroblogger/wp-content/plugins/wordpress-friendfeed-comments/*

    however, I can maybe just pull your new [patches] instead of pulling [all of your commits] so it's not that big of a deal but i didn't try that yet

    but if you want others to be able to pull from you directly you might want to fix it

    it is tricky because those files are "managed" by Git so you don't want to just overwrite the directories and lose the .git folders, I can't remember exactly how to do that safely with git

    May 13th, 2009 @ 01:54 PM

  23. Johannes Schirge
    Johannes Schirge

    Thats strange. I reset my repo and pulled your master. In my last commit there was just my updated install.php. Nothing else should be different....

    Gid will not be my best friend I think ;)

    May 13th, 2009 @ 02:46 PM

  24. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    git is the future, you are right to avoid SVN and just learn git

    what happened is you made a noisy commit on your first one, with a bunch of modified files, so I can't pull that commit

    maybe you can just delete that commit individually? I am not a git expert

    but that first commit you made is what introduces the modfied files

    I will help you fix it but right now i'm working hard on another project, tomorrow I will help you with your git

    • brian

    May 13th, 2009 @ 03:02 PM

  25. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    in other words, if you look at all of your commits to Shen/openmicroblogger

    that's what gets pulled down by someone who does a pull on your repo

    so you need to make your total sequence of commits result in a "clean" omb plus your modifications

    you can test it quickly like this


    mkdir testdir

    cd testdir

    git clone git://github.com/voitto/openmicroblogger.git

    mv openmicroblogger shenpull

    cd shenpull

    git pull git://github.com/Shen/openmicroblogger.git

    cd ..

    git clone git://github.com/voitto/openmicroblogger.git

    mv openmicroblogger omb

    diff -raupN --exclude=.git --exclude=.DS_Store --exclude=.svn shenpull/ omb/ > shenpulldiff

    cat shenpulldiff

    rm -rf testdir

    May 13th, 2009 @ 03:07 PM

  26. Brian Jesse Hendrickson
  27. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    ok i'm gonna figure this out

    May 14th, 2009 @ 12:41 PM

  28. Johannes Schirge
    Johannes Schirge

    Thanks for the link. If you can see on github I synced my version with yours :)

    I tried to commit a new branch but had the problem again that there were files included which I haven't changed.

    I think could be because of the line-ending-problem
    http://code.google.com/p/msysgit/issues/detail?id=83&amp;can=1&amp;...

    May 14th, 2009 @ 01:43 PM

  29. Johannes Schirge
    Johannes Schirge

    Thanks for the link. If you can see on github I synced my version with yours :)

    I tried to commit a new branch but had the problem again that there were files included which I haven't changed.

    I think could be because of the line-ending-problem
    http://code.google.com/p/msysgit/issues/detail?id=83&amp;can=1&amp;...

    May 14th, 2009 @ 01:43 PM

  30. Johannes Schirge
    Johannes Schirge

    Thanks for the link. If you can see on github I synced my version with yours :)

    I tried to commit a new branch but had the problem again that there were files included which I haven't changed.

    I think could be because of the line-ending-problem
    http://code.google.com/p/msysgit/issues/detail?id=83&amp;can=1&amp;...

    May 14th, 2009 @ 01:43 PM

  31. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    hey I tried it and yes, I can pull from you!

    nice!

    May 14th, 2009 @ 03:10 PM

  32. Johannes Schirge
    Johannes Schirge

    Okay, added some new langage-updates.

    Can you tell me where I can find the strings from Settings - Profile (Settings, Friends, Password, Streams,...,Translate)?

    May 15th, 2009 @ 03:44 PM

  33. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    Johannes I was able to pull from your repo and everything is working great, I don't see any problems at all. I will pull your commits to my master and push them out to my git repo

    May 18th, 2009 @ 03:53 PM

  34. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    should this ticket be closed?

    June 17th, 2009 @ 11:02 PM

  35. Johannes Schirge
    Johannes Schirge
    • State changed from open to resolved

    June 19th, 2009 @ 04:00 AM

  36. Johannes Schirge

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.