Plugin Directory

Changeset 1342611


Ignore:
Timestamp:
02/03/2016 08:21:19 PM (10 years ago)
Author:
macnetic-labs
Message:

support languages

Location:
nf-subpages/trunk
Files:
1 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • nf-subpages/trunk/lang/nf-subpages.po

    r1342590 r1342611  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: nf-captcha\n"
     3"Project-Id-Version: nf-subpages\n"
    44"POT-Creation-Date: 2015-03-02 21:39-0500\n"
    55"PO-Revision-Date: 2015-03-02 21:39-0500\n"
     
    1313
    1414#: nf-captcha.php:43
    15 msgid "Plugin NF Subpages Plugin deactivated, because the it requires the Ninja Forms plugin to be installed and active"
     15msgid "Plugin 'NF Subpages' deactivated, because it requires the Ninja Forms plugin to be installed and active"
    1616msgstr ""
    1717
  • nf-subpages/trunk/lang/nf-subpages.pot

    r1342590 r1342611  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: nf-captcha\n"
     3"Project-Id-Version: nf-subpages\n"
    44"POT-Creation-Date: 2015-03-02 21:39-0500\n"
    55"PO-Revision-Date: 2015-03-02 21:39-0500\n"
     
    1313
    1414#: nf-captcha.php:43
    15 msgid "Plugin NF Subpages Plugin deactivated, because the it requires the Ninja Forms plugin to be installed and active"
     15msgid "Plugin 'NF Subpages' deactivated, because it requires the Ninja Forms plugin to be installed and active"
    1616msgstr ""
    1717
  • nf-subpages/trunk/nf-subpages.php

    r1342590 r1342611  
    1414    if ( !is_plugin_active( 'ninja-forms/ninja-forms.php' ) ) {
    1515        add_action("admin_notices", function() {
    16             echo '<div class="error fade"><p>'. _e('Plugin NF Subpages Plugin deactivated, because the it requires the Ninja Forms plugin to be installed and active').'</p></div>';
     16            echo '<div class="error fade"><p>'. _e("Plugin 'NF Subpages' deactivated, because the it requires the Ninja Forms plugin to be installed and active", "nf-subpages").'</p></div>';
    1717        });
    1818        deactivate_plugins( plugin_basename( __FILE__ ) );
     
    2929add_action( 'admin_init', 'nf_subpages_extend_setup_license' );
    3030
     31function nf_subpages_load_lang() {
     32    $textdomain = 'nf-subpages';
     33    $locale = apply_filters( 'plugin_locale', get_locale(), $textdomain );
     34
     35    load_textdomain( $textdomain, WP_LANG_DIR . '/nf-subpages/' . $textdomain . '-' . $locale . '.mo' );
     36
     37    load_plugin_textdomain( $textdomain, FALSE, dirname(plugin_basename(__FILE__)) . '/lang/' );
     38}
     39add_action( 'init', 'nf_subpages_load_lang');
     40
    3141function nf_subpages_scripts() {
    3242    wp_register_style( 'nf-subpages-style', plugins_url('css/nf-subpages-no-js-style.css', __FILE__));
     
    4151function nf_register_field_fieldset_start(){
    4252    $args = array(
    43         'name' => __( 'Fieldset Start', 'nf-captcha' ),
     53        'name' => __( 'Fieldset Start', 'nf-subpages' ),
    4454        'sidebar' => 'layout_fields',
    4555        'edit_function' => '',
     
    7686function nf_register_field_fieldset_end(){
    7787    $args = array(
    78         'name' => __( 'Fieldset End', 'nf-captcha' ),
     88        'name' => __( 'Fieldset End', 'nf-subpages' ),
    7989        'sidebar' => 'layout_fields',
    8090        'edit_function' => '',
     
    108118function nf_register_field_subpage_start(){
    109119    $args = array(
    110         'name' => __( 'Subpage Start', 'nf-captcha' ),
     120        'name' => __( 'Subpage Start', 'nf-subpages' ),
    111121        'sidebar' => 'layout_fields',
    112122        'edit_function' => '',
     
    146156function nf_register_field_subpage_end(){
    147157    $args = array(
    148         'name' => __( 'Subpage End', 'nf-captcha' ),
     158        'name' => __( 'Subpage End', 'nf-subpages' ),
    149159        'sidebar' => 'layout_fields',
    150160        'edit_function' => '',
     
    177187        <div class="nf_subpage_footer">
    178188            <span class="nf_subpage_navigation">
    179                 <span class="nf_subpage_button nf_subpage_prev"><?php _e( 'prev', 'nf-captcha' ) ?></span>
    180                 <span class="nf_subpage_button nf_subpage_next"><?php _e( 'next', 'nf-captcha' ) ?></span>
     189                <span class="nf_subpage_button nf_subpage_prev"><?php _e( 'prev', 'nf-subpages' ) ?></span>
     190                <span class="nf_subpage_button nf_subpage_next"><?php _e( 'next', 'nf-subpages' ) ?></span>
    181191            </span>
    182192            <span class="nf_subpage_progressbar_wrap">
Note: See TracChangeset for help on using the changeset viewer.