X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=securemail%2Fsecuremail.php;h=d63c2ee97df2d0a4c8c8d0294eef5c86c1f99a2b;hb=40f99e48287c6cb44e3f1d3df3e8dabfb9d9c259;hp=e62b607675da0a8286ba4c32f344cb847bca8944;hpb=c71f7b0e1a7bb5ca88347b295dd3a4cc3106c5a9;p=friendica-addons.git diff --git a/securemail/securemail.php b/securemail/securemail.php index e62b6076..d63c2ee9 100644 --- a/securemail/securemail.php +++ b/securemail/securemail.php @@ -8,6 +8,7 @@ use Friendica\App; use Friendica\Core\Addon; +use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Util\Emailer; @@ -62,11 +63,11 @@ function securemail_settings(App &$a, &$s){ $t = get_markup_template('admin.tpl', 'addon/securemail/'); $s .= replace_macros($t, [ - '$title' => t('"Secure Mail" Settings'), - '$submit' => t('Save Settings'), - '$test' => t('Save and send test'), //NOTE: update also in 'post' - '$enable' => ['securemail-enable', t('Enable Secure Mail'), $enable, ''], - '$publickey' => ['securemail-pkey', t('Public key'), $publickey, t('Your public PGP key, ascii armored format'), 'rows="10"'] + '$title' => L10n::t('"Secure Mail" Settings'), + '$submit' => L10n::t('Save Settings'), + '$test' => L10n::t('Save and send test'), //NOTE: update also in 'post' + '$enable' => ['securemail-enable', L10n::t('Enable Secure Mail'), $enable, ''], + '$publickey' => ['securemail-pkey', L10n::t('Public key'), $publickey, L10n::t('Your public PGP key, ascii armored format'), 'rows="10"'] ]); } @@ -90,9 +91,9 @@ function securemail_settings_post(App &$a, array &$b){ PConfig::set(local_user(), 'securemail', 'pkey', trim($_POST['securemail-pkey'])); $enable = ((x($_POST, 'securemail-enable')) ? 1 : 0); PConfig::set(local_user(), 'securemail', 'enable', $enable); - info(t('Secure Mail Settings saved.') . EOL); + info(L10n::t('Secure Mail Settings saved.') . EOL); - if ($_POST['securemail-submit'] == t('Save and send test')) { + if ($_POST['securemail-submit'] == L10n::t('Save and send test')) { $sitename = $a->config['sitename']; $hostname = $a->get_hostname(); @@ -127,9 +128,9 @@ function securemail_settings_post(App &$a, array &$b){ PConfig::set(local_user(), 'securemail', 'enable', $enable); if ($res) { - info(t('Test email sent') . EOL); + info(L10n::t('Test email sent') . EOL); } else { - notice(t('There was an error sending the test email') . EOL); + notice(L10n::t('There was an error sending the test email') . EOL); } } }