<commit_before><?php
/**
 *
 */

if ( ! defined( 'ABSPATH' ) ) { exit; }

class WC_Integration_RuleMailer extends WC_Integration {

	public function __construct() {
		$this->id 									= 'rulemailer';
		$this->method_title 				= 'RuleMailer';
		$this->method_description 	= 'RuleMailer integration for WooCommerce';

		$this->init_settings();
		$this->api_key = $this->get_option( 'woorule_api_key' );
		$this->api_url = $this->get_option( 'woorule_api_url' );
		$this->init_form_fields();

		// actions
		add_action( 'woocommerce_update_options_integration', array( &$this, 'process_admin_options') );
		add_action( 'woocommerce_update_options_integration_woorule', array( &$this, 'process_admin_options') );

		// filters
		add_filter( 'woocommerce_get_sections_integration', array( &$this, 'rule_add_section' ) );

		// triggers
		if ( $this->api_key ) {
			do_action( 'woorule_api_loaded', $this->api_key );
		}
	}

	function rule_add_section( $sections ) {
		$sections['woorule'] = 'RuleMailer';
		return $sections;
	}

	function init_form_fields() {
		$this->form_fields = array(
			'woorule_api_key' => array(
				'title' 				=> __( 'API Key', 'woorule' ),
				'type' 					=> 'text',
				'description'		=> __( 'Go to RuleMailers settings here to generetate one.', 'woorule' ),
				'default' 			=> '' 
			),

			'woorule_api_url' => array(
				'title' 				=> __( 'API URL', 'woorule' ),
				'type' 					=> 'text',
				'description'		=> __( 'URL to the API.', 'woorule' ),
				'default' 			=> '' 
			)
		);
	}

	public function admin_options() {
		?>
			<h2>RuleMailer</h2>
			<p>Add your API key and a new tab will show up at the top of this page.</p>
			<table class="form-table">
				<?php $this->generate_settings_html(); ?>
			</table>
		<?php
	}
}

<commit_msg>added i18n for integrations page<commit_after><?php
/**
 *
 */

if ( ! defined( 'ABSPATH' ) ) { exit; }

class WC_Integration_RuleMailer extends WC_Integration {

	public function __construct() {
		$this->id 									= 'rulemailer';
		$this->method_title 				= 'RuleMailer';
		$this->method_description 	= 'RuleMailer integration for WooCommerce';

		$this->init_settings();
		$this->api_key = $this->get_option( 'woorule_api_key' );
		$this->api_url = $this->get_option( 'woorule_api_url' );
		$this->init_form_fields();

		// actions
		add_action( 'woocommerce_update_options_integration', array( &$this, 'process_admin_options') );
		add_action( 'woocommerce_update_options_integration_woorule', array( &$this, 'process_admin_options') );

		// filters
		add_filter( 'woocommerce_get_sections_integration', array( &$this, 'rule_add_section' ) );

		// triggers
		if ( $this->api_key ) {
			do_action( 'woorule_api_loaded', $this->api_key );
		}
	}

	function rule_add_section( $sections ) {
		$sections['woorule'] = 'RuleMailer';
		return $sections;
	}

	function init_form_fields() {
		$this->form_fields = array(
			'woorule_api_key' => array(
				'title' 				=> __( 'API Key', 'woorule' ),
				'type' 					=> 'text',
				'description'		=> __( 'Go to RuleMailers settings to generetate one.', 'woorule' ),
				'default' 			=> '' 
			),

			'woorule_api_url' => array(
				'title' 				=> __( 'API URL', 'woorule' ),
				'type' 					=> 'text',
				'description'		=> __( 'URL to the API.', 'woorule' ),
				'default' 			=> '' 
			)
		);
	}

	public function admin_options() {
		?>
			<h2><?php _e( 'RuleMailer', 'woorule' ); ?></h2>
			<p><?php _e( 'Add your API key and a new tab will show up at the top of this page.', 'woorule' ); ?></p>

			<table class="form-table">
				<?php $this->generate_settings_html(); ?>
			</table>
		<?php
	}
}


{'fraction_non_alphanumeric': 0.17187068250898038, 'fraction_numerical': 0.0016579165515335729, 'mean_word_length': 3.58808618504436, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '15208', 'n_tokens_mistral': 1551, 'n_tokens_neox': 1363, 'n_words': 259}