Browse Source

调整 Bark 英文文言

luolongfei 3 years ago
parent
commit
947f48648b
2 changed files with 15 additions and 10 deletions
  1. 8 3
      libs/MessageServices/Bark.php
  2. 7 7
      resources/lang/en.php

+ 8 - 3
libs/MessageServices/Bark.php

@@ -140,14 +140,19 @@ class Bark extends MessageGateway
     /**
      * 获取页脚
      *
+     * @param bool $isRenewalResult 是否续期结果,续期结果不用提醒调整推送频率
+     *
      * @return string
      */
-    public function getFooter()
+    public function getFooter(bool $isRenewalResult = false)
     {
         $footer = '';
 
         $footer .= lang('100078');
-        $footer .= lang('100079');
+
+        if (!$isRenewalResult) {
+            $footer .= lang('100079');
+        }
 
         return $footer;
     }
@@ -203,7 +208,7 @@ class Bark extends MessageGateway
         $text .= lang('100086');
         $text .= $this->genDomainStatusText($domainStatus);
 
-        $text .= $this->getFooter();
+        $text .= $this->getFooter(true);
 
         return $text;
     }

+ 7 - 7
resources/lang/en.php

@@ -101,16 +101,16 @@ return [
         '100075' => 'Renewal Success: %s<br>',
         '100076' => 'Renewal Error: %s<br>',
         '100077' => 'Mail sending failure: ',
-        '100078' => "\nFor more information, please refer to: https://my.freenom.com/domains.php?a=renewals (click \"copy content\" to copy this URL)",
-        '100079' => "\n\n(if you don't want to receive a push every time you execute, set the value of NOTICE_FREQ in .env to 0 so that the program only pushes when there is a renewal operation)",
+        '100078' => "\nFor further information, please visit https://my.freenom.com/domains.php?a=renewals (click \"copy content\" to copy this URL)",
+        '100079' => "\n\n(If you don't want to get a push every time you execute, adjust the value of NOTICE_FREQ in the .env file to 0 so that the application only pushes when there is a renewal operation.)",
         '100080' => "No data.\n",
         '100081' => '%s expires in %d days, ',
         '100082' => ".\n",
-        '100083' => "Account %s The result of this renewal is as follows\n\n",
-        '100084' => 'Renewal success: ',
-        '100085' => 'Renewal error: ',
-        '100086' => "\nThe domains that do not need to be renewed this time and their remaining days are shown below:\n\n",
-        '100087' => "I just checked for you and the account %s has no domains that need to be renewed today. The status of all domains is as follows:\n\n",
+        '100083' => "The following is the renewal report for the Freenom Account %s:\n\n",
+        '100084' => 'Renewal Success: ',
+        '100085' => 'Renewal Error: ',
+        '100086' => "\nIn addition, the following other domains' statuses are shown below:\n\n",
+        '100087' => "I've just checked and found that the Freenom account %s does not have any domains that need to be renewed today. The following is the current state of all domains:\n\n",
         '100088' => 'Unknown reason',
         '100089' => 'Bark Failed to send message: <red>%s</red>',
         '100090' => "I just checked for you and the account [%s](#) does not have any domains that need to be renewed today. The status of all domains is as follows:\n\n",