WordPress.org

Forums

Latest Tweets Widget
[resolved] Translating this plugin (12 posts)

  1. Leandro Dimitrio
    Member
    Posted 2 years ago #

    Is there a way we can start a translation (portuguese-BR) for this one?

    Where should we start from?

    http://wordpress.org/extend/plugins/latest-tweets-widget/

  2. timwhitlock
    Member
    Plugin Author

    Posted 2 years ago #

    Hi.
    The plugin is partially set up for translation, but I've been waiting for the first person to express interest in translating before finishing that off.

    I'm managing the translations at http://localise.biz/ I can add the pt-BR locale and invite you as a translator if you like.

    If you prefer to just work in POEdit then you can start from the lang/twitter-api.pot file in the plugin and send me your .po file

  3. Leandro Dimitrio
    Member
    Posted 2 years ago #

    Sure thing!

    I think we can carry it on through localize.biz... what do you say?

  4. timwhitlock
    Member
    Plugin Author

    Posted 2 years ago #

    closing this, as we've taken the conversation to email.
    If anyone else wants to translate a locale, get in touch :)

  5. Leandro Dimitrio
    Member
    Posted 2 years ago #

    One thing I had to change manually in latest-tweets.php, in order to have the date displayed according to our local settings, was to use date_i18n.

    In line 60, I changed from:

    $final = apply_filters('latest_tweets_render_tweet', $html, $date, $link );
                if( $final === $html ){
                    $final = '<p class="tweet-text">'.$html.'</p>'.
                             '<p class="tweet-details"><a href="'.$link.'" target="_blank">'.$date.'</a></p>';
                }
                $rendered[] = $final;

    To:

    $final = apply_filters('latest_tweets_render_tweet', $html, $date, $link );
                if( $final === $html ){
    				$newdate = date_i18n("j \d\e F \d\e Y, G:i", strtotime($created_at));
                    $final = '<p class="tweet-text">'.$html.'</p>'.
                             '<p class="tweet-details"><a href="'.$link.'" target="_blank">'.$newdate.'</a></p>';
                }
                $rendered[] = $final;
  6. Leandro Dimitrio
    Member
    Posted 2 years ago #

    Even better, I changed line 63 from:

    $newdate = date_i18n("j \d\e F \d\e Y, G:i", strtotime($created_at));

    to

    $newdate = date_i18n(get_option('date_format') . ', ' . get_option('time_format'), strtotime($created_at));

    That way, it gets both date and time from WP's database :)

    Cheers

  7. timwhitlock
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for this.
    I'll merge it in the next time I do a release

  8. david_noh
    Member
    Posted 1 year ago #

    Hey, what about a german translation? I've already translated the .po file. Do you have a documentation for translation your Plugin?

    Best regards,
    John

  9. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    Hi David.
    Thanks for translating the PO file, but somebody did translate it already and this is in release 1.0.8.

    You're welcome to look it through though. We use http://localise.biz to track the translations. If you register on the site, I'll add you to the project.

    Thanks.

  10. david_noh
    Member
    Posted 1 year ago #

    Hey Tim,
    thanks for your reply. I've updated the Extension, but it seems that there are some missing translations. I also have registered an account for Loco.

    regards,
    john

  11. Gameprime
    Member
    Posted 1 year ago #

    Is there a way to translate it to dutch? I have tried the make my own .po and it won't show it. I only need to translate like ''minutes ago'' and hours.
    Thanks

  12. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    @Gameprime you have to compile the PO into an MO file and also add nl to the list of available languages within the plugin code.

    Translations are maintained in Loco. If you register, I'll add you to my project. Then I can release your translations in the next version of the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.