Merge branch '3.6-rc'

This commit is contained in:
Tobias Diekershoff 2018-03-23 08:00:37 +01:00
commit 39dd3dffe0
733 changed files with 10943 additions and 8237 deletions

View file

@ -26,7 +26,7 @@ msgid "libertree Post Settings"
msgstr ""
#: libertree.php:69
msgid "Enable Libertree Post Plugin"
msgid "Enable Libertree Post Addon"
msgstr ""
#: libertree.php:74

View file

@ -2,7 +2,7 @@
$a->strings["Post to libertree"] = "Enviament a libertree";
$a->strings["libertree Post Settings"] = "Ajustos d'enviaments a libertree";
$a->strings["Enable Libertree Post Plugin"] = "Activa el plugin d'enviaments a libertree";
$a->strings["Enable Libertree Post Addon"] = "Activa el addon d'enviaments a libertree";
$a->strings["Libertree API token"] = "Libertree API token";
$a->strings["Libertree site URL"] = "lloc URL libertree";
$a->strings["Post to Libertree by default"] = "Enviar a libertree per defecte";

View file

@ -28,7 +28,7 @@ msgid "libertree Post Settings"
msgstr "libertree nastavení příspěvků"
#: libertree.php:69
msgid "Enable Libertree Post Plugin"
msgid "Enable Libertree Post Addon"
msgstr "Povolit Libertree Post rozšíření"
#: libertree.php:74

View file

