';
+ . L10n::t('Post to blogger') . '';
}
}
@@ -74,40 +75,40 @@ function blogger_settings(&$a, &$s)
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
'. t('Blogger Export').'
';
+ $s .= '
'. L10n::t('Blogger Export').'
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
'. t('Blogger Export').'
';
+ $s .= '
'. L10n::t('Blogger Export').'
';
$s .= '';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
/* provide a submit button */
- $s .= '
';
+ $s .= '';
}
@@ -181,7 +182,7 @@ function blogger_send(&$a, &$b)
if ($bl_username && $bl_password && $bl_blog) {
require_once('include/bbcode.php');
- $title = '' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . '';
+ $title = '' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . '';
$post = $title . bbcode($b['body']);
$post = xmlify($post);
diff --git a/buffer/buffer.php b/buffer/buffer.php
index 9c36f7c4..02dd7ffb 100644
--- a/buffer/buffer.php
+++ b/buffer/buffer.php
@@ -10,6 +10,7 @@ require 'addon/buffer/bufferapp.php';
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function buffer_install() {
@@ -33,7 +34,7 @@ function buffer_module() {}
function buffer_content(&$a) {
if(! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return '';
}
@@ -60,10 +61,10 @@ function buffer_addon_admin(&$a, &$o)
$t = get_markup_template("admin.tpl", "addon/buffer/");
$o = replace_macros($t, [
- '$submit' => t('Save Settings'),
+ '$submit' => L10n::t('Save Settings'),
// name, label, value, help, [extra values]
- '$client_id' => ['client_id', t('Client ID'), Config::get('buffer', 'client_id'), ''],
- '$client_secret' => ['client_secret', t('Client Secret'), Config::get('buffer', 'client_secret'), ''],
+ '$client_id' => ['client_id', L10n::t('Client ID'), Config::get('buffer', 'client_id'), ''],
+ '$client_secret' => ['client_secret', L10n::t('Client Secret'), Config::get('buffer', 'client_secret'), ''],
]);
}
function buffer_addon_admin_post(&$a)
@@ -72,13 +73,13 @@ function buffer_addon_admin_post(&$a)
$client_secret = ((x($_POST, 'client_secret')) ? notags(trim($_POST['client_secret'])): '');
Config::set('buffer', 'client_id', $client_id);
Config::set('buffer', 'client_secret', $client_secret);
- info(t('Settings updated.'). EOL);
+ info(L10n::t('Settings updated.'). EOL);
}
function buffer_connect(&$a) {
if (isset($_REQUEST["error"])) {
- $o = t('Error when registering buffer connection:')." ".$_REQUEST["error"];
+ $o = L10n::t('Error when registering buffer connection:')." ".$_REQUEST["error"];
return $o;
}
// Start a session. This is necessary to hold on to a few keys the callback script will also need
@@ -97,8 +98,8 @@ function buffer_connect(&$a) {
$o .= 'Connect to Buffer!';
} else {
logger("buffer_connect: authenticated");
- $o .= t("You are now authenticated to buffer. ");
- $o .= ' '.t("return to the connector page").'';
+ $o .= L10n::t("You are now authenticated to buffer. ");
+ $o .= ' '.L10n::t("return to the connector page").'';
PConfig::set(local_user(), 'buffer','access_token', $buffer->access_token);
}
@@ -114,7 +115,7 @@ function buffer_jot_nets(&$a,&$b) {
$buffer_defpost = PConfig::get(local_user(),'buffer','post_by_default');
$selected = ((intval($buffer_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '
'
- . t('Post to Buffer') . '
';
+ . L10n::t('Post to Buffer') . '';
}
}
@@ -139,11 +140,11 @@ function buffer_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
';
@@ -176,7 +177,7 @@ function buffer_settings(&$a,&$s) {
$profiles = $buffer->go('/profiles');
if (is_array($profiles)) {
$s .= '
';
- $s .= t("Posts are going to all accounts that are enabled by default:");
+ $s .= L10n::t("Posts are going to all accounts that are enabled by default:");
$s .= "
";
foreach ($profiles as $profile) {
if (!$profile->default)
@@ -196,7 +197,7 @@ function buffer_settings(&$a,&$s) {
/* provide a submit button */
- $s .= '
' .t('Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon. The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'
';
+ $o = '
' .L10n::t('Information') .'
' .L10n::t('Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon. The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'
';
}
// output Gravatar settings
$o .= '';
$o .= replace_macros( $t, [
- '$submit' => t('Save Settings'),
- '$default_avatar' => ['avatar', t('Default avatar image'), $default_avatar, t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars],
- '$rating' => ['rating', t('Rating of images'), $rating, t('Select the appropriate avatar rating for your site. See README'), $ratings],
+ '$submit' => L10n::t('Save Settings'),
+ '$default_avatar' => ['avatar', L10n::t('Default avatar image'), $default_avatar, L10n::t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars],
+ '$rating' => ['rating', L10n::t('Rating of images'), $rating, L10n::t('Select the appropriate avatar rating for your site. See README'), $ratings],
]);
}
@@ -110,6 +111,5 @@ function gravatar_addon_admin_post (&$a) {
$rating = ((x($_POST, 'rating')) ? notags(trim($_POST['rating'])) : 'g');
Config::set('gravatar', 'default_img', $default_avatar);
Config::set('gravatar', 'rating', $rating);
- info( t('Gravatar settings updated.') .EOL);
+ info(L10n::t('Gravatar settings updated.') .EOL);
}
-?>
diff --git a/group_text/group_text.php b/group_text/group_text.php
index d5163e73..4c0cb14a 100644
--- a/group_text/group_text.php
+++ b/group_text/group_text.php
@@ -6,6 +6,7 @@
* Author: Thomas Willingham
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function group_text_install() {
@@ -42,7 +43,7 @@ function group_text_settings_post($a,$post) {
return;
PConfig::set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
- info( t('Group Text settings updated.') . EOL);
+ info(L10n::t('Group Text settings updated.') . EOL);
}
@@ -72,14 +73,14 @@ function group_text_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '
';
- $s .= '
' . t('Group Text') . '
';
+ $s .= '
' . L10n::t('Group Text') . '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
/* provide a submit button */
- $s .= '
';
+ $s .= '';
}
diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php
index 40cc5250..bdb2b607 100644
--- a/ifttt/ifttt.php
+++ b/ifttt/ifttt.php
@@ -12,6 +12,7 @@ require_once 'include/text.php';
use Friendica\App;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
@@ -51,35 +52,35 @@ function ifttt_settings(App $a, &$s)
}
$s .= '';
- $s .= '
' . t('IFTTT Mirror') . '
';
+ $s .= '
' . L10n::t('IFTTT Mirror') . '
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
' . t('IFTTT Mirror') . '
';
+ $s .= '
' . L10n::t('IFTTT Mirror') . '
';
$s .= '';
$s .= '
';
- $s .= '
' . t('Create an account at IFTTT. Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '
';
+ $s .= '
' . L10n::t('Create an account at IFTTT. Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '
';
+ . L10n::t('Post to Insanejournal') . '';
}
}
@@ -67,36 +68,36 @@ function ijpost_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
'.t('The impressum addon needs to be configured! Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon.').'
';
+ $b .= '
'.L10n::t('The impressum addon needs to be configured! Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon.').'
';
}
}
@@ -87,17 +88,17 @@ function impressum_addon_admin_post (&$a) {
Config::set('impressum','email',strip_tags($email));
Config::set('impressum','notes',strip_tags($notes));
Config::set('impressum','footer_text',strip_tags($footer_text));
- info( t('Settings updated.'). EOL );
+ info(L10n::t('Settings updated.'). EOL );
}
function impressum_addon_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/impressum/" );
$o = replace_macros($t, [
- '$submit' => t('Save Settings'),
- '$owner' => ['owner', t('Site Owner'), Config::get('impressum','owner'), t('The page operators name.')],
- '$ownerprofile' => ['ownerprofile', t('Site Owners Profile'), Config::get('impressum','ownerprofile'), t('Profile address of the operator.')],
- '$postal' => ['postal', t('Postal Address'), Config::get('impressum','postal'), t('How to contact the operator via snail mail. You can use BBCode here.')],
- '$notes' => ['notes', t('Notes'), Config::get('impressum','notes'), t('Additional notes that are displayed beneath the contact information. You can use BBCode here.')],
- '$email' => ['email', t('Email Address'), Config::get('impressum','email'), t('How to contact the operator via email. (will be displayed obfuscated)')],
- '$footer_text' => ['footer_text', t('Footer note'), Config::get('impressum','footer_text'), t('Text for the footer. You can use BBCode here.')],
+ '$submit' => L10n::t('Save Settings'),
+ '$owner' => ['owner', L10n::t('Site Owner'), Config::get('impressum','owner'), L10n::t('The page operators name.')],
+ '$ownerprofile' => ['ownerprofile', L10n::t('Site Owners Profile'), Config::get('impressum','ownerprofile'), L10n::t('Profile address of the operator.')],
+ '$postal' => ['postal', L10n::t('Postal Address'), Config::get('impressum','postal'), L10n::t('How to contact the operator via snail mail. You can use BBCode here.')],
+ '$notes' => ['notes', L10n::t('Notes'), Config::get('impressum','notes'), L10n::t('Additional notes that are displayed beneath the contact information. You can use BBCode here.')],
+ '$email' => ['email', L10n::t('Email Address'), Config::get('impressum','email'), L10n::t('How to contact the operator via email. (will be displayed obfuscated)')],
+ '$footer_text' => ['footer_text', L10n::t('Footer note'), Config::get('impressum','footer_text'), L10n::t('Text for the footer. You can use BBCode here.')],
]);
}
diff --git a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
index cdadf030..e92d3440 100644
--- a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
+++ b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
@@ -6,45 +6,46 @@
* Author: Thomas Willingham
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
-function infiniteimprobabilitydrive_install() {
-Addon::registerHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
+function infiniteimprobabilitydrive_install()
+{
+ Addon::registerHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}
-function infiniteimprobabilitydrive_uninstall() {
-Addon::unregisterHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
-
+function infiniteimprobabilitydrive_uninstall()
+{
+ Addon::unregisterHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}
-function infiniteimprobabilitydrive_app_menu($a,&$b) {
-$b['app_menu'][] = '
';
+ $s .= '';
return;
}
@@ -65,7 +66,7 @@ function pledgie_addon_settings_post(&$a,&$b) {
if($_POST['pledgie-submit']) {
Config::set('pledgie-describe','text',trim(strip_tags($_POST['pledgie-describe'])));
Config::set('pledgie-campaign','text',trim(strip_tags($_POST['pledgie-campaign'])));
- info( t('pledgie Settings saved.') . EOL);
+ info(L10n::t('pledgie Settings saved.') . EOL);
}
}
diff --git a/public_server/public_server.php b/public_server/public_server.php
index 2c096568..1b30b40b 100644
--- a/public_server/public_server.php
+++ b/public_server/public_server.php
@@ -7,14 +7,14 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Model\User;
-
function public_server_install() {
Addon::registerHook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
Addon::registerHook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
- Addon::registerHook('enotify','addon/public_server/public_server.php', 'public_server_enotify');
+ Addon::registerHook('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
Addon::registerHook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
}
@@ -23,7 +23,7 @@ function public_server_uninstall() {
Addon::unregisterHook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
Addon::unregisterHook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
- Addon::unregisterHook('enotify','addon/public_server/public_server.php', 'public_server_enotify');
+ Addon::unregisterHook('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
Addon::unregisterHook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
}
@@ -61,7 +61,7 @@ function public_server_cron($a,$b) {
'language' => $rr['language'],
'to_name' => $rr['username'],
'to_email' => $rr['email'],
- 'source_name' => t('Administrator'),
+ 'source_name' => L10n::t('Administrator'),
'source_link' => $a->get_baseurl(),
'source_photo' => $a->get_baseurl() . '/images/person-80.jpg',
]);
@@ -125,9 +125,9 @@ function public_server_enotify(&$a, &$b) {
if (x($b, 'params') && $b['params']['type'] == NOTIFY_SYSTEM
&& x($b['params'], 'system_type') && $b['params']['system_type'] === 'public_server_expire') {
$b['itemlink'] = $a->get_baseurl();
- $b['epreamble'] = $b['preamble'] = sprintf( t('Your account on %s will expire in a few days.'), Config::get('system','sitename'));
- $b['subject'] = t('Your Friendica account is about to expire.');
- $b['body'] = sprintf( t("Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days"), $b['params']['to_name'], "[url=" . $app->config["system"]["url"] . "]" . $app->config["sitename"] . "[/url]");
+ $b['epreamble'] = $b['preamble'] = sprintf(L10n::t('Your account on %s will expire in a few days.'), Config::get('system','sitename'));
+ $b['subject'] = L10n::t('Your Friendica account is about to expire.');
+ $b['body'] = sprintf(L10n::t("Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days"), $b['params']['to_name'], "[url=" . $app->config["system"]["url"] . "]" . $app->config["sitename"] . "[/url]");
}
}
@@ -155,15 +155,15 @@ function public_server_addon_admin_post ( &$a ) {
Config::set( 'public_server','flagusers',$flagusers);
Config::set( 'public_server','flagposts',$flagposts );
Config::set( 'public_server','flagpostsexpire',$flagpostsexpire );
- info( t('Settings saved').EOL );
+ info(L10n::t('Settings saved').EOL );
}
function public_server_addon_admin ( &$a, &$o) {
$token = get_form_security_token("publicserver");
$t = get_markup_template( "admin.tpl", "addon/public_server");
$o = replace_macros($t, [
- '$submit' => t('Save Settings'),
+ '$submit' => L10n::t('Save Settings'),
'$form_security_token' => $token,
- '$infotext' => t('Set any of these options to 0 to deactivate it.'),
+ '$infotext' => L10n::t('Set any of these options to 0 to deactivate it.'),
'$expiredays' => [ "expiredays","Expire Days", intval(Config::get('public_server', 'expiredays')), "When an account is created on the site, it is given a hard "],
'$expireposts' => [ "expireposts", "Expire Posts", intval(Config::get('public_server','expireposts')), "Set the default days for posts to expire here"],
'$nologin' => [ "nologin", "No Login", intval(Config::get('public_server','nologin')), "Remove users who have never logged in after nologin days "],
@@ -172,4 +172,3 @@ function public_server_addon_admin ( &$a, &$o) {
'$flagpostsexpire' => [ "flagpostsexpire", "Flag posts expire", intval(Config::get('public_server','flagpostsexpire'))],
]);
}
-
diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php
index d4c45989..6ab37583 100644
--- a/pumpio/pumpio.php
+++ b/pumpio/pumpio.php
@@ -7,6 +7,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Model\Contact;
@@ -50,7 +51,7 @@ function pumpio_module() {}
function pumpio_content(&$a) {
if(! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return '';
}
@@ -146,7 +147,7 @@ function pumpio_connect(&$a) {
if (($consumer_key == "") || ($consumer_secret == "")) {
logger("pumpio_connect: ".sprintf("Unable to register the client at the pump.io server '%s'.", $hostname));
- $o .= sprintf(t("Unable to register the client at the pump.io server '%s'."), $hostname);
+ $o .= sprintf(L10n::t("Unable to register the client at the pump.io server '%s'."), $hostname);
return($o);
}
@@ -186,8 +187,8 @@ function pumpio_connect(&$a) {
if($success) {
logger("pumpio_connect: authenticated");
- $o .= t("You are now authenticated to pumpio.");
- $o .= ' '.t("return to the connector page").'';
+ $o .= L10n::t("You are now authenticated to pumpio.");
+ $o .= ' '.L10n::t("return to the connector page").'';
} else {
logger("pumpio_connect: could not connect");
$o = 'Could not connect to pumpio. Refresh the page or try again later.';
@@ -205,7 +206,7 @@ function pumpio_jot_nets(&$a,&$b) {
$pumpio_defpost = PConfig::get(local_user(),'pumpio','post_by_default');
$selected = ((intval($pumpio_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '
'
- . t('Post to pumpio') . '
';
+ . L10n::t('Post to pumpio') . '';
}
}
@@ -243,20 +244,20 @@ function pumpio_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
';
}
@@ -307,7 +308,7 @@ function pumpio_settings(&$a,&$s) {
/* provide a submit button */
- $s .= '
';
+ $s .= '
';
}
@@ -554,7 +555,7 @@ function pumpio_send(&$a,&$b) {
$s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $params]);
Queue::add($a->contact, NETWORK_PUMPIO, $s);
- notice(t('Pump.io post failed. Queued for retry.').EOL);
+ notice(L10n::t('Pump.io post failed. Queued for retry.').EOL);
}
}
}
@@ -630,7 +631,7 @@ function pumpio_action(&$a, $uid, $uri, $action, $content = "") {
$s = serialize(['url' => $url, 'item' => $orig_post["id"], 'post' => $params]);
Queue::add($a->contact, NETWORK_PUMPIO, $s);
- notice(t('Pump.io like failed. Queued for retry.').EOL);
+ notice(L10n::t('Pump.io like failed. Queued for retry.').EOL);
}
}
@@ -719,7 +720,7 @@ function pumpio_fetchtimeline(&$a, $uid) {
// get the application name for the pump.io app
// 1st try personal config, then system config and fallback to the
// hostname of the node if neither one is set.
- $application_name = PConfig::get( $uid, 'pumpio', 'application_name');
+ $application_name = PConfig::get($uid, 'pumpio', 'application_name');
if ($application_name == "")
$application_name = Config::get('pumpio', 'application_name');
if ($application_name == "")
@@ -963,11 +964,11 @@ function pumpio_dolike(&$a, $uid, $self, $post, $own_id, $threadcompletion = tru
$author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]';
$objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]';
- $post_type = t('status');
+ $post_type = L10n::t('status');
$plink = '[url=' . $orig_post['plink'] . ']' . $post_type . '[/url]';
$likedata['object-type'] = ACTIVITY_OBJ_NOTE;
- $likedata['body'] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink);
+ $likedata['body'] = sprintf(L10n::t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink);
$likedata['object'] = '';
diff --git a/qcomment/qcomment.php b/qcomment/qcomment.php
index 447f8abf..c499fb86 100644
--- a/qcomment/qcomment.php
+++ b/qcomment/qcomment.php
@@ -1,25 +1,24 @@
- *
+ *
* Provides a set of text "snippets" which can be inserted into a comment window by clicking on them.
- * First enable the addon in the system admin panel.
- * Then each person can tailor their choice of words in Settings->Addon Settings in the Qcomment
+ * First enable the addon in the system admin panel.
+ * Then each person can tailor their choice of words in Settings->Addon Settings in the Qcomment
* pane. Initially no qcomments are provided, but on viewing the settings page, a default set of
- * of words is suggested. These can be accepted (click Submit) or edited first. Each text line represents
- * a different qcomment.
+ * of words is suggested. These can be accepted (click Submit) or edited first. Each text line represents
+ * a different qcomment.
* Many themes will hide the qcomments above or immediately adjacent to the comment input box until
* you wish to use them. On some themes they may be visible.
- * Wave the mouse around near the comment input box and the qcomments will show up. Click on any of
+ * Wave the mouse around near the comment input box and the qcomments will show up. Click on any of
* them to open the comment window fully and insert the qcomment. Then "Submit" will submit it.
*
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function qcomment_install() {
@@ -28,17 +27,12 @@ function qcomment_install() {
}
-
function qcomment_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
}
-
-
-
-
function qcomment_addon_settings(&$a, &$s)
{
if (! local_user()) {
@@ -49,17 +43,17 @@ function qcomment_addon_settings(&$a, &$s)
$a->page['htmlhead'] .= '' . "\r\n";
- $words = PConfig::get(local_user(), 'qcomment', 'words', t(':-)') . "\n" . t(':-(') . "\n" . t('lol'));
+ $words = PConfig::get(local_user(), 'qcomment', 'words', L10n::t(':-)') . "\n" . L10n::t(':-(') . "\n" . L10n::t('lol'));
$s .= '
';
- $s .= '
' . t('Quick Comment Settings') . '
';
+ $s .= '
' . L10n::t('Quick Comment Settings') . '
';
$s .= '
';
- $s .= '
' . t("Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies.") . '
';
- $s .= '';
+ $s .= '
' . L10n::t("Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies.") . '
';
+ $s .= '';
$s .= '';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '
';
return;
@@ -72,7 +66,6 @@ function qcomment_addon_settings_post(&$a,&$b) {
if($_POST['qcomment-submit']) {
PConfig::set(local_user(),'qcomment','words',xmlify($_POST['qcomment-words']));
- info( t('Quick Comment settings saved.') . EOL);
+ info(L10n::t('Quick Comment settings saved.') . EOL);
}
}
-
diff --git a/randplace/randplace.php b/randplace/randplace.php
index 96e549a6..abf59e2d 100644
--- a/randplace/randplace.php
+++ b/randplace/randplace.php
@@ -19,6 +19,7 @@
*
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function randplace_install() {
@@ -167,14 +168,14 @@ function randplace_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '
';
- $s .= '
' . t('Randplace Settings') . '
';
+ $s .= '
' . L10n::t('Randplace Settings') . '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
/* provide a submit button */
- $s .= '
';
+ $s .= '';
}
diff --git a/remote_permissions/remote_permissions.php b/remote_permissions/remote_permissions.php
index 408316e6..94bdf5c1 100644
--- a/remote_permissions/remote_permissions.php
+++ b/remote_permissions/remote_permissions.php
@@ -8,6 +8,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function remote_permissions_install() {
@@ -44,10 +45,10 @@ function remote_permissions_settings(&$a,&$o) {
// $t = file_get_contents("addon/remote_permissions/settings.tpl" );
$t = get_markup_template("settings.tpl", "addon/remote_permissions/" );
$o .= replace_macros($t, [
- '$remote_perms_title' => t('Remote Permissions Settings'),
- '$remote_perms_label' => t('Allow recipients of your private posts to see the other recipients of the posts'),
+ '$remote_perms_title' => L10n::t('Remote Permissions Settings'),
+ '$remote_perms_label' => L10n::t('Allow recipients of your private posts to see the other recipients of the posts'),
'$checked' => (($remote_perms == 1) ? 'checked="checked"' : ''),
- '$submit' => t('Save Settings')
+ '$submit' => L10n::t('Save Settings')
]);
}
@@ -57,7 +58,7 @@ function remote_permissions_settings_post($a,$post) {
return;
PConfig::set(local_user(),'remote_perms','show',intval($_POST['remote-perms']));
- info( t('Remote Permissions settings updated.') . EOL);
+ info(L10n::t('Remote Permissions settings updated.') . EOL);
}
function remote_permissions_content($a, $item_copy) {
@@ -123,7 +124,7 @@ function remote_permissions_content($a, $item_copy) {
$deny_users = expand_acl($item['deny_cid']);
$deny_groups = expand_acl($item['deny_gid']);
- $o = t('Visible to:') . ' ';
+ $o = L10n::t('Visible to:') . ' ';
$allow = [];
$deny = [];
@@ -177,7 +178,7 @@ function remote_permissions_content($a, $item_copy) {
if(! $r)
return;
- $o = t('Visible to') . ' (' . t('may only be a partial list') . '): ';
+ $o = L10n::t('Visible to') . ' (' . L10n::t('may only be a partial list') . '): ';
foreach($r as $rr)
$allow_names[] = $rr['username'];
@@ -195,15 +196,14 @@ function remote_permissions_content($a, $item_copy) {
function remote_permissions_addon_admin(&$a, &$o){
$t = get_markup_template( "admin.tpl", "addon/remote_permissions/" );
$o = replace_macros($t, [
- '$submit' => t('Save Settings'),
- '$global' => ['remotepermschoice', t('Global'), 1, t('The posts of every user on this server show the post recipients'), Config::get('remote_perms', 'global') == 1],
- '$individual' => ['remotepermschoice', t('Individual'), 2, t('Each user chooses whether his/her posts show the post recipients'), Config::get('remote_perms', 'global') == 0]
+ '$submit' => L10n::t('Save Settings'),
+ '$global' => ['remotepermschoice', L10n::t('Global'), 1, L10n::t('The posts of every user on this server show the post recipients'), Config::get('remote_perms', 'global') == 1],
+ '$individual' => ['remotepermschoice', L10n::t('Individual'), 2, L10n::t('Each user chooses whether his/her posts show the post recipients'), Config::get('remote_perms', 'global') == 0]
]);
}
function remote_permissions_addon_admin_post(&$a){
$choice = ((x($_POST,'remotepermschoice')) ? notags(trim($_POST['remotepermschoice'])) : '');
Config::set('remote_perms','global',($choice == 1 ? 1 : 0));
- info( t('Settings updated.'). EOL );
+ info(L10n::t('Settings updated.'). EOL);
}
-
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);
}
}
}
diff --git a/showmore/showmore.php b/showmore/showmore.php
index f6e5028c..c2d4b194 100644
--- a/showmore/showmore.php
+++ b/showmore/showmore.php
@@ -8,6 +8,7 @@
*
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function showmore_install() {
@@ -37,24 +38,24 @@ function showmore_addon_settings(&$a,&$s) {
$chars = '1100';
$s .= '';
- $s .= '
';
}
}
diff --git a/startpage/startpage.php b/startpage/startpage.php
index 872fb234..840b547e 100644
--- a/startpage/startpage.php
+++ b/startpage/startpage.php
@@ -7,6 +7,7 @@
*
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function startpage_install() {
@@ -51,16 +52,12 @@ function startpage_settings_post($a,$post) {
PConfig::set(local_user(),'startpage','startpage',strip_tags(trim($_POST['startpage'])));
}
-
/**
*
* Called from the Addon Setting form.
* Add our own settings info to the page.
*
*/
-
-
-
function startpage_settings(&$a,&$s) {
if(! local_user())
@@ -78,20 +75,20 @@ function startpage_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
' . t('Startpage') . '
';
+ $s .= '
' . L10n::t('Startpage') . '
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
' . t('Startpage') . '
';
+ $s .= '
' . L10n::t('Startpage') . '
';
$s .= '';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
- $s .= '
' . t('Examples: "network" or "notifications/system"') . '
';
+ $s .= '
' . L10n::t('Examples: "network" or "notifications/system"') . '
';
/* provide a submit button */
- $s .= '
';
+ $s .= '';
}
diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php
index 3d708389..f9b770a9 100644
--- a/statusnet/statusnet.php
+++ b/statusnet/statusnet.php
@@ -49,6 +49,7 @@ use Friendica\App;
use Friendica\Content\OEmbed;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Model\GContact;
use Friendica\Model\Group;
@@ -190,7 +191,7 @@ function statusnet_jot_nets(App $a, &$b)
$statusnet_defpost = PConfig::get(local_user(), 'statusnet', 'post_by_default');
$selected = ((intval($statusnet_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '
'
- . t('Post to GNU Social') . '
';
+ . L10n::t('Post to GNU Social') . '';
}
}
@@ -238,7 +239,7 @@ function statusnet_settings_post(App $a, $post)
PConfig::set(local_user(), 'statusnet', 'baseapi', $asn['apiurl']);
//PConfig::set(local_user(), 'statusnet', 'application_name', $asn['applicationname'] );
} else {
- notice(t('Please contact your site administrator. The provided API URL is not valid.') . EOL . $asn['apiurl'] . EOL);
+ notice(L10n::t('Please contact your site administrator. The provided API URL is not valid.') . EOL . $asn['apiurl'] . EOL);
}
}
}
@@ -267,7 +268,7 @@ function statusnet_settings_post(App $a, $post)
PConfig::set(local_user(), 'statusnet', 'baseapi', $apibase);
} else {
// still not the correct API base, let's do noting
- notice(t('We could not contact the GNU Social API with the Path you entered.') . EOL);
+ notice(L10n::t('We could not contact the GNU Social API with the Path you entered.') . EOL);
}
}
goaway('settings/connectors');
@@ -301,7 +302,7 @@ function statusnet_settings_post(App $a, $post)
if (!intval($_POST['statusnet-mirror']))
PConfig::delete(local_user(), 'statusnet', 'lastid');
- info(t('GNU Social settings updated.') . EOL);
+ info(L10n::t('GNU Social settings updated.') . EOL);
}
}
}
@@ -342,11 +343,11 @@ function statusnet_settings(App $a, &$s)
$css = (($enabled) ? '' : '-disabled');
$s .= '';
- $s .= '
' . t('GNU Social Import/Export/Mirror') . '
';
+ $s .= '
' . L10n::t('GNU Social Import/Export/Mirror') . '
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
' . t('GNU Social Import/Export/Mirror') . '
';
+ $s .= '
' . L10n::t('GNU Social Import/Export/Mirror') . '
';
$s .= '';
if ((!$ckey) && (!$csecret)) {
@@ -361,31 +362,31 @@ function statusnet_settings(App $a, &$s)
* ignore this option entirely.
*/
if (!$globalsn == null) {
- $s .= '
' . t('Globally Available GNU Social OAuthKeys') . '
';
- $s .= '
' . t("There are preconfigured OAuth key pairs for some GNU Social servers available. If you are using one of them, please use these credentials. If not feel free to connect to any other GNU Social instance \x28see below\x29.") . '
';
+ $s .= '
' . L10n::t('Globally Available GNU Social OAuthKeys') . '
';
+ $s .= '
' . L10n::t("There are preconfigured OAuth key pairs for some GNU Social servers available. If you are using one of them, please use these credentials. If not feel free to connect to any other GNU Social instance \x28see below\x29.") . '
' . t('No consumer key pair for GNU Social found. Register your Friendica Account as an desktop client on your GNU Social account, copy the consumer key pair here and enter the API base root. Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendica installation at your favorited GNU Social installation.') . '
';
+ $s .= '
' . L10n::t('Provide your own OAuth Credentials') . '
';
+ $s .= '
' . L10n::t('No consumer key pair for GNU Social found. Register your Friendica Account as an desktop client on your GNU Social account, copy the consumer key pair here and enter the API base root. Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendica installation at your favorited GNU Social installation.') . '
';
} else {
/* * *
@@ -404,22 +405,22 @@ function statusnet_settings(App $a, &$s)
/* * *
* make some nice form
*/
- $s .= '
' . t('To connect to your GNU Social account click the button below to get a security code from GNU Social which you have to copy into the input box below and submit the form. Only your public posts will be posted to GNU Social.') . '
';
- $s .= '';
+ $s .= '
' . L10n::t('To connect to your GNU Social account click the button below to get a security code from GNU Social which you have to copy into the input box below and submit the form. Only your public posts will be posted to GNU Social.') . '
' . t('If enabled all your public postings can be posted to the associated GNU Social account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.') . '
' . L10n::t('If enabled all your public postings can be posted to the associated GNU Social account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.') . '
';
if ($a->user['hidewall']) {
- $s .= '
' . t('Note: Due your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to GNU Social will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '
';
+ $s .= '
' . L10n::t('Note: Due your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to GNU Social will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '
';
+ $s .= '';
return;
}
@@ -75,7 +76,7 @@ function superblock_addon_settings_post(&$a,&$b) {
if($_POST['superblock-submit']) {
PConfig::set(local_user(),'system','blocked',trim($_POST['superblock-words']));
- info( t('SUPERBLOCK Settings saved.') . EOL);
+ info(L10n::t('SUPERBLOCK Settings saved.') . EOL);
}
}
@@ -147,7 +148,7 @@ function superblock_item_photo_menu(&$a,&$b) {
}
}
- $b['menu'][ t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\'); return false;';
+ $b['menu'][L10n::t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\'); return false;';
}
function superblock_module() {}
@@ -167,6 +168,6 @@ function superblock_init(&$a) {
}
PConfig::set(local_user(),'system','blocked',$words);
- info( t('superblock settings updated') . EOL );
+ info(L10n::t('superblock settings updated') . EOL );
killme();
}
diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php
index f28d8d55..6eb9344e 100644
--- a/testdrive/testdrive.php
+++ b/testdrive/testdrive.php
@@ -1,5 +1,4 @@
$rr['language'],
'to_name' => $rr['username'],
'to_email' => $rr['email'],
- 'source_name' => t('Administrator'),
+ 'source_name' => L10n::t('Administrator'),
'source_link' => $a->get_baseurl(),
'source_photo' => $a->get_baseurl() . '/images/person-80.jpg',
]);
@@ -90,8 +89,8 @@ function testdrive_enotify(&$a, &$b) {
if (x($b, 'params') && $b['params']['type'] == NOTIFY_SYSTEM
&& x($b['params'], 'system_type') && $b['params']['system_type'] === 'testdrive_expire') {
$b['itemlink'] = $a->get_baseurl();
- $b['epreamble'] = $b['preamble'] = sprintf( t('Your account on %s will expire in a few days.'), Config::get('system','sitename'));
- $b['subject'] = t('Your Friendica test account is about to expire.');
- $b['body'] = sprintf( t("Hi %1\$s,\n\nYour test account on %2\$s will expire in less than five days. We hope you enjoyed this test drive and use this opportunity to find a permanent Friendica website for your integrated social communications. A list of public sites is available at %s/siteinfo - and for more information on setting up your own Friendica server please see the Friendica project website at http://friendica.com."), $b['params']['to_name'], "[url=".$app->config["system"]["url"]."]".$app->config["sitename"]."[/url]", get_server());
+ $b['epreamble'] = $b['preamble'] = sprintf(L10n::t('Your account on %s will expire in a few days.'), Config::get('system','sitename'));
+ $b['subject'] = L10n::t('Your Friendica test account is about to expire.');
+ $b['body'] = sprintf(L10n::t("Hi %1\$s,\n\nYour test account on %2\$s will expire in less than five days. We hope you enjoyed this test drive and use this opportunity to find a permanent Friendica website for your integrated social communications. A list of public sites is available at %s/siteinfo - and for more information on setting up your own Friendica server please see the Friendica project website at http://friendica.com."), $b['params']['to_name'], "[url=".$app->config["system"]["url"]."]".$app->config["sitename"]."[/url]", get_server());
}
}
diff --git a/tictac/tictac.php b/tictac/tictac.php
index f928fd5e..fe2c5cf1 100644
--- a/tictac/tictac.php
+++ b/tictac/tictac.php
@@ -6,6 +6,7 @@
* Author: Mike Macgirvin
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
function tictac_install() {
Addon::registerHook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
@@ -17,7 +18,7 @@ function tictac_uninstall() {
}
function tictac_app_menu($a,&$b) {
- $b['app_menu'][] = '
' . t('Three dimensional tic-tac-toe is just like the traditional game except that it is played on multiple levels simultaneously. ');
- $o .= t('In this case there are three levels. You win by getting three in a row on any level, as well as up, down, and diagonally across the different levels.');
+ $o .= '' . L10n::t('New game') . ' ';
+ $o .= '' . L10n::t('New game with handicap') . ' ';
+ $o .= '
' . L10n::t('Three dimensional tic-tac-toe is just like the traditional game except that it is played on multiple levels simultaneously. ');
+ $o .= L10n::t('In this case there are three levels. You win by getting three in a row on any level, as well as up, down, and diagonally across the different levels.');
$o .= '
';
- $o .= t('The handicap game disables the center position on the middle level because the player claiming this square often has an unfair advantage.');
+ $o .= L10n::t('The handicap game disables the center position on the middle level because the player claiming this square often has an unfair advantage.');
$o .= '
';
+ . L10n::t('Post to Tumblr') . '';
}
}
@@ -206,24 +206,24 @@ function tumblr_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
';
$s .= '';
if ((!$ckey) && (!$csecret)) {
@@ -283,7 +283,7 @@ function twitter_settings(App $a, &$s)
* no global consumer keys
* display warning and skip personal config
*/
- $s .= '
' . t('No consumer key pair for Twitter found. Please contact your site administrator.') . '
';
+ $s .= '
' . L10n::t('No consumer key pair for Twitter found. Please contact your site administrator.') . '
';
} else {
/* * *
* ok we have a consumer key pair now look into the OAuth stuff
@@ -302,15 +302,15 @@ function twitter_settings(App $a, &$s)
/* * *
* make some nice form
*/
- $s .= '
' . t('At this Friendica instance the Twitter addon was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your public posts will be posted to Twitter.') . '
';
- $s .= '';
+ $s .= '
' . L10n::t('At this Friendica instance the Twitter addon was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your public posts will be posted to Twitter.') . '
';
$s .= replace_macros($field_checkbox, [
- '$field' => ['twitter-enable', t('Allow posting to Twitter'), $enabled, t('If enabled all your public postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.')]
+ '$field' => ['twitter-enable', L10n::t('Allow posting to Twitter'), $enabled, L10n::t('If enabled all your public postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.')]
]);
if ($a->user['hidewall']) {
- $s .= '
' . t('Note: Due to your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '
';
+ $s .= '
' . L10n::t('Note: Due to your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '
';
}
$s .= replace_macros($field_checkbox, [
- '$field' => ['twitter-default', t('Send public postings to Twitter by default'), $defenabled, '']
+ '$field' => ['twitter-default', L10n::t('Send public postings to Twitter by default'), $defenabled, '']
]);
$s .= replace_macros($field_checkbox, [
- '$field' => ['twitter-mirror', t('Mirror all posts from twitter that are no replies'), $mirrorenabled, '']
+ '$field' => ['twitter-mirror', L10n::t('Mirror all posts from twitter that are no replies'), $mirrorenabled, '']
]);
$s .= replace_macros($field_checkbox, [
- '$field' => ['twitter-import', t('Import the remote timeline'), $importenabled, '']
+ '$field' => ['twitter-import', L10n::t('Import the remote timeline'), $importenabled, '']
]);
$s .= replace_macros($field_checkbox, [
- '$field' => ['twitter-create_user', t('Automatically create contacts'), $create_userenabled, '']
+ '$field' => ['twitter-create_user', L10n::t('Automatically create contacts'), $create_userenabled, '']
]);
$s .= '';
- $s .= '';
+ $s .= '';
}
}
$s .= '
';
}
function webrtc_addon_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/webrtc/" );
$o = replace_macros( $t, [
- '$submit' => t('Save Settings'),
- '$webrtcurl' => ['webrtcurl', t('WebRTC Base URL'), Config::get('webrtc','webrtcurl' ), t('Page your users will create a WebRTC chat room on. For example you could use https://live.mayfirst.org .')],
+ '$submit' => L10n::t('Save Settings'),
+ '$webrtcurl' => ['webrtcurl', L10n::t('WebRTC Base URL'), Config::get('webrtc','webrtcurl' ), L10n::t('Page your users will create a WebRTC chat room on. For example you could use https://live.mayfirst.org .')],
]);
}
function webrtc_addon_admin_post (&$a) {
$url = ((x($_POST, 'webrtcurl')) ? notags(trim($_POST['webrtcurl'])) : '');
Config::set('webrtc', 'webrtcurl', $url);
- info( t('Settings updated.'). EOL);
+ info(L10n::t('Settings updated.'). EOL);
}
function webrtc_module() {
@@ -46,10 +47,10 @@ function webrtc_content(&$a) {
$webrtcurl = Config::get('webrtc','webrtcurl');
/* embedd the landing page in an iframe */
- $o .= '
'.t('Video Chat').'
';
- $o .= '
'.t('WebRTC is a video and audio conferencing tool that works with Firefox (version 21 and above) and Chrome/Chromium (version 25 and above). Just create a new chat room and send the link to someone you want to chat with.').'
';
+ $o .= '
'.L10n::t('Video Chat').'
';
+ $o .= '
'.L10n::t('WebRTC is a video and audio conferencing tool that works with Firefox (version 21 and above) and Chrome/Chromium (version 25 and above). Just create a new chat room and send the link to someone you want to chat with.').'
';
if ($webrtcurl == '') {
- $o .= '
'.t('Please contact your friendica admin and send a reminder to configure the WebRTC addon.').'
';
+ $o .= '
'.L10n::t('Please contact your friendica admin and send a reminder to configure the WebRTC addon.').'
';
} else {
$o .= '';
}
diff --git a/widgets/widget_friendheader.php b/widgets/widget_friendheader.php
index f9a8acec..f8033667 100644
--- a/widgets/widget_friendheader.php
+++ b/widgets/widget_friendheader.php
@@ -1,29 +1,38 @@
profile = $r[0];
$o = "";
@@ -37,7 +46,7 @@ function friendheader_widget_content(&$a, $conf){
";
$o .= _abs_url(contact_block());
- $o .= "profile['nickname']."' target=new>". t('Get added to this list!') ."";
+ $o .= "profile['nickname']."' target=new>". L10n::t('Get added to this list!') ."";
return $o;
}
diff --git a/widgets/widget_friends.php b/widgets/widget_friends.php
index 25e20180..b5a07886 100644
--- a/widgets/widget_friends.php
+++ b/widgets/widget_friends.php
@@ -1,29 +1,40 @@
profile = $r[0];
$o = "";
@@ -37,6 +48,6 @@ function friends_widget_content(&$a, $conf){
";
$o .= _abs_url(contact_block());
- $o .= "profile['nickname']."'>". t('Connect on Friendica!') ."";
+ $o .= "profile['nickname']."'>". L10n::t('Connect on Friendica!') ."";
return $o;
}
diff --git a/widgets/widget_like.php b/widgets/widget_like.php
index a67f0bd8..27931187 100644
--- a/widgets/widget_like.php
+++ b/widgets/widget_like.php
@@ -1,5 +1,7 @@
$likes,
- '$strlike' => sprintf( tt("%d person likes this", "%d people like this", $likes), $likes),
+ '$strlike' => sprintf(L10n::tt("%d person likes this", "%d people like this", $likes), $likes),
'$dislike' => $dislikes,
- '$strdislike'=> sprintf( tt("%d person doesn't like this", "%d people don't like this", $dislikes), $dislikes),
+ '$strdislike'=> sprintf(L10n::tt("%d person doesn't like this", "%d people don't like this", $dislikes), $dislikes),
'$baseurl' => $a->get_baseurl(),
]);
diff --git a/widgets/widgets.php b/widgets/widgets.php
index 9867b884..1c7489f1 100644
--- a/widgets/widgets.php
+++ b/widgets/widgets.php
@@ -6,6 +6,7 @@
* Author: Fabio Comuni
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function widgets_install() {
@@ -55,12 +56,12 @@ function widgets_settings(&$a,&$o) {
# $t = file_get_contents( dirname(__file__). "/settings.tpl" );
$t = get_markup_template("settings.tpl", "addon/widgets/");
$o .= replace_macros($t, [
- '$submit' => t('Generate new key'),
+ '$submit' => L10n::t('Generate new key'),
'$baseurl' => $a->get_baseurl(),
'$title' => "Widgets",
- '$label' => t('Widgets key'),
+ '$label' => L10n::t('Widgets key'),
'$key' => $key,
- '$widgets_h' => t('Widgets available'),
+ '$widgets_h' => L10n::t('Widgets available'),
'$widgets' => $widgets,
]);
@@ -122,7 +123,7 @@ function widgets_content(&$a) {
if (isset($_GET['p']) && local_user()==$conf['uid'] ) {
$o .= "";
$o .= "
";
$o .= call_user_func($a->argv[1].'_widget_help');
@@ -167,14 +168,8 @@ function widgets_content(&$a) {
return $o;
}
-
}
echo $o;
killme();
}
-
-
-
-
-?>
diff --git a/windowsphonepush/windowsphonepush.php b/windowsphonepush/windowsphonepush.php
index 032a5368..bc19033c 100644
--- a/windowsphonepush/windowsphonepush.php
+++ b/windowsphonepush/windowsphonepush.php
@@ -27,6 +27,7 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Model\User;
@@ -112,20 +113,20 @@ function windowsphonepush_settings(&$a, &$s)
/* Add some HTML to the existing form */
$s .= '
';
- $s .= '
' . t('WindowsPhonePush Settings') . '
';
+ $s .= '
' . L10n::t('WindowsPhonePush Settings') . '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
/* provide a submit button - enable und senditemtext can be changed by the user */
- $s .= '';
+ $s .= '';
/* provide further read-only information concerning the addon (useful for */
$s .= '
';
diff --git a/wppost/wppost.php b/wppost/wppost.php
index af371af1..88ae5a4f 100644
--- a/wppost/wppost.php
+++ b/wppost/wppost.php
@@ -1,5 +1,4 @@
*/
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
function wppost_install() {
@@ -41,7 +41,7 @@ function wppost_jot_nets(&$a,&$b) {
$wp_defpost = PConfig::get(local_user(),'wppost','post_by_default');
$selected = ((intval($wp_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '
'
- . t('Post to Wordpress') . '
';
+ . L10n::t('Post to Wordpress') . '
';
}
}
@@ -79,54 +79,54 @@ function wppost_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
'. t('Wordpress Export').'
';
+ $s .= '
'. L10n::t('Wordpress Export').'
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
'. t('Wordpress Export').'
';
+ $s .= '
'. L10n::t('Wordpress Export').'
';
$s .= '';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
/* provide a submit button */
- $s .= '
';
+ $s .= '
';
}
@@ -215,7 +215,7 @@ function wppost_send(&$a,&$b) {
$wp_blog = PConfig::get($b['uid'],'wppost','wp_blog');
$wp_backlink_text = PConfig::get($b['uid'],'wppost','wp_backlink_text');
if ($wp_backlink_text == '') {
- $wp_backlink_text = t('Read the original post and comment stream on Friendica');
+ $wp_backlink_text = L10n::t('Read the original post and comment stream on Friendica');
}
if($wp_username && $wp_password && $wp_blog) {
@@ -278,7 +278,7 @@ function wppost_send(&$a,&$b) {
}
}
- $title = '' . (($wptitle) ? $wptitle : t('Post from Friendica')) . '';
+ $title = '' . (($wptitle) ? $wptitle : L10n::t('Post from Friendica')) . '';
$post = bbcode($b['body'], false, false, 4);
// If a link goes to youtube then remove the stuff around it. Wordpress detects youtube links and embeds it
diff --git a/xmpp/xmpp.php b/xmpp/xmpp.php
index 2548005e..bd5adb57 100644
--- a/xmpp/xmpp.php
+++ b/xmpp/xmpp.php
@@ -1,5 +1,4 @@
';
- $s .= '
';
}
function xmpp_login()
@@ -105,9 +105,9 @@ function xmpp_addon_admin(App $a, &$o)
$t = get_markup_template("admin.tpl", "addon/xmpp/");
$o = replace_macros($t, [
- '$submit' => t('Save Settings'),
- '$bosh_proxy' => ['bosh_proxy', t('Jabber BOSH host'), Config::get('xmpp', 'bosh_proxy'), ''],
- '$central_userbase' => ['central_userbase', t('Use central userbase'), Config::get('xmpp', 'central_userbase'), t('If enabled, users will automatically login to an ejabberd server that has to be installed on this machine with synchronized credentials via the "auth_ejabberd.php" script.')],
+ '$submit' => L10n::t('Save Settings'),
+ '$bosh_proxy' => ['bosh_proxy', L10n::t('Jabber BOSH host'), Config::get('xmpp', 'bosh_proxy'), ''],
+ '$central_userbase' => ['central_userbase', L10n::t('Use central userbase'), Config::get('xmpp', 'central_userbase'), L10n::t('If enabled, users will automatically login to an ejabberd server that has to be installed on this machine with synchronized credentials via the "auth_ejabberd.php" script.')],
]);
}
@@ -117,7 +117,7 @@ function xmpp_addon_admin_post()
$central_userbase = ((x($_POST, 'central_userbase')) ? intval($_POST['central_userbase']) : false);
Config::set('xmpp', 'bosh_proxy', $bosh_proxy);
Config::set('xmpp', 'central_userbase', $central_userbase);
- info(t('Settings updated.') . EOL);
+ info(L10n::t('Settings updated.') . EOL);
}
function xmpp_script(App $a)
diff --git a/yourls/yourls.php b/yourls/yourls.php
index 84bfa8d7..3d434981 100644
--- a/yourls/yourls.php
+++ b/yourls/yourls.php
@@ -1,6 +1,4 @@
';
- $s .= '