Commit d7544cf8 authored by innerfly's avatar innerfly
Browse files

update for t() function

parent f68d16a6
Loading
Loading
Loading
Loading
+36 −36
Original line number Diff line number Diff line
@@ -49,81 +49,81 @@ function uc_rbkmoney_setup() {
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#title' => t('URL оповещения о платеже')
    '#title' => t('URL of payment response')
  );
  global $base_url;
  $form['responseURL']['url'] = array(
    '#type' => 'textfield',
    '#value' => $base_url . '/uc_rbkmoney/response',
    '#description' => t("Для вставки в поле \"Оповещение о платеже\" в личном кабинете на сайте <a target=_blank href=\"http://www.rbkmoney.ru\">RBK Money</a>"),
    '#description' => t("Just for insertion into \"Payment response URL\" field on <a target=_blank href=\"http://www.rbkmoney.ru\">RBK Money</a> settings page"),
  );
  $form['actionURL'] = array(
    '#type' => 'textfield',
    '#title' => t('URL формы запроса платежа'),
    '#title' => t('Payment form action URL'),
    '#default_value' => variable_get('uc_rbkmoney_actionURL', 'https://rbkmoney.ru/acceptpurchase.aspx'),
    '#description' => t("По-умолчанию \"https://rbkmoney.ru/acceptpurchase.aspx\""),
    '#description' => t("Default: \"https://rbkmoney.ru/acceptpurchase.aspx\""),
    '#required' => TRUE,
  );
  $form['eshopId'] = array(
    '#type' => 'textfield',
    '#title' => t('ID сайта'),
    '#title' => t('Site ID'),
    '#default_value' => variable_get('uc_rbkmoney_eshopId', ''),
    '#description' => t("Введите ID вашего сайта в системе RBK Money"),
    '#description' => t("ID of your site"),
    '#required' => TRUE,
  );
  $curr = variable_get('uc_rbkmoney_recipientCurrency', 'RUR');
  $form['recipientCurrency'] = array(
    '#type' => 'select',
    '#title' => t('Валюта платежей'),
    '#title' => t('Payments currency'),
    '#options' => array($curr => $curr, 'RUR' => 'RUR', 'USD' => 'USD', 'EUR' => 'EUR', 'UAH' => 'UAH'),
    '#description' => t("Укажите валюту платежей"),
    '#description' => t("Please, select payments currency"),
    '#required' => TRUE,
  );
  $form['secretKey'] = array(
    '#type' => 'textfield',
    '#title' => t('Секретный ключ'),
    '#title' => t('Secret key'),
    '#default_value' => variable_get('uc_rbkmoney_secretKey', ''),
    '#description' => t("Секретный ключ, указанный вами в личном кабинете на сайте <a target=_blank href=\"http://www.rbkmoney.ru\">RBK Money</a>"),
    '#description' => t("Secret key, entered on <a target=_blank href=\"http://www.rbkmoney.ru\">RBK Money</a> settings page"),
    '#required' => TRUE,
  );
  $form['log'] = array(
    '#type' => 'radios',
    '#title' => t('Записывать ответы сервера RBK Money о платежах в <a href="/admin/reports/dblog">системный журнал</a>'),
    '#options' => array('on' => t('Да'), 'off' => t('Нет')),
    '#title' => t('Save RBK Money\'s server responses in <a href="/admin/reports/dblog">system log</a>'),
    '#options' => array('on' => t('Yes'), 'off' => t('No')),
    '#default_value' => variable_get('uc_rbkmoney_log', 'on'),
  );
  $form['preference'] = array(
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#title' => t('Дополнительные опции протокола')
    '#title' => t('Advanced options of protocol')
  );
  $pref = variable_get('uc_rbkmoney_preference', 'all');
  $form['preference']['method'] = array(
    '#type' => 'select',
    '#title' => t('Предпочитаемый способ оплаты'),
    '#title' => t('Prefered payment method'),
    '#options' => array(
      $pref => '',
      'all' => 'Все (по-умолчанию)',
      'inner' => 'С кошелька RBK Money',
      'bankCard' => 'Банковская карта Visa/MasterCard',
      'exchangers' => 'Электронные платежные системы',
      'prepaidcard' => 'Предоплаченная карта RBK Money',
      'transfers' => 'Системы денежных переводов',
      'terminals' => 'Платёжные терминалы',
      'all' => t('All (default)'),
      'inner' => t('RBK Money wallet'),
      'bankCard' => t('Visa/MasterCard bank card'),
      'exchangers' => t('E-payment systems'),
      'prepaidcard' => t('RBK Money prepaid card'),
      'transfers' => t('Money transfer systems'),
      'terminals' => t('Cash-in kiosks'),
      'iFree' => 'SMS',
      'bank' => 'Банковский платёж',
      'postRus' => 'Почта России',
      'atm' => 'Банкоматы',
      'yandex' => 'Яндекс',
      'ibank' => 'Интернет банкинг',
      'euroset' => 'Евросеть'
      'bank' => t('Bank transfer'),
      'postRus' => t('Russian Post'),
      'atm' => t('ATMs'),
      'yandex' => t('Yandex'),
      'ibank' => t('Internert banking'),
      'euroset' => t('Euroset')
    ),
    '#description' => t("Способ оплаты, который будет выбран при оплате покупки, минуя экран выбора"),
    '#description' => t("Default payment method. Allow to skip payment selection page"),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Сохранить'),
    '#value' => t('Save changes'),
  );
  return $form;
}
@@ -138,7 +138,7 @@ function uc_rbkmoney_setup_submit($form, &$form_state) {
  variable_set('uc_rbkmoney_secretKey', $form_state['values']['secretKey']);
  variable_set('uc_rbkmoney_log', $form_state['values']['log']);
  variable_set('uc_rbkmoney_preference', $form_state['values']['method']);
  drupal_set_message(t('Настройки сохранены'), $type = 'status');
  drupal_set_message(t('Settings have been saved'), $type = 'status');
}

/**
@@ -151,7 +151,7 @@ function uc_rbkmoney_payment_method() {
    'id' => 'rbkmoney',
    'name' => t('RBK Money'),
    'title' => $title,
    'desc' => t('Оплата через систему RBK Money'),
    'desc' => t('RBK Money'),
    'weight' => 1,
    'callback' => 'uc_payment_method_rbkmoney',
    'checkout' => TRUE,
@@ -234,7 +234,7 @@ function uc_rbkmoney_submit_form($form_state, $order) {
  $form['#action'] = variable_get('uc_rbkmoney_actionURL', '');
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Перейти к оплате'),
    '#value' => t('Place your order'),
  );
  return $form;
}
@@ -270,18 +270,18 @@ function uc_rbkmoney_done_payment() {
      switch ($response['paymentStatus']) {
        case "3" :
          uc_order_update_status($response['orderId'], 'processing');
          uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: платеж обрабатывается'), $type = 'admin', $status = 1, $notify = FALSE);
          uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: processing'), $type = 'admin', $status = 1, $notify = FALSE);
          break;
        case "5" :
          uc_payment_enter($response['orderId'], 'RBK Money', $response['recipientAmount'], $order->uid, NULL, NULL);
          uc_cart_complete_sale($order);
          uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: платеж успешно выполнен'), $type = 'admin', $status = 1, $notify = FALSE);
          uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: payment successful'), $type = 'admin', $status = 1, $notify = FALSE);
          break;
      }
    } elseif ($response['hash'] != $crc) {
      uc_order_update_status($response['orderId'], 'canceled');
      uc_order_comment_save($response['orderId'], $order->uid, t('Контрольная подпись не совпадает, платеж отменен'), $type = 'admin', $status = 1, $notify = FALSE);
      drupal_set_message(t('Контрольная подпись не совпадает, платеж отменен'), 'warning');
      uc_order_comment_save($response['orderId'], $order->uid, t('MD5 checksum fail, payment denied'), $type = 'admin', $status = 1, $notify = FALSE);
      drupal_set_message(t('MD5 checksum false, payment deny'), 'warning');
      drupal_goto('cart');
    }
  }