From b75118263eecdf4bdbdc6dd5be94298c847fe970 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Thu, 31 Oct 2024 02:01:41 +0000 Subject: [PATCH] luci-app-adblock-fast: update to sync with principal package Signed-off-by: Stan Grishin (cherry picked from commit ea170f1f6abb4578823617f2e0e9ffee6b7c68f3) --- applications/luci-app-adblock-fast/Makefile | 2 +- .../resources/adblock-fast/status.js | 8 +- .../po/templates/adblock-fast.pot | 94 +++++++++++-------- .../root/usr/libexec/rpcd/luci.adblock-fast | 2 +- 4 files changed, 62 insertions(+), 44 deletions(-) diff --git a/applications/luci-app-adblock-fast/Makefile b/applications/luci-app-adblock-fast/Makefile index a1854b019147..aecc7767343e 100644 --- a/applications/luci-app-adblock-fast/Makefile +++ b/applications/luci-app-adblock-fast/Makefile @@ -7,7 +7,7 @@ PKG_NAME:=luci-app-adblock-fast PKG_LICENSE:=AGPL-3.0-or-later PKG_MAINTAINER:=Stan Grishin PKG_VERSION:=1.1.2 -PKG_RELEASE:=3 +PKG_RELEASE:=10 LUCI_TITLE:=AdBlock-Fast Web UI LUCI_URL:=https://github.com/stangri/luci-app-adblock-fast/ diff --git a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js index d05f09403ec0..3da046c8ce2a 100644 --- a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js +++ b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js @@ -261,9 +261,7 @@ var status = baseclass.extend({ "The %s failed to discover WAN gateway" ).format(pkg.Name), errorOutputDirCreate: _("Failed to create directory for %s file"), - errorOutputFileCreate: _("Failed to create '%s' file").format( - outputFile - ), + errorOutputFileCreate: _("Failed to create '%s' file"), errorFailDNSReload: _("Failed to restart/reload DNS resolver"), errorSharedMemory: _("Failed to access shared memory"), errorSorting: _("Failed to sort data file"), @@ -304,6 +302,10 @@ var status = baseclass.extend({ errorTooLittleRam: _( "Free ram (%s) is not enough to process all enabled block-lists" ), + errorCreatingBackupFile: _("failed to create backup file %s"), + errorDeletingDataFile: _("failed to delete data file %s"), + errorRestoringBackupFile: _("failed to restore backup file %s"), + errorNoOutputFile: _("failed to create final block-list %s"), }; var errorsTitle = E( "label", diff --git a/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot b/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot index 6fd0d609b507..cbcf83ac97ff 100644 --- a/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot +++ b/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot @@ -171,7 +171,7 @@ msgid "" "Directory for compressed cache file of block-list in the persistent memory." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:446 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:448 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:347 msgid "Disable" msgstr "" @@ -184,7 +184,7 @@ msgstr "" msgid "Disabled" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:440 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:442 msgid "Disabling %s service" msgstr "" @@ -213,7 +213,7 @@ msgstr "" msgid "Downloading lists" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:427 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:429 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:348 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:502 msgid "Enable" @@ -228,7 +228,7 @@ msgstr "" msgid "Enables debug output to /tmp/adblock-fast.log." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:421 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:423 msgid "Enabling %s service" msgstr "" @@ -236,7 +236,7 @@ msgstr "" msgid "Error" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:320 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:322 msgid "Errors encountered, please check the %sREADME%s" msgstr "" @@ -244,7 +244,7 @@ msgstr "" msgid "Fail" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:268 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:266 msgid "Failed to access shared memory" msgstr "" @@ -252,11 +252,11 @@ msgstr "" msgid "Failed to create '%s' file" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:286 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:284 msgid "Failed to create block-list or restart DNS resolver" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:277 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:275 msgid "Failed to create compressed cache" msgstr "" @@ -264,63 +264,63 @@ msgstr "" msgid "Failed to create directory for %s file" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:298 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:296 msgid "Failed to create output/cache/gzip file directory" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:300 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:298 msgid "Failed to detect format %s" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:293 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:291 msgid "Failed to download %s" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:291 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:289 msgid "Failed to download Config Update file" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:272 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:270 msgid "Failed to format data file" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:281 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:279 msgid "Failed to move '%s' to '%s'" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:274 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:272 msgid "Failed to move temporary data file to '%s'" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:270 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:268 msgid "Failed to optimize data file" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:295 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:293 msgid "Failed to parse %s" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:294 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:292 msgid "Failed to parse Config Update file" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:271 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:269 msgid "Failed to process allow-list" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:289 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:287 msgid "Failed to reload/restart DNS resolver" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:279 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:277 msgid "Failed to remove temporary files" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:267 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:265 msgid "Failed to restart/reload DNS resolver" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:269 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:267 msgid "Failed to sort data file" msgstr "" @@ -328,11 +328,11 @@ msgstr "" msgid "Failed to start" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:288 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:286 msgid "Failed to stop %s" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:280 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:278 msgid "Failed to unpack compressed cache" msgstr "" @@ -357,7 +357,7 @@ msgstr "" msgid "Force Router DNS server to all local devices" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:368 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:370 msgid "Force redownloading %s block lists" msgstr "" @@ -365,7 +365,7 @@ msgstr "" msgid "Forces Router DNS use on local devices, also known as DNS Hijacking." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:305 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:303 msgid "Free ram (%s) is not enough to process all enabled block-lists" msgstr "" @@ -431,11 +431,11 @@ msgstr "" msgid "No AdBlock on dnsmasq" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:296 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:294 msgid "No HTTPS/SSL support on device" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:302 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:300 msgid "No blocked list URLs nor blocked-domains enabled" msgstr "" @@ -447,11 +447,11 @@ msgstr "" msgid "Output Verbosity Setting" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:389 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:391 msgid "Pause" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:384 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:386 msgid "Pausing %s" msgstr "" @@ -489,7 +489,7 @@ msgstr "" msgid "Processing lists" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:374 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:376 msgid "Redownload" msgstr "" @@ -498,11 +498,11 @@ msgstr "" msgid "Restarting" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:487 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:489 msgid "Service Control" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:311 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:313 msgid "Service Errors" msgstr "" @@ -534,7 +534,7 @@ msgstr "" msgid "Some recommended packages are missing" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:355 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:357 msgid "Start" msgstr "" @@ -543,7 +543,7 @@ msgstr "" msgid "Starting" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:349 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:351 msgid "Starting %s service" msgstr "" @@ -551,7 +551,7 @@ msgstr "" msgid "Status" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:408 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:410 msgid "Stop" msgstr "" @@ -564,7 +564,7 @@ msgstr "" msgid "Stopped" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:402 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:404 msgid "Stopping %s service" msgstr "" @@ -634,7 +634,7 @@ msgstr "" msgid "Unknown" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:318 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:320 msgid "Unknown error" msgstr "" @@ -707,6 +707,22 @@ msgstr "" msgid "dnsmasq servers file" msgstr "" +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:305 +msgid "failed to create backup file %s" +msgstr "" + +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:308 +msgid "failed to create final block-list %s" +msgstr "" + +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:306 +msgid "failed to delete data file %s" +msgstr "" + +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:307 +msgid "failed to restore backup file %s" +msgstr "" + #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:334 msgid "none" msgstr "" diff --git a/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast b/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast index 222b03619ea9..67c6427fe6df 100755 --- a/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast +++ b/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast @@ -14,7 +14,7 @@ # ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "pause" }' # ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "stop" }' -readonly luciCompat='2' +readonly luciCompat='3' readonly adbFunctionsFile='/etc/init.d/adblock-fast' if [ -s "$adbFunctionsFile" ]; then # shellcheck source=../../../../../adblock-fast/files/etc/init.d/adblock-fast