@ -7,7 +7,7 @@ function string_plural_select_cs($n){
;
$a->strings["Post to libertree"] = "Poslat na libertree";
$a->strings["libertree Post Settings"] = "libertree nastavení příspěvků";
$a->strings["Enable Libertree Post Plugin"] = "Povolit Libertree Post rozšíření";
$a->strings["Enable Libertree Post Addon"] = "Povolit Libertree Post rozšíření";
$a->strings["Libertree API token"] = "Libertree API token";
$a->strings["Libertree site URL"] = "URL adresa Libertree ";
$a->strings["Post to Libertree by default"] = "Defaultně poslat na Libertree";

View file

@ -29,8 +29,8 @@ msgid "libertree Post Settings"
msgstr "libertree Post Einstellungen"
#: libertree.php:69
msgid "Enable Libertree Post Plugin"
msgstr "Libertree Post Plugin aktivieren"
msgid "Enable Libertree Post Addon"
msgstr "Libertree Post Addon aktivieren"
#: libertree.php:74
msgid "Libertree API token"

View file

@ -7,7 +7,7 @@ function string_plural_select_de($n){
;
$a->strings["Post to libertree"] = "bei libertree veröffentlichen";
$a->strings["libertree Post Settings"] = "libertree Post Einstellungen";
$a->strings["Enable Libertree Post Plugin"] = "Libertree Post Plugin aktivieren";
$a->strings["Enable Libertree Post Addon"] = "Libertree Post Addon aktivieren";
$a->strings["Libertree API token"] = "Libertree API Token";
$a->strings["Libertree site URL"] = "Libertree URL";
$a->strings["Post to Libertree by default"] = "Standardmäßig bei libertree veröffentlichen";

View file

@ -2,7 +2,7 @@
$a->strings["Post to libertree"] = "Afiŝi al libertree";
$a->strings["libertree Post Settings"] = "Agordoj por Afiŝoj ĉe libertree";
$a->strings["Enable Libertree Post Plugin"] = "Aktivigi Kromprogramon por Afiŝoj ĉe libertree";
$a->strings["Enable Libertree Post Addon"] = "Aktivigi Kromprogramon por Afiŝoj ĉe libertree";
$a->strings["Libertree API token"] = "Libertree API ĵetono";
$a->strings["Libertree site URL"] = "URL adreso de libertree retejo:";
$a->strings["Post to Libertree by default"] = "Defaŭlte afiŝi ĉe Libertree";

View file

@ -28,8 +28,8 @@ msgid "libertree Post Settings"
msgstr "Ajustes de Publicación de Libertree"
#: libertree.php:69
msgid "Enable Libertree Post Plugin"
msgstr "Habilitar Plugin de publicación de Libertree"
msgid "Enable Libertree Post Addon"
msgstr "Habilitar Addon de publicación de Libertree"
#: libertree.php:74
msgid "Libertree API token"

View file

@ -7,7 +7,7 @@ function string_plural_select_es($n){
;
$a->strings["Post to libertree"] = "Publicar en Libertree";
$a->strings["libertree Post Settings"] = "Ajustes de Publicación de Libertree";
$a->strings["Enable Libertree Post Plugin"] = "Habilitar Plugin de publicación de Libertree";
$a->strings["Enable Libertree Post Addon"] = "Habilitar Addon de publicación de Libertree";
$a->strings["Libertree API token"] = "Símbolo de API de Libertree";
$a->strings["Libertree site URL"] = "URL de la página de Libertree";
$a->strings["Post to Libertree by default"] = "Publicar en Libertree por defecto";

View file

@ -28,8 +28,8 @@ msgid "libertree Post Settings"
msgstr "Réglages des messages sur libertree"
#: libertree.php:69
msgid "Enable Libertree Post Plugin"
msgstr "Activer le plugin de publication sur libertree"
msgid "Enable Libertree Post Addon"
msgstr "Activer leaddonde publication sur libertree"
#: libertree.php:74
msgid "Libertree API token"

View file

@ -7,7 +7,7 @@ function string_plural_select_fr($n){
;
$a->strings["Post to libertree"] = "Publier sur libertree";
$a->strings["libertree Post Settings"] = "Réglages des messages sur libertree";
$a->strings["Enable Libertree Post Plugin"] = "Activer le plugin de publication sur libertree";
$a->strings["Enable Libertree Post Addon"] = "Activer le addon de publication sur libertree";
$a->strings["Libertree API token"] = "Clé de l'API libertree";
$a->strings["Libertree site URL"] = "URL du site libertree";
$a->strings["Post to Libertree by default"] = "Publier sur libertree par défaut";

View file

@ -2,7 +2,7 @@
$a->strings["Post to libertree"] = "";
$a->strings["libertree Post Settings"] = "";
$a->strings["Enable Libertree Post Plugin"] = "";
$a->strings["Enable Libertree Post Addon"] = "";
$a->strings["Libertree API token"] = "";
$a->strings["Libertree site URL"] = "";
$a->strings["Post to Libertree by default"] = "";

View file

@ -4,13 +4,13 @@
#
#
# Translators:
# fabrixxm <fabrix.xm@gmail.com>, 2014-2015
# fabrixxm <fabrix.xm@gmail.com>, 2014-2015,2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-08-31 10:18+0000\n"
"PO-Revision-Date: 2018-03-19 13:22+0000\n"
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
@ -28,8 +28,8 @@ msgid "libertree Post Settings"
msgstr "Impostazioni di invio a Libertree"
#: libertree.php:69
msgid "Enable Libertree Post Plugin"
msgstr "Abilita il plugin di invio a Libertree"
msgid "Enable Libertree Post Addon"
msgstr "Abilita il componente aggiuntivo di invio a Libertree"
#: libertree.php:74
msgid "Libertree API token"

View file

@ -7,7 +7,7 @@ function string_plural_select_it($n){
;
$a->strings["Post to libertree"] = "Invia a Libertree";
$a->strings["libertree Post Settings"] = "Impostazioni di invio a Libertree";
$a->strings["Enable Libertree Post Plugin"] = "Abilita il plugin di invio a Libertree";
$a->strings["Enable Libertree Post Addon"] = "Abilita il componente aggiuntivo di invio a Libertree";
$a->strings["Libertree API token"] = "Token API Libertree";
$a->strings["Libertree site URL"] = "Indirizzo sito Libertree";
$a->strings["Post to Libertree by default"] = "Invia sempre a Libertree";

View file

@ -2,7 +2,7 @@
$a->strings["Post to libertree"] = "";
$a->strings["libertree Post Settings"] = "";
$a->strings["Enable Libertree Post Plugin"] = "";
$a->strings["Enable Libertree Post Addon"] = "";
$a->strings["Libertree API token"] = "";
$a->strings["Libertree site URL"] = "";
$a->strings["Post to Libertree by default"] = "";

View file

@ -2,7 +2,7 @@
$a->strings["Post to libertree"] = "";
$a->strings["libertree Post Settings"] = "";
$a->strings["Enable Libertree Post Plugin"] = "";
$a->strings["Enable Libertree Post Addon"] = "";
$a->strings["Libertree API token"] = "";
$a->strings["Libertree site URL"] = "";
$a->strings["Post to Libertree by default"] = "";

View file

@ -28,7 +28,7 @@ msgid "libertree Post Settings"
msgstr "Configurações de publicação do Libertree"
#: libertree.php:69
msgid "Enable Libertree Post Plugin"
msgid "Enable Libertree Post Addon"
msgstr "Habilitar plug-in para publicar no Libertree"
#: libertree.php:74

View file

@ -7,7 +7,7 @@ function string_plural_select_pt_br($n){
;
$a->strings["Post to libertree"] = "Publicar no Libertree";
$a->strings["libertree Post Settings"] = "Configurações de publicação do Libertree";
$a->strings["Enable Libertree Post Plugin"] = "Habilitar plug-in para publicar no Libertree";
$a->strings["Enable Libertree Post Addon"] = "Habilitar plug-in para publicar no Libertree";
$a->strings["Libertree API token"] = "";
$a->strings["Libertree site URL"] = "";
$a->strings["Post to Libertree by default"] = "Publicar no Libertree por padrão";

View file

@ -28,7 +28,7 @@ msgid "libertree Post Settings"
msgstr "Configurări Postări libertree "
#: libertree.php:69
msgid "Enable Libertree Post Plugin"
msgid "Enable Libertree Post Addon"
msgstr "Activare Modul Postare Libertree"
#: libertree.php:74

View file

@ -7,7 +7,7 @@ function string_plural_select_ro($n){
;
$a->strings["Post to libertree"] = "Postați pe libertree";
$a->strings["libertree Post Settings"] = "Configurări Postări libertree ";
$a->strings["Enable Libertree Post Plugin"] = "Activare Modul Postare Libertree";
$a->strings["Enable Libertree Post Addon"] = "Activare Modul Postare Libertree";
$a->strings["Libertree API token"] = "Token API Libertree";
$a->strings["Libertree site URL"] = "URL site Libertree";
$a->strings["Post to Libertree by default"] = "Postați implicit pe Libertree";

View file

@ -2,7 +2,7 @@
$a->strings["Post to libertree"] = "";
$a->strings["libertree Post Settings"] = "";
$a->strings["Enable Libertree Post Plugin"] = "";
$a->strings["Enable Libertree Post Addon"] = "";
$a->strings["Libertree API token"] = "";
$a->strings["Libertree site URL"] = "";
$a->strings["Post to Libertree by default"] = "";

View file

@ -2,7 +2,7 @@
$a->strings["Post to libertree"] = "转播到libertree";
$a->strings["libertree Post Settings"] = "libertree转播设置";
$a->strings["Enable Libertree Post Plugin"] = "使Libertree转播插件可用";
$a->strings["Enable Libertree Post Addon"] = "使Libertree转播插件可用";
$a->strings["Libertree API token"] = "Libertree API令牌";
$a->strings["Libertree site URL"] = "Libertree网站URL";
$a->strings["Post to Libertree by default"] = "默认地转播到Libertree";

View file

@ -1,26 +1,29 @@
<?php
/**
* Name: Libertree Post Connector
* Description: Post to libertree accounts
* Version: 1.0
* Author: Tony Baldwin <https://free-haven.org/u/tony>
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Network;
function libertree_install() {
register_hook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
register_hook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
register_hook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
register_hook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
register_hook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
Addon::registerHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::registerHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::registerHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::registerHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
function libertree_uninstall() {
unregister_hook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
unregister_hook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
unregister_hook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
unregister_hook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
unregister_hook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
Addon::unregisterHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::unregisterHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::unregisterHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
@ -33,7 +36,7 @@ function libertree_jot_nets(&$a,&$b) {
$ltree_defpost = get_pconfig(local_user(),'libertree','post_by_default');
$selected = ((intval($ltree_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="libertree_enable"' . $selected . ' value="1" /> '
. t('Post to libertree') . '</div>';
. L10n::t('Post to libertree') . '</div>';
}
}
@ -64,36 +67,36 @@ function libertree_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<span id="settings_libertree_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_libertree_expanded\'); openClose(\'settings_libertree_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. t('libertree Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. L10n::t('libertree Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_libertree_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_libertree_expanded\'); openClose(\'settings_libertree_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. t('libertree Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. L10n::t('libertree Export').'</h3>';
$s .= '</span>';
$s .= '<div id="libertree-enable-wrapper">';
$s .= '<label id="libertree-enable-label" for="libertree-checkbox">' . t('Enable Libertree Post Plugin') . '</label>';
$s .= '<label id="libertree-enable-label" for="libertree-checkbox">' . L10n::t('Enable Libertree Post Addon') . '</label>';
$s .= '<input id="libertree-checkbox" type="checkbox" name="libertree" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="libertree-api_token-wrapper">';
$s .= '<label id="libertree-api_token-label" for="libertree-api_token">' . t('Libertree API token') . '</label>';
$s .= '<label id="libertree-api_token-label" for="libertree-api_token">' . L10n::t('Libertree API token') . '</label>';
$s .= '<input id="libertree-api_token" type="text" name="libertree_api_token" value="' . $ltree_api_token . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="libertree-url-wrapper">';
$s .= '<label id="libertree-url-label" for="libertree-url">' . t('Libertree site URL') . '</label>';
$s .= '<label id="libertree-url-label" for="libertree-url">' . L10n::t('Libertree site URL') . '</label>';
$s .= '<input id="libertree-url" type="text" name="libertree_url" value="' . $ltree_url . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="libertree-bydefault-wrapper">';
$s .= '<label id="libertree-bydefault-label" for="libertree-bydefault">' . t('Post to Libertree by default') . '</label>';
$s .= '<label id="libertree-bydefault-label" for="libertree-bydefault">' . L10n::t('Post to Libertree by default') . '</label>';
$s .= '<input id="libertree-bydefault" type="checkbox" name="libertree_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="libertree-submit" name="libertree-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="libertree-submit" name="libertree-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
}
@ -205,7 +208,7 @@ function libertree_send(&$a,&$b) {
} while ($oldbody != $body);
// convert to markdown
$body = bb2diaspora($body, false, false);
$body = bb2diaspora($body, false);
// Adding the title
if(strlen($title))
@ -218,9 +221,7 @@ function libertree_send(&$a,&$b) {
// 'token' => $ltree_api_token
);
$result = post_url($ltree_blog,$params);
$result = Network::post($ltree_blog, $params);
logger('libertree: ' . $result);
}
}