5 次代碼提交 1597ac3e04 ... fbe2136208

作者 SHA1 備註 提交日期
  pixelcode fbe2136208 new translation strings; some design improvements 4 年之前
  pixelcode 803491bf11 updates from master branch 4 年之前
  pixelcode 88cdfabf3d translated some notifications - bug fixes of i18n 4 年之前
  pixelcode 1a7811a4ff translated some notifications 4 年之前
  pixelcode cda55d0b31 remove design changes add translation bug fix 4 年之前

+ 28 - 0
src/_locales/de/messages.json

@@ -274,5 +274,33 @@
 	"connections": {
 		"message": "Verbindung(en)",
 		"description": "connection(s)"
+	},
+	"torwarning": {
+		"message": "Der Tor-Browser wird nicht untertützt. Du kannst dieses Addon DEINSTALLIEREN. Siehe Issue #18 im Gitlab-Projekt für offene Feature-Requests zur Tor-Browser-Unterstützung",
+		"description": "Tor not supported warning"
+	},
+	"cachedeleted": {
+		"message": "Dein lokaler Offline-Cache wurde gelöscht",
+		"description": "cache deleted notification"
+	},
+	"urlwasblocked": {
+		"message": " wurde blockiert, weil es bei ",
+		"description": "url was blocked because... notification"
+	},
+	"urlwasblockedtwo": {
+		"message": " gehostet wird und du entschieden hast, diese Cloud zu blockieren",
+		"description": "url was blocked because... notification second part"
+	},
+	"for": {
+		"message": "für",
+		"description": "e.g. disable rule for website x"
+	},
+	"rulesdisabled": {
+		"message": "Du hast die Regeln ausgeschaltet für",
+		"description": "you disabled the rules for --url--"
+	},
+	"disabledhere": {
+		"message": "Deaktiviert auf dieser Seite",
+		"description": "You have disabled the rules on this site"
 	}
 }

+ 28 - 0
src/_locales/en/messages.json

@@ -274,5 +274,33 @@
 	"connections": {
 		"message": "Connection(s)",
 		"description": "connection(s)"
+	},
+	"torwarning": {
+		"message": "Tor Browser is not supported. You can UNINSTALL this addon. Refer issue #18 in project Gitlab for Open Feature Request for Tor Browser Support",
+		"description": "Tor not supported warning"
+	},
+	"cachedeleted": {
+		"message": "Your local offline cache has been deleted",
+		"description": "cache deleted notification"
+	},
+	"urlwasblocked": {
+		"message": " was blocked as it is in ",
+		"description": "url was blocked because... notification"
+	},
+	"urlwasblockedtwo": {
+		"message": " cloud and you chose to block this cloud",
+		"description": "url was blocked because... notification second part"
+	},
+	"for": {
+		"message": "for",
+		"description": "e.g. disable rule for website x"
+	},
+	"rulesdisabled": {
+		"message": "You disabled the rules for",
+		"description": "you disabled the rules for --url--"
+	},
+	"disabledhere": {
+		"message": "Disabled on this site",
+		"description": "You have disabled the rules on this site"
 	}
 }

+ 28 - 0
src/_locales/fr/messages.json

@@ -274,5 +274,33 @@
 	"connections": {
 		"message": "connexion(s)",
 		"description": "connection(s)"
+	},
+	"torwarning": {
+		"message": "Le navigateur Tor n'est pas supporté. Vous pouvez DÉSINSTALLER cet addon. Référez-vous au problème #18 dans le projet Gitlab pour une demande de fonctionnalité ouverte pour le support du navigateur Tor",
+		"description": "Tor not supported warning"
+	},
+	"cachedeleted": {
+		"message": "Votre cache local hors ligne a été supprimé",
+		"description": "cache deleted notification"
+	},
+	"urlwasblocked": {
+		"message": " a été bloqué parce qu'il est dans le nuage ",
+		"description": "url was blocked because... notification"
+	},
+	"urlwasblockedtwo": {
+		"message": " et vous avez choisi de bloquer ce nuage",
+		"description": "url was blocked because... notification second part"
+	},
+	"for": {
+		"message": "pour",
+		"description": "e.g. disable rule for website x"
+	},
+	"rulesdisabled": {
+		"message": "Vous avez désactivé les règles pour",
+		"description": "you disabled the rules for --url--"
+	},
+	"disabledhere": {
+		"message": "Désactivés sur cette page",
+		"description": "You have disabled the rules on this site"
 	}
 }

+ 32 - 14
src/css/popup2.css

@@ -31,7 +31,7 @@ html, body {
 	font-size: 18px;
 	z-index: 10;
 	position: relative;
-	color: #336be3;
+	color: #bf0600;
 }
 
 #connectionsblockedicon {
@@ -114,28 +114,28 @@ html, body {
 	background-color: #e60000;
 }
 
