]> git.mxchange.org Git - friendica-addons.git/blobdiff - remote_permissions/remote_permissions.php
Update t() calls
[friendica-addons.git] / remote_permissions / remote_permissions.php
index 408316e691a2e642c738844a588525315cdf8b31..94bdf5c11ea0d89a8a7320cf9882287e015759c9 100644 (file)
@@ -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:') . '<br />';
+                       $o = L10n::t('Visible to:') . '<br />';
                        $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') . '):<br />';
+                       $o = L10n::t('Visible to') . ' (' . L10n::t('may only be a partial list') . '):<br />';
 
                        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);
 }
-