Plugin Directory

Changeset 821475


Ignore:
Timestamp:
12/13/2013 09:54:50 PM (12 years ago)
Author:
StuartSequeira
Message:

Add Spanish language translation

Location:
comment-gatekeeper
Files:
11 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • comment-gatekeeper/trunk/comment-gatekeeper.php

    r819115 r821475  
    66Author: Stuart Sequeira
    77Author URI: http://lb3computingsolutions.com/about/
    8 Version: 0.9.4
     8Version: 1.0
    99Text Domain: comment-gatekeeper
    1010*/
     
    2929}
    3030
    31 define('LB3CGK_VERSION', '0.9.3');
     31define('LB3CGK_VERSION', '1.0');
    3232
    3333
     
    7070-----*/
    7171include_once( LB3CGK_PLUGIN_DIR . '/includes/comment-form.php');
     72
     73
     74
     75/*----------
     76LANGUAGE
     77--------------------------------------------------------------------------------------------------------------*/
     78
     79add_action('plugins_loaded', 'lb3cgk_load_lang');
     80
     81function lb3cgk_load_lang() {
     82     
     83    /** Set our unique textdomain string */
     84    $textdomain = 'comment-gatekeeper';
     85     
     86    /** The 'plugin_locale' filter is also used by default in load_plugin_textdomain() */
     87    $locale = apply_filters( 'plugin_locale', get_locale(), $textdomain );
     88     
     89    /** Set filter for WordPress languages directory */
     90    $wp_lang_dir = apply_filters(
     91        'lb3cgk_wp_lang_dir',
     92        WP_LANG_DIR . '/'.basename( dirname( __FILE__ ) ).'/' . $textdomain . '-' . $locale . '.mo'
     93    );
     94     
     95    /** Translations: First, look in WordPress' "languages" folder = custom & update-secure! */
     96    load_textdomain( $textdomain, $wp_lang_dir );
     97     
     98    /** Translations: Secondly, look in plugin's "lang" folder = default */
     99    $plugin_dir = basename( dirname( __FILE__ ) );
     100    $lang_dir = apply_filters( 'lb3cgk_lang_dir', $plugin_dir . '/lang/' );
     101    load_plugin_textdomain( $textdomain, FALSE, $lang_dir );
     102 
     103}
  • comment-gatekeeper/trunk/readme.txt

    r819115 r821475  
    11=== Comment Gatekeeper ===
    22Contributors: StuartSequeira
    3 Donate link: http://makesenseofitall.com/2013/12/comment-gatekeeper-quick-start-guide/
     3Donate link: http://makesenseofitall.com/tag/comment-gatekeeper/
    44Tags: comments, spam
    55Requires at least: 3.0.3
    6 Tested up to: 3.7.1
    7 Stable tag: 0.9.4
     6Tested up to: 3.8
     7Stable tag: 1.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1515Block comment spam by inserting a question and answer field on your comment forms.  No more wasting your time emptying out pages of spam messages just to get to the real comments from real visitors!
    1616
    17 You can create your own simple question, like "What is 1 plus 1?" and the commenter must supply an answer on the comment form.  If the commenter can't answer the question correctly, this great little plugin blocks the comment from getting into your website.
     17You can create your own simple question, like "What is 1 plus 1?" and the commenter must supply an answer on the comment form.  If the commenter can't answer the question correctly, this great little plugin blocks the comment from getting into your website.
     18
     19Thanks to Andrew Kurtis and his team at Web Hosting Hub for translating this plugin into Spanish!
    1820
    1921
     
    4143== Changelog ==
    4244
     45= 1.0 =
     46Add Spanish translation
     47
     48= 0.9.4 =
     49Modify english instructions to prepare for translations
     50
     51= 0.9.3 =
     52Add gettext functions on two English sentences that were missing it
     53
    4354= 0.9.2 =
    4455Add CSS classes to form field
Note: See TracChangeset for help on using the changeset viewer.