From 557ece7d5a015450e2910fbe0dda1eaf15c03c26 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 5 Feb 2020 21:42:53 -0500 Subject: [PATCH] Remove unused translated yes/no labels in converted checkbox field definitions --- mod/dfrn_request.php | 2 +- mod/follow.php | 2 +- mod/settings.php | 26 +++++++++++----------- src/Module/Notifications/Introductions.php | 2 +- src/Module/Settings/Profile/Index.php | 2 -- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index bf1fbe3c9..89f4a3cd0 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -640,7 +640,7 @@ function dfrn_request_content(App $a) '$header' => DI::l10n()->t('Friend/Connection Request'), '$desc' => DI::l10n()->t('Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@gnusocial.de'), '$pls_answer' => DI::l10n()->t('Please answer the following:'), - '$does_know_you' => ['knowyou', DI::l10n()->t('Does %s know you?', $a->profile['name']), false, '', [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], + '$does_know_you' => ['knowyou', DI::l10n()->t('Does %s know you?', $a->profile['name'])], '$add_note' => DI::l10n()->t('Add a personal note:'), '$page_desc' => $page_desc, '$friendica' => DI::l10n()->t('Friendica'), diff --git a/mod/follow.php b/mod/follow.php index cdd7b4904..2a5241a0c 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -165,7 +165,7 @@ function follow_content(App $a) '$header' => DI::l10n()->t('Connect/Follow'), '$desc' => '', '$pls_answer' => DI::l10n()->t('Please answer the following:'), - '$does_know_you' => ['knowyou', DI::l10n()->t('Does %s know you?', $ret['name']), false, '', [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], + '$does_know_you' => ['knowyou', DI::l10n()->t('Does %s know you?', $ret['name'])], '$add_note' => DI::l10n()->t('Add a personal note:'), '$page_desc' => '', '$friendica' => '', diff --git a/mod/settings.php b/mod/settings.php index dde7bbf47..b9bdf66ec 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1081,40 +1081,40 @@ function settings_content(App $a) $profile_in_dir = ''; } else { $profile_in_dir = Renderer::replaceMacros($opt_tpl, [ - '$field' => ['profile_in_directory', DI::l10n()->t('Publish your default profile in your local site directory?'), $profile['publish'], DI::l10n()->t('Your profile will be published in this node\'s local directory. Your profile details may be publicly visible depending on the system settings.', DI::baseUrl().'/directory'), [DI::l10n()->t('No'), DI::l10n()->t('Yes')]] + '$field' => ['profile_in_directory', DI::l10n()->t('Publish your default profile in your local site directory?'), $profile['publish'], DI::l10n()->t('Your profile will be published in this node\'s local directory. Your profile details may be publicly visible depending on the system settings.', DI::baseUrl().'/directory')] ]); } if (strlen(DI::config()->get('system', 'directory'))) { $profile_in_net_dir = Renderer::replaceMacros($opt_tpl, [ - '$field' => ['profile_in_netdirectory', DI::l10n()->t('Publish your default profile in the global social directory?'), $profile['net-publish'], DI::l10n()->t('Your profile will be published in the global friendica directories (e.g. %s). Your profile will be visible in public.', DI::config()->get('system', 'directory'), DI::config()->get('system', 'directory')) . " " . DI::l10n()->t("This setting also determines whether Friendica will inform search engines that your profile should be indexed or not. Third-party search engines may or may not respect this setting."), [DI::l10n()->t('No'), DI::l10n()->t('Yes')]] + '$field' => ['profile_in_netdirectory', DI::l10n()->t('Publish your default profile in the global social directory?'), $profile['net-publish'], DI::l10n()->t('Your profile will be published in the global friendica directories (e.g. %s). Your profile will be visible in public.', DI::config()->get('system', 'directory'), DI::config()->get('system', 'directory')) . " " . DI::l10n()->t("This setting also determines whether Friendica will inform search engines that your profile should be indexed or not. Third-party search engines may or may not respect this setting.")] ]); } else { $profile_in_net_dir = ''; } $hide_friends = Renderer::replaceMacros($opt_tpl, [ - '$field' => ['hide-friends', DI::l10n()->t('Hide your contact/friend list from viewers of your default profile?'), $profile['hide-friends'], DI::l10n()->t('Your contact list won\'t be shown in your default profile page. You can decide to show your contact list separately for each additional profile you create'), [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], + '$field' => ['hide-friends', DI::l10n()->t('Hide your contact/friend list from viewers of your default profile?'), $profile['hide-friends'], DI::l10n()->t('Your contact list won\'t be shown in your default profile page. You can decide to show your contact list separately for each additional profile you create')], ]); $hide_wall = Renderer::replaceMacros($opt_tpl, [ - '$field' => ['hidewall', DI::l10n()->t('Hide your profile details from anonymous viewers?'), $a->user['hidewall'], DI::l10n()->t('Anonymous visitors will only see your profile picture, your display name and the nickname you are using on your profile page. Your public posts and replies will still be accessible by other means.'), [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], + '$field' => ['hidewall', DI::l10n()->t('Hide your profile details from anonymous viewers?'), $a->user['hidewall'], DI::l10n()->t('Anonymous visitors will only see your profile picture, your display name and the nickname you are using on your profile page. Your public posts and replies will still be accessible by other means.')], ]); $blockwall = Renderer::replaceMacros($opt_tpl, [ - '$field' => ['blockwall', DI::l10n()->t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), DI::l10n()->t('Your contacts may write posts on your profile wall. These posts will be distributed to your contacts'), [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], + '$field' => ['blockwall', DI::l10n()->t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), DI::l10n()->t('Your contacts may write posts on your profile wall. These posts will be distributed to your contacts')], ]); $blocktags = Renderer::replaceMacros($opt_tpl, [ - '$field' => ['blocktags', DI::l10n()->t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), DI::l10n()->t('Your contacts can add additional tags to your posts.'), [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], + '$field' => ['blocktags', DI::l10n()->t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), DI::l10n()->t('Your contacts can add additional tags to your posts.')], ]); $suggestme = Renderer::replaceMacros($opt_tpl, [ - '$field' => ['suggestme', DI::l10n()->t('Allow us to suggest you as a potential friend to new members?'), $suggestme, DI::l10n()->t('If you like, Friendica may suggest new members to add you as a contact.'), [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], + '$field' => ['suggestme', DI::l10n()->t('Allow us to suggest you as a potential friend to new members?'), $suggestme, DI::l10n()->t('If you like, Friendica may suggest new members to add you as a contact.')], ]); $unkmail = Renderer::replaceMacros($opt_tpl, [ - '$field' => ['unkmail', DI::l10n()->t('Permit unknown people to send you private mail?'), $unkmail, DI::l10n()->t('Friendica network users may send you private messages even if they are not in your contact list.'), [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], + '$field' => ['unkmail', DI::l10n()->t('Permit unknown people to send you private mail?'), $unkmail, DI::l10n()->t('Friendica network users may send you private messages even if they are not in your contact list.')], ]); if (!$profile['publish'] && !$profile['net-publish']) { @@ -1134,11 +1134,11 @@ function settings_content(App $a) 'days' => ['expire', DI::l10n()->t("Automatically expire posts after this many days:"), $expire, DI::l10n()->t('If empty, posts will not expire. Expired posts will be deleted')], 'advanced' => DI::l10n()->t('Advanced expiration settings'), 'label' => DI::l10n()->t('Advanced Expiration'), - 'items' => ['expire_items', DI::l10n()->t("Expire posts:"), $expire_items, '', [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], - 'notes' => ['expire_notes', DI::l10n()->t("Expire personal notes:"), $expire_notes, '', [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], - 'starred' => ['expire_starred', DI::l10n()->t("Expire starred posts:"), $expire_starred, '', [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], - 'photos' => ['expire_photos', DI::l10n()->t("Expire photos:"), $expire_photos, '', [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], - 'network_only' => ['expire_network_only', DI::l10n()->t("Only expire posts by others:"), $expire_network_only, '', [DI::l10n()->t('No'), DI::l10n()->t('Yes')]], + 'items' => ['expire_items', DI::l10n()->t("Expire posts:"), $expire_items], + 'notes' => ['expire_notes', DI::l10n()->t("Expire personal notes:"), $expire_notes], + 'starred' => ['expire_starred', DI::l10n()->t("Expire starred posts:"), $expire_starred], + 'photos' => ['expire_photos', DI::l10n()->t("Expire photos:"), $expire_photos], + 'network_only' => ['expire_network_only', DI::l10n()->t("Only expire posts by others:"), $expire_network_only], ]; $group_select = Group::displayGroupSelection(local_user(), $a->user['def_gid']); diff --git a/src/Module/Notifications/Introductions.php b/src/Module/Notifications/Introductions.php index 0283ec8f4..862473332 100644 --- a/src/Module/Notifications/Introductions.php +++ b/src/Module/Notifications/Introductions.php @@ -97,7 +97,7 @@ class Introductions extends BaseNotifications default: if ($notification->getNetwork() === Protocol::DFRN) { $lbl_knowyou = DI::l10n()->t('Claims to be known to you: '); - $knowyou = ($notification->getKnowYou() ? DI::l10n()->t('yes') : DI::l10n()->t('no')); + $knowyou = ($notification->getKnowYou() ? DI::l10n()->t('Yes') : DI::l10n()->t('No')); } else { $lbl_knowyou = ''; $knowyou = ''; diff --git a/src/Module/Settings/Profile/Index.php b/src/Module/Settings/Profile/Index.php index ca3a28258..d8227d4ae 100644 --- a/src/Module/Settings/Profile/Index.php +++ b/src/Module/Settings/Profile/Index.php @@ -219,8 +219,6 @@ class Index extends BaseSettings 'hide-friends', //Name DI::l10n()->t('Hide contacts and friends:'), //Label !!$profile['hide-friends'], //Value - '', //Help string - [DI::l10n()->t('No'), DI::l10n()->t('Yes')] //Off - On strings ], '$desc' => DI::l10n()->t('Hide your contact/friend list from viewers of this profile?'), '$yes_str' => DI::l10n()->t('Yes'),