mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-10-10 08:52:59 +00:00
Merge branch '3.6-rc'
This commit is contained in:
commit
39dd3dffe0
733 changed files with 10943 additions and 8237 deletions
55
securemail/lang/de/messages.po
Normal file
55
securemail/lang/de/messages.po
Normal file
|
@ -0,0 +1,55 @@
|
|||
# ADDON securemail
|
||||
# Copyright (C)
|
||||
# This file is distributed under the same license as the Friendica securemail addon package.
|
||||
#
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-11 21:14+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Richard Zsemberi <rzsemberi@gmail.com>, 2018\n"
|
||||
"Language-Team: German (https://www.transifex.com/Friendica/teams/12172/de/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: de\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: securemail.php:53
|
||||
msgid "\"Secure Mail\" Settings"
|
||||
msgstr "\"Secure Mail\" Einstellungen"
|
||||
|
||||
#: securemail.php:54
|
||||
msgid "Save Settings"
|
||||
msgstr "Einstellungen speichern"
|
||||
|
||||
#: securemail.php:55 securemail.php:76
|
||||
msgid "Save and send test"
|
||||
msgstr "Abspeichern und Test Senden"
|
||||
|
||||
#: securemail.php:56
|
||||
msgid "Enable Secure Mail"
|
||||
msgstr "Secure Mail aktivieren"
|
||||
|
||||
#: securemail.php:57
|
||||
msgid "Public key"
|
||||
msgstr "Öffentlicher Schlüssel"
|
||||
|
||||
#: securemail.php:57
|
||||
msgid "Your public PGP key, ascii armored format"
|
||||
msgstr "Dein öffentlicher PGP Schlüssel, im Ascii-Format"
|
||||
|
||||
#: securemail.php:74
|
||||
msgid "Secure Mail Settings saved."
|
||||
msgstr "Secure Mail Einstellungen gespeichert."
|
||||
|
||||
#: securemail.php:111
|
||||
msgid "Test email sent"
|
||||
msgstr "Test-Email gesendet"
|
||||
|
||||
#: securemail.php:113
|
||||
msgid "There was an error sending the test email"
|
||||
msgstr "Es gab ein Fehler beim Senden der Test-Email"
|
16
securemail/lang/de/strings.php
Normal file
16
securemail/lang/de/strings.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
if(! function_exists("string_plural_select_de")) {
|
||||
function string_plural_select_de($n){
|
||||
return ($n != 1);;
|
||||
}}
|
||||
;
|
||||
$a->strings["\"Secure Mail\" Settings"] = "\"Secure Mail\" Einstellungen";
|
||||
$a->strings["Save Settings"] = "Einstellungen speichern";
|
||||
$a->strings["Save and send test"] = "Abspeichern und Test Senden";
|
||||
$a->strings["Enable Secure Mail"] = "Secure Mail aktivieren";
|
||||
$a->strings["Public key"] = "Öffentlicher Schlüssel";
|
||||
$a->strings["Your public PGP key, ascii armored format"] = "Dein öffentlicher PGP Schlüssel, im Ascii-Format";
|
||||
$a->strings["Secure Mail Settings saved."] = "Secure Mail Einstellungen gespeichert.";
|
||||
$a->strings["Test email sent"] = "Test-Email gesendet";
|
||||
$a->strings["There was an error sending the test email"] = "Es gab ein Fehler beim Senden der Test-Email";
|
55
securemail/lang/it/messages.po
Normal file
55
securemail/lang/it/messages.po
Normal file
|
@ -0,0 +1,55 @@
|
|||
# ADDON securemail
|
||||
# Copyright (C)
|
||||
# This file is distributed under the same license as the Friendica securemail addon package.
|
||||
#
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-11 21:14+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>, 2018\n"
|
||||
"Language-Team: Italian (https://www.transifex.com/Friendica/teams/12172/it/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: it\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: securemail.php:53
|
||||
msgid "\"Secure Mail\" Settings"
|
||||
msgstr "Impostazioni Secure Mail"
|
||||
|
||||
#: securemail.php:54
|
||||
msgid "Save Settings"
|
||||
msgstr "Salva Impostazioni"
|
||||
|
||||
#: securemail.php:55 securemail.php:76
|
||||
msgid "Save and send test"
|
||||
msgstr "Salva e invia mail di prova"
|
||||
|
||||
#: securemail.php:56
|
||||
msgid "Enable Secure Mail"
|
||||
msgstr "Abilita Secure Mail"
|
||||
|
||||
#: securemail.php:57
|
||||
msgid "Public key"
|
||||
msgstr "Chiave pubblica"
|
||||
|
||||
#: securemail.php:57
|
||||
msgid "Your public PGP key, ascii armored format"
|
||||
msgstr "La tua chiave pubblica PGP, in formato ascii armored"
|
||||
|
||||
#: securemail.php:74
|
||||
msgid "Secure Mail Settings saved."
|
||||
msgstr "Impostazioni Secure Mail salvate."
|
||||
|
||||
#: securemail.php:111
|
||||
msgid "Test email sent"
|
||||
msgstr "Email di prova invata"
|
||||
|
||||
#: securemail.php:113
|
||||
msgid "There was an error sending the test email"
|
||||
msgstr "Si è verificato un errore durante l'invio dell'email di prova"
|
16
securemail/lang/it/strings.php
Normal file
16
securemail/lang/it/strings.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
if(! function_exists("string_plural_select_it")) {
|
||||
function string_plural_select_it($n){
|
||||
return ($n != 1);;
|
||||
}}
|
||||
;
|
||||
$a->strings["\"Secure Mail\" Settings"] = "Impostazioni Secure Mail";
|
||||
$a->strings["Save Settings"] = "Salva Impostazioni";
|
||||
$a->strings["Save and send test"] = "Salva e invia mail di prova";
|
||||
$a->strings["Enable Secure Mail"] = "Abilita Secure Mail";
|
||||
$a->strings["Public key"] = "Chiave pubblica";
|
||||
$a->strings["Your public PGP key, ascii armored format"] = "La tua chiave pubblica PGP, in formato ascii armored";
|
||||
$a->strings["Secure Mail Settings saved."] = "Impostazioni Secure Mail salvate.";
|
||||
$a->strings["Test email sent"] = "Email di prova invata";
|
||||
$a->strings["There was an error sending the test email"] = "Si è verificato un errore durante l'invio dell'email di prova";
|
|
@ -7,8 +7,10 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
|
||||
require_once 'include/Emailer.php';
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Util\Emailer;
|
||||
|
||||
/* because the fraking openpgp-php is in composer, require libs in composer
|
||||
* and then don't use autoloader to load classes... */
|
||||
|
@ -23,19 +25,19 @@ require_once 'openpgp_crypt_symmetric.php';
|
|||
|
||||
|
||||
function securemail_install() {
|
||||
register_hook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
||||
register_hook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
||||
Addon::registerHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
||||
Addon::registerHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
||||
|
||||
register_hook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
|
||||
Addon::registerHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
|
||||
|
||||
logger('installed securemail');
|
||||
}
|
||||
|
||||
function securemail_uninstall() {
|
||||
unregister_hook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
||||
unregister_hook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
||||
Addon::unregisterHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
||||
Addon::unregisterHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
||||
|
||||
unregister_hook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
|
||||
Addon::unregisterHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
|
||||
|
||||
logger('removed securemail');
|
||||
}
|
||||
|
@ -43,7 +45,7 @@ function securemail_uninstall() {
|
|||
/**
|
||||
* @brief Build user settings form
|
||||
*
|
||||
* @link https://github.com/friendica/friendica/blob/develop/doc/Plugins.md#plugin_settings 'plugin_settings' hook
|
||||
* @link https://github.com/friendica/friendica/blob/develop/doc/Addons.md#addon_settings 'addon_settings' hook
|
||||
*
|
||||
* @param App $a App instance
|
||||
* @param string $s output html
|
||||
|
@ -60,19 +62,19 @@ function securemail_settings(App &$a, &$s){
|
|||
|
||||
$t = get_markup_template('admin.tpl', 'addon/securemail/');
|
||||
|
||||
$s .= replace_macros($t, array(
|
||||
'$title' => t('"Secure Mail" Settings'),
|
||||
'$submit' => t('Save Settings'),
|
||||
'$test' => t('Save and send test'), //NOTE: update also in 'post'
|
||||
'$enable' => array('securemail-enable', t('Enable Secure Mail'), $enable, ''),
|
||||
'$publickey' => array('securemail-pkey', t('Public key'), $publickey, t('Your public PGP key, ascii armored format'), 'rows="10"')
|
||||
));
|
||||
$s .= replace_macros($t, [
|
||||
'$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"']
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Handle data from user settings form
|
||||
*
|
||||
* @link https://github.com/friendica/friendica/blob/develop/doc/Plugins.md#plugin_settings_post 'plugin_settings_post' hook
|
||||
* @link https://github.com/friendica/friendica/blob/develop/doc/Addons.md#addon_settings_post 'addon_settings_post' hook
|
||||
*
|
||||
* @param App $a App instance
|
||||
* @param array $b hook data
|
||||
|
@ -88,10 +90,10 @@ function securemail_settings_post(App &$a, array &$b){
|
|||
if ($_POST['securemail-submit']) {
|
||||
set_pconfig(local_user(), 'securemail', 'pkey', trim($_POST['securemail-pkey']));
|
||||
$enable = ((x($_POST, 'securemail-enable')) ? 1 : 0);
|
||||
set_pconfig(local_user(), 'securemail', 'enable', $enable);
|
||||
info(t('Secure Mail Settings saved.') . EOL);
|
||||
PConfig::set(local_user(), 'securemail', 'enable', $enable);
|
||||
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();
|
||||
|
@ -126,9 +128,9 @@ function securemail_settings_post(App &$a, array &$b){
|
|||
set_pconfig(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +139,7 @@ function securemail_settings_post(App &$a, array &$b){
|
|||
/**
|
||||
* @brief Encrypt notification emails text
|
||||
*
|
||||
* @link https://github.com/friendica/friendica/blob/develop/doc/Plugins.md#emailer_send_prepare 'emailer_send_prepare' hook
|
||||
* @link https://github.com/friendica/friendica/blob/develop/doc/Addons.md#emailer_send_prepare 'emailer_send_prepare' hook
|
||||
*
|
||||
* @param App $a App instance
|
||||
* @param array $b hook data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue