Plugin Directory

Changeset 373063


Ignore:
Timestamp:
04/14/2011 09:53:03 PM (15 years ago)
Author:
stevevls
Message:

1.1.6:

  • Chinese support : Language pattern matching changes and quoted widget JS array keys.
  • Added search functionality in translated blogs.
Location:
gts-translation/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • gts-translation/trunk/Gts.php

    r370323 r373063  
    3636Plugin Name: GTS Translation
    3737Plugin URI: http://gts-translation.com/
    38 Description: The only translation plugin that provides human translation of your blog content using community translation (crowdsourcing). Use our community of professional translators or use your own internal community. Currently translates from English to French, Italian, German, Spanish, Portuguese, Japanese, and Russian with more to come. All content is cached on your Wordpress database and indexed by search engines.
    39 Version: 1.1.5
     38Description: This plugin is guaranteed to drive more international traffic to your site by providing high quality translation, and SEO of your translated content.
     39Version: 1.1.6
    4040Author: Steve van Loben Sels
    4141Author URI: http://gts-translation.com/
  • gts-translation/trunk/readme.txt

    r370323 r373063  
    1 === Plugin Name ===
     1=== GTS Translation Plugin ===
    22Contributors: stevevls
    3 Tags: translate, translation, crowdsourcing
     3Tags: crowdsourcing, translate, translation, translations, translator, blog translator, free translation, language, languages
     4Donate Link: http://www.gts-translation.com/
    45Requires at least: 2.9
    56Tested up to: 3.1.1
    6 Stable tag: 1.1.5
    7 
    8 The only translation plugin that provides human translation of your blog content using community translation
    9 (crowdsourcing).
     7Stable tag: 1.1.6
     8
     9This plugin is guaranteed to drive more international traffic to your site by providing high quality translation, and SEO of your translated content.
    1010
    1111== Description ==
    1212
    13 The GTS Translation WordPress plugin is the only free solution for human translation of blogs. And since the
    14 translated content is cached in your Wordpress database, it can be SEO optimized and indexed by search engines.
    15 
    16 Your blog content is initially translated by our translation server. The content is then post-edited by human translators
    17 through our online editing system. You can use the GTS community of translators, or you can assign the post-editing to
    18 your own community of translators to maintain complete control of the process.
    19 
    20 After you install the GTS Translation plugin, your blog home page is translated, as well as all of the blog posts that
    21 appear on the home page. A translation widget is available for any widget-enabled WordPress theme. From this point
    22 onward, each time a new blog post is published it is automatically translated into the selected languages. You can
    23 choose to publish the translated content immediately (raw MT output), or to only publish the translated content after it
    24 has been approved by a moderator.
    25 
    26 Current release supports translating from English to French, Italian, German, Spanish, Portuguese, Japanese and Russian.
    27 We're actively working to add more languages!
     13The GTS Translation plugin provides human quality translation by allowing you to combine automatic translation and human post-editing (crowdsourcing). Your blog content is initially translated by our translation server. The content is then post-edited by human translators through our online editing system. You can use the GTS community of translators, or you can assign the post-editing to your own community of translators to maintain complete control of the process.
     14
     15When you use the GTS Translation plugin, translated content is cached in your Wordpress database and indexed by search engines. This will increase the traffic to your website and grow your international readership.
     16
     17**Features:**
     18
     19*   Guaranteed to increase your traffic by at least 30% after 2 months; some customers have seen over 100% increase in traffic
     20*   Supports over 10 languages
     21*   Uses private, secure translation server
     22*   Publish translated content immediately or following review
     23*   Crowdsourcing: create your own community of translators or use our community
     24*   SEO: translates Permalink URL names and meta tags
     25*   Custom online, side-by-side editor makes post-editing easy
     26*   Translated posts can be retweeted
     27
    2828
    2929== Installation ==
     
    7575= Which languages are supported? =
    7676* Input: English
    77 * Output: French, German, Italian, Spanish, Portuguese, Japanese, and Russian
    78 
     77* Output: Chinese (Simplified and Traditional), Finnish, French, German, Italian, Japanese, Portuguese, Russian, Spanish, and Swedish.
     78
     79We're continually adding new languages, so for the latest list, click [here](http://translate.gts-translation.com/api/supportedLanguages).
    7980
    8081= What URLs will the translated blogs have? =
     
    111112
    112113
    113 = When I switch my blog to Russian, all I see are question marks...what gives?
     114= When I switch my blog to Russian, Japanese, Chinese, etc. all I see are question marks...what gives? =
    114115This happens when the data is stored in MySQL with the wrong character encoding.  Execute the following SQL (being sure to
    115116replace 'wp_' with the prefix specified in wp-config.php if you've changed that value):
    116117
    117 ALTER TABLE wp_gts_translated_options CONVERT TO CHARACTER SET 'utf8';
     118`ALTER TABLE wp_gts_translated_options CONVERT TO CHARACTER SET 'utf8';
    118119ALTER TABLE wp_gts_translated_posts CONVERT TO CHARACTER SET 'utf8';
    119 ALTER TABLE wp_gts_translated_terms CONVERT TO CHARACTER SET 'utf8';
     120ALTER TABLE wp_gts_translated_terms CONVERT TO CHARACTER SET 'utf8';`
    120121
    121122Then get in touch with us so that we can help you reload your content.
     123
     124= I enabled Chinese language, but hardly any of the links work.  What should I do? =
     125In order to work correctly, translations to Chinese require plugin version 1.1.6 or greater.  Version 1.1.5 will
     126translate your posts, but won't properly display them.  Upgrade using your WP Admin panel, and you'll be good to go.
    122127
    123128
     
    173178== Changelog ==
    174179
     180= 1.1.6 =
     181* Chinese support : Language pattern matching changes and quoted widget JS array keys.
     182* Added search functionality in translated blogs.
     183
    175184= 1.1.5 =
    176185* Added support for translation from English to Japanese and Portuguese.
     
    248257Simply click the "Delete" link in the plugin management window.  This will delete all of your translated data, so
    249258please be careful!
     259
     260== Screenshots ==
     261
     2621. Translation Widget on your blog
     2632. Side-by-side Editor
     2643. Popup Editor
     2654. Crowdsourcing Admin Panel
     266
     267== Upgrade Notice ==
     268
     269So far, the plugin is self-upgrading...if there's something to report later, we'll add it!
    250270
    251271== Security ==
  • gts-translation/trunk/wordpress/GtsLinkRewriter.php

    r369686 r373063  
    443443        if( $wp_rewrite->permalink_structure ) {
    444444
    445             $wp_rewrite->add_rewrite_tag('%'.GtsLinkRewriter::$LANG_PARAM.'%', '([a-z]{2})', GtsLinkRewriter::$LANG_PARAM . '=' );
     445            $lang_regex = '(' . GtsPluginWordpress::$LANGUAGE_CODE_REGEX . ')';
     446            $wp_rewrite->add_rewrite_tag('%'.GtsLinkRewriter::$LANG_PARAM.'%', $lang_regex, GtsLinkRewriter::$LANG_PARAM . '=' );
    446447
    447448            // todo - option-ize and localize this prefix.
     
    489490                    unset($newrules[$match]);
    490491
    491                     $match = preg_replace( '/(\[a\-z\]\{2\})/', '($1)', $match );
     492                    $match = preg_replace( '/' . preg_quote( $lang_regex ) . '/', '($1)', $match );
    492493                    $params = $params . '&gts_lang=$matches[0]';
    493494                    $params = preg_replace_callback( '/\$matches\[(\d+)\]/', array( $this, 'callback_reindex_match_array' ), $params);
  • gts-translation/trunk/wordpress/GtsPluginWordpress.php

    r369968 r373063  
    3636class GtsPluginWordpress extends GtsPlugin {
    3737
     38    // matches standard 2 character ISO codes or the semi-formal
     39    // zh-XXX chinese language codes.  optional group is non-capturing
     40    // so that this doesn't wreak havoc with other regexs it may be
     41    // embedded within.
     42    static $LANGUAGE_CODE_REGEX = "[a-z]{2}(?:\\-[A-Z]{3})?";
    3843
    3944    static $TRANSLATE_OPTIONS = array(
     
    6671        // be able to switch off values in there.
    6772        if( get_option( 'permalink_structure') ) {
    68             if( preg_match('/\/language\/([a-z]{2})\//', $_SERVER['REQUEST_URI'], $matches)) {
     73            if( preg_match('/\/language\/(' . GtsPluginWordpress::$LANGUAGE_CODE_REGEX . ')\//', $_SERVER['REQUEST_URI'], $matches)) {
    6974                $this->theme_language = $matches[1];
    7075            }
     
    237242            $this->config->plugin_version = GTS_PLUGIN_VERSION;
    238243            $this->save_config();
    239            
     244
    240245            update_option( GTS_DB_INITIALIZED_OPTION_NAME, true );
    241246
     
    352357
    353358        add_filter( 'posts_join', array( $this, 'add_posts_join_criteria' ), 1 );
     359        add_filter( 'posts_search', array( $this, 'add_posts_search_criteria' ), 1);
    354360    }
    355361
     
    410416            $tp_table = $wpdb->prefix . 'gts_translated_posts';
    411417            return "$join INNER JOIN $tp_table ON ($tp_table.local_id = $wp_table.id AND $tp_table.language = '". $this->language. "')";
     418        }
     419
     420        return $join;
     421    }
     422
     423    function add_posts_search_criteria( $join ) {
     424
     425        if( $join && $this->language ) {
     426            $join = preg_replace( '/_posts\.post_title/', '_gts_translated_posts.post_title', $join );
     427            $join = preg_replace( '/_posts\.post_content/', '_gts_translated_posts.post_body', $join );
    412428        }
    413429
  • gts-translation/trunk/wordpress/GtsWidgets.php

    r369686 r373063  
    9292                    <?php
    9393                    foreach ( $languages_with_links as $lang => $link ) {
    94                         echo "$lang : '$link',\n";
     94                        echo "\"$lang\" : '$link',\n";
    9595                    }
    9696                    ?>
     
    166166            if( $is_source ) {
    167167
    168                 $interesting_part = preg_replace( '/^language\/[a-z]{2}\/?/', '', $interesting_part);
     168                $interesting_part = preg_replace( '/^language\/' . GtsPluginWordpress::$LANGUAGE_CODE_REGEX . '\/?/', '', $interesting_part);
    169169
    170170                if( is_tag() && get_query_var( 'tag' ) ) {
     
    204204                    $link = $gts_plugin->do_with_language( array( $this, 'callback_get_page_link' ), $lang->code);
    205205                }
    206                 else if(!preg_match( '/^(language\/)([a-z]{2})(\/.*)?$/', $interesting_part, $matches ) ) {
     206                else if(!preg_match( '/^(language\/)' . GtsPluginWordpress::$LANGUAGE_CODE_REGEX . '(\/.*)?$/', $interesting_part, $matches ) ) {
    207207                    $link = $home . 'language/' . $lang->code . '/' . $interesting_part;
    208208                }
Note: See TracChangeset for help on using the changeset viewer.