Merge pull request #4 from filinovs/master

added Russian localization
This commit is contained in:
Steven Sullivan 2023-11-29 12:05:13 -05:00 committed by GitHub
commit c3ae9edb7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

@ -14,6 +14,8 @@ class easy_unsubscribe extends rcube_plugin
$this->add_hook('storage_init', array($this, 'storage_init'));
$this->include_stylesheet('easy_unsubscribe.css');
$this->add_texts('localization/');
}
public function storage_init($p)
@ -31,7 +33,7 @@ class easy_unsubscribe extends rcube_plugin
$ListUnsubscribe = $p['headers']->others['list-unsubscribe'];
if ( preg_match_all('/<(.+)>/mU', $ListUnsubscribe, $items, PREG_PATTERN_ORDER) ) {
foreach ( $items[1] as $uri ) {
$this->unsubscribe_img .= '<a class="easy_unsubscribe_link tooltip-right" data-tooltip="Click to unsubscribe" href="'. htmlentities($uri) .'" target="_blank" onclick="return confirm(\'Are you sure you want to unsubscribe?\');"><img src="plugins/easy_unsubscribe/icon.png" alt="Unsubscribe" /></a>';
$this->unsubscribe_img .= '<a class="easy_unsubscribe_link tooltip-right" data-tooltip="' . $this->gettext('click_to_unsubscribe') . '" href="'. htmlentities($uri) .'" target="_blank" onclick="return confirm(\'' . $this->gettext('confirm') . '\');"><img src="plugins/easy_unsubscribe/icon.png" alt="' . $this->gettext('unsubscribe') . '" /></a>';
}
}
}
@ -44,4 +46,4 @@ class easy_unsubscribe extends rcube_plugin
return $p;
}
}
}

7
localization/en_US.inc Normal file

@ -0,0 +1,7 @@
<?php
$labels = array();
$labels['click_to_unsubscribe'] = "Click to unsubscribe";
$labels['confirm'] = "Are you sure you want to unsubscribe?";
$labels['unsubscribe'] = "Unsubscribe";

7
localization/ru_RU.inc Normal file

@ -0,0 +1,7 @@
<?php
$labels = array();
$labels['click_to_unsubscribe'] = "Нажмите, чтобы отписаться";
$labels['confirm'] = "Вы уверены, что хотите отказаться от подписки?";
$labels['unsubscribe'] = "Отписаться";