-.btn-settings {
-	background-color: #3676ff;
+.btn-green {
+	background-color: #0bc214;
 }
 
-.btn-settings:hover {
-	background-color: #336be3;
+.btn-green:hover {
+	background-color: #09ad11;
 }
 
-.btn-help {
-	background-color: #3cb1ff;
+.btn-blue {
+	background-color: #3676ff;
 }
 
-.btn-help:hover {
-	background-color: #3498db;
+.btn-blue:hover {
+	background-color: #336be3;
 }
 
-.btn-rules {
-	background-color: #0bc214;
+.btn-lightblue {
+	background-color: #3cb1ff;
 }
 
-.btn-rules:hover {
-	background-color: #09ad11;
+.btn-lightblue:hover {
+	background-color: #3498db;
 }
 
 .btn-light {
@@ -164,6 +164,25 @@ html, body {
 	background-color: #6939a8;
 }
 
+.badge-alert-info {
+	background-color: #ffe96e;
+	color: #877300;
+}
+
+.badge-alert-info-img {
+	position: relative;
+	top: 1px;
+	height: 15px;
+	width: auto;
+	margin-right: 4px;
+}
+
+#inExcludesAlert {
+	position: relative;
+	top: -2px;
+	font-size: 13px;
+}
+
 #infocenter {
 	margin-top: 5px;
 	margin-bottom: 15px;
@@ -229,7 +248,6 @@ tr.spaceUnder > td {
 }
 
 #inTempexcludesAlert,
-#inExcludesAlert,
 #inTempIncludesAlert,
 #refreshbutton {
   white-space: nowrap;

+ 62 - 0
src/images/alert-darkyellow.svg

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="1em"
+   height="1em"
+   viewBox="0 0 16 16"
+   class="bi bi-exclamation-triangle"
+   fill="currentColor"
+   version="1.1"
+   id="svg2695"
+   sodipodi:docname="alert-darkyellow.svg"
+   inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
+  <metadata
+     id="metadata2701">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs2699" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1001"
+     id="namedview2697"
+     showgrid="false"
+     inkscape:zoom="14.75"
+     inkscape:cx="8"
+     inkscape:cy="8"
+     inkscape:window-x="-9"
+     inkscape:window-y="-9"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg2695" />
+  <path
+     fill-rule="evenodd"
+     d="M7.938 2.016a.146.146 0 0 0-.054.057L1.027 13.74a.176.176 0 0 0-.002.183c.016.03.037.05.054.06.015.01.034.017.066.017h13.713a.12.12 0 0 0 .066-.017.163.163 0 0 0 .055-.06.176.176 0 0 0-.003-.183L8.12 2.073a.146.146 0 0 0-.054-.057A.13.13 0 0 0 8.002 2a.13.13 0 0 0-.064.016zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"
+     id="path2691"
+     style="stroke:#877300;stroke-opacity:0;fill:#877300;fill-opacity:0.97555012" />
+  <path
+     d="M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"
+     id="path2693"
+     style="fill:#877300;fill-opacity:1" />
+</svg>

+ 61 - 0
src/images/alert.svg

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="1em"
+   height="1em"
+   viewBox="0 0 16 16"
+   class="bi bi-exclamation-triangle"
+   fill="currentColor"
+   version="1.1"
+   id="svg2695"
+   sodipodi:docname="alert.svg"
+   inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
+  <metadata
+     id="metadata2701">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs2699" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1001"
+     id="namedview2697"
+     showgrid="false"
+     inkscape:zoom="14.75"
+     inkscape:cx="8"
+     inkscape:cy="8"
+     inkscape:window-x="-9"
+     inkscape:window-y="-9"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg2695" />
+  <path
+     fill-rule="evenodd"
+     d="M7.938 2.016a.146.146 0 0 0-.054.057L1.027 13.74a.176.176 0 0 0-.002.183c.016.03.037.05.054.06.015.01.034.017.066.017h13.713a.12.12 0 0 0 .066-.017.163.163 0 0 0 .055-.06.176.176 0 0 0-.003-.183L8.12 2.073a.146.146 0 0 0-.054-.057A.13.13 0 0 0 8.002 2a.13.13 0 0 0-.064.016zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"
+     id="path2691"
+     style="stroke:#877300;stroke-opacity:0;fill:#877300;fill-opacity:0.97555012" />
+  <path
+     d="M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"
+     id="path2693"
+     style="fill:#877300;fill-opacity:1" />
+</svg>

+ 56 - 0
src/images/red-ban.svg

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   aria-hidden="true"
+   focusable="false"
+   role="img"
+   viewBox="0 0 512 512"
+   version="1.1"
+   id="svg1569"
+   sodipodi:docname="red-ban.svg"
+   inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
+  <metadata
+     id="metadata1575">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs1573" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1001"
+     id="namedview1571"
+     showgrid="false"
+     inkscape:zoom="0.4609375"
+     inkscape:cx="124.74576"
+     inkscape:cy="249.49153"
+     inkscape:window-x="-9"
+     inkscape:window-y="-9"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg1569" />
+  <path
+     d="M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"
+     id="path1567"
+     style="fill:#bf0600;fill-opacity:1" />
+</svg>

+ 14 - 17
src/js/background/background.js

@@ -408,12 +408,11 @@ else if(settingsToggles[company]) shouldblock = true;
         if (isMainFrame && notificationsEnabled) {
           let displayname = hostname.replace("www.", "");
           let msg =
-            "Blocked " +
-            displayname +
-            " as it is in " +
+			displayname +
+            browser.i18n.getMessage('urlwasblocked') +
             company[0].toUpperCase() +
             company.slice(1) +
-            " cloud and you chose to block this cloud";
+			browser.i18n.getMessage('urlwasblockedtwo');
           showNotifications(msg);
         }
         counts[company] += 1;
@@ -515,12 +514,11 @@ else {
       let displayname = hostname.replace("www.", "");
 
       let msg =
-        "Blocked " +
-        displayname +
-        " as it is in " +
-        result.whichCompany[0].toUpperCase() +
-        result.whichCompany.slice(1) +
-        " cloud and you chose to block this cloud";
+		displayname +
+		browser.i18n.getMessage('urlwasblocked') +
+		result.whichCompany[0].toUpperCase() +
+		result.whichCompany.slice(1) +
+		browser.i18n.getMessage('urlwasblockedtwo');
       showNotifications(msg);
     }
     // showPerTabCount(details.tabId);
@@ -676,12 +674,11 @@ result = checkIPisinRange(dns.addresses,i);
       let displayname = hostname.replace("www.", "");
 
       let msg =
-        "Blocked " +
         displayname +
-        " as it is in " +
-        result.whichCompany[0].toUpperCase() +
-        result.whichCompany.slice(1) +
-        " cloud and you chose to block this cloud";
+		browser.i18n.getMessage('urlwasblocked') +
+		result.whichCompany[0].toUpperCase() +
+		result.whichCompany.slice(1) +
+		browser.i18n.getMessage('urlwasblockedtwo');
       showNotifications(msg);
     }
     //console.log(counts);
@@ -945,7 +942,7 @@ async function checkIsTorBrowser() {
       );
       console.log("https://gitlab.com/gkrishnaks/cloud-firewall/issues/18");
       showNotifications(
-        "Tor Browser is not supported. You can UNINSTALL this addon. Refer issue #18 in project Gitlab for Open Feature Request for Tor Browser Support"
+        browser.i18n.getMessage("torwarning")
       );
       isTBB = true;
     } else {
@@ -1242,7 +1239,7 @@ async function resetCache(shouldRemoveCounts) {
   console.log("Cloud Firewall cache reset");
   try {
     await browser.storage.local.set({ cache: "" });
-    showNotifications("Your local offline cache has been deleted");
+    showNotifications(browser.i18n.getMessage('cachedeleted'));
   } catch (e) {
     console.log("Cloud Firewall: Issue with clearing offline cache");
   }

+ 5 - 8
src/js/dom/DOMUpdater.js

@@ -295,7 +295,7 @@ document.querySelector("#countsapple").textContent = "Apple : " + PopupApp.count
       document.getElementById("inExcludesAlertWrapper").style.display = "";
       document.getElementById("inExcludesAlert").style.display = "";
       document.getElementById("inExcludesAlert").textContent =
-        "You disabled rules for " + PopupApp.domainname;
+        browser.i18n.getMessage('disabledhere');
     } else {
       document.getElementById("blockAllButton").style.display = "";
       document.getElementById("allowAllButton").style.display = "";
@@ -325,25 +325,22 @@ else document.getElementById("infoRule").innerText = browser.i18n.getMessage('gl
   }*/
   var forstring = browser.i18n.getMessage('for');
   var disablestring = browser.i18n.getMessage('disable');
+  var disableforstring = browser.i18n.getMessage('disablefor');
   var enablestring = browser.i18n.getMessage('enable');
   var rulesstring = browser.i18n.getMessage('rules');
   
   if (!!PopupApp.domainname && PopupApp.domainname.includes(".")) {
     if (!PopupApp.isDomainExcluded) {
       document.getElementById("addToExcludes").textContent =
-        disablestring +
-        String.fromCharCode(160) +
-        forstring +
-        String.fromCharCode(160) +
+        disableforstring +
+        "\n" +
         PopupApp.domainname;
     } else {
       document.getElementById("removeFromExcludes").textContent =
         enablestring +
         String.fromCharCode(160) +
-        rulesstring +
-        String.fromCharCode(160) +
         forstring +
-        String.fromCharCode(160) +
+        "\n" +
         PopupApp.domainname;
     }
   } else {

+ 0 - 0
src/popup.html


Some files were not shown because too many files changed in this diff