Plugin Directory

Changeset 1342652


Ignore:
Timestamp:
02/03/2016 09:06:05 PM (10 years ago)
Author:
macnetic-labs
Message:

add language support

Location:
nf-conditional-actions/trunk
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • nf-conditional-actions/trunk/classes/notification-conditional-action-message.php

    r1342506 r1342652  
    1515     */
    1616    function __construct() {
    17         $this->name = __( 'Conditional Message' );
     17        $this->name = __( 'Conditional Message' , 'nf-conditional-actions');
    1818    }
    1919    /**
     
    4747        ?>
    4848        <tr>
    49             <th scope="row"><label for="settings-default_conditional_message"><?php _e( 'Standard', '' ); ?></label></th>
     49            <th scope="row"><label for="settings-default_conditional_message"><?php _e( 'Standard', 'nf-conditional-actions' ); ?></label></th>
    5050            <td>
    5151                <?php wp_editor($default_conditional_message, 'settings-default_conditional_message', array('textarea_name' => 'settings[default_conditional_message]') ); ?>
     
    6363            <th scope="row">&nbsp;</th>
    6464            <td>
    65                 <input type="button" id="nf_addConditionButton" value="Hinzufügen" />
     65                <input type="button" id="nf_addConditionButton" value="<?php _e('Add', 'nf-conditional-actions'); ?>" />
    6666            </td>
    6767        </tr>
     
    7575            <th scope="row">
    7676                <label for="settings-conditional_condition_<?php echo $i; ?>">
    77                     <?php _e('Bedingung', ''); ?>
     77                    <?php _e('Condition', 'nf-conditional-actions'); ?>
    7878
    7979                    <input type="button" id="nf_removeConditionButton_<?php echo $i; ?>"
    80                            class="nf_removeConditionButton" value="Entfernen"/>
     80                           class="nf_removeConditionButton" value="<?php _e('Remove', 'nf-conditional-actions'); ?>"/>
    8181                </label>
    8282            </th>
     
    8787        <tr>
    8888            <th scope="row"><label
    89                     for="settings-conditional_message_<?php echo $i; ?>"><?php _e('Nachricht', ''); ?></label></th>
     89                    for="settings-conditional_message_<?php echo $i; ?>"><?php _e('Message', 'nf-conditional-actions'); ?></label></th>
    9090            <td>
    9191                <?php wp_editor($message, 'settings-conditional_message_' . $i, array('textarea_name' => 'settings[conditional_messages][]')); ?>
  • nf-conditional-actions/trunk/nf-conditional-actions.php

    r1342506 r1342652  
    1414    if ( !is_plugin_active( 'ninja-forms/ninja-forms.php' ) ) {
    1515        add_action("admin_notices", function() {
    16             echo '<div class="error fade"><p>Plugin "NF Conditional Actions Plugin" <b>deactivated</b>, because it <b>requires</b> the <b>Ninja Forms plugin</b> to be <b><i>installed</i> and <i>active</i></b></p></div>';
     16            echo '<div class="error fade"><p>'. _e("Plugin 'NF Conditional Actions' deactivated, because it requires the Ninja Forms plugin to be installed and active", "nf-conditional-actions").'</p></div>';
    1717        });
    1818        deactivate_plugins( plugin_basename( __FILE__ ) );
     
    2828}
    2929add_action( 'admin_init', 'nf_conditional_actions_extend_setup_license' );
     30
     31function nf_conditional_actions_load_lang() {
     32    $textdomain = 'nf-conditional-actions';
     33    $locale = apply_filters( 'plugin_locale', get_locale(), $textdomain );
     34
     35    load_textdomain( $textdomain, WP_LANG_DIR . '/nf-conditional-actions/' . $textdomain . '-' . $locale . '.mo' );
     36
     37    load_plugin_textdomain( $textdomain, FALSE, dirname(plugin_basename(__FILE__)) . '/lang/' );
     38}
     39add_action( 'init', 'nf_conditional_actions_load_lang');
    3040
    3141function nf_conditional_actions_scripts() {
Note: See TracChangeset for help on using the changeset viewer.