[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] 04/04: fixup! Add TorStrings module for localization



This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch tor-browser-91.9.0esr-11.5-1
in repository tor-browser.

commit f4a2fa31273b7cc17855f932c64fd9e654d5c0bd
Author: Pier Angelo Vendrame <pierov@xxxxxxxxxxxxxx>
AuthorDate: Mon Jun 6 15:24:26 2022 +0200

    fixup! Add TorStrings module for localization
    
    Strings for about:rulesets
---
 browser/modules/TorStrings.jsm | 76 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/browser/modules/TorStrings.jsm b/browser/modules/TorStrings.jsm
index 5baa775e85d43..1586a3f787e39 100644
--- a/browser/modules/TorStrings.jsm
+++ b/browser/modules/TorStrings.jsm
@@ -799,6 +799,82 @@ var TorStrings = {
     return retval;
   })() /* OnionLocation */,
 
+  /*
+    Rulesets
+  */
+  rulesets: (() => {
+    const tsb = new TorPropertyStringBundle(
+      ["chrome://torbutton/locale/torbutton.properties"],
+      "rulesets."
+    );
+    const getString/*(key, fallback)*/ = tsb.getString;
+
+    const retval = {
+      // Initial warning
+      warningTitle: getString("warningTitle", "Proceed with Caution"),
+      warningDescription: getString(
+        "warningDescription",
+        "Adding or modifying rulesets can cause attackers to hijack your browser. Proceed only if you know what you are doing."
+      ),
+      warningEnable: getString(
+        "warningEnable",
+        "Warn me when I attempt to access these preferences",
+      ),
+      warningButton: getString("warningButton", "Accept the Risk and Continue"),
+      // Ruleset list
+      rulesets: getString("rulesets", "Rulesets"),
+      noRulesets: getString("noRulesets", "No rulesets found"),
+      noRulesetsDescr: getString(
+        "noRulesetsDescr",
+        "When you save a ruleset in Tor Browser, it will show up here."
+      ),
+      lastUpdated: getString("lastUpdated", "Last updated %S"),
+      neverUpdated: getString(
+        "neverUpdated",
+        "Never updated, or last update failed"
+      ),
+      enabled: getString("enabled", "Enabled"),
+      disabled: getString("disabled", "Disabled"),
+      // Ruleset details
+      edit: getString("edit", "Edit"),
+      name: getString("name", "Name"),
+      jwk: getString("jwk", "JWK"),
+      pathPrefix: getString("pathPrefix", "Path Prefix"),
+      scope: getString("scope", "Scope"),
+      enable: getString("enable", "Enable this ruleset"),
+      checkUpdates: getString("checkUpdates", "Check for Updates"),
+      // Add ruleset
+      jwkPlaceholder: getString(
+        "jwkPlaceholder",
+        "The key used to sign this ruleset in the JWK (JSON Web Key) format"
+      ),
+      jwkInvalid: getString(
+        "jwkInvalid",
+        "The JWK could not be parsed, or it is not a valid key"
+      ),
+      pathPrefixPlaceholder: getString(
+        "pathPrefixPlaceholder",
+        "URL prefix that contains the files needed by the ruleset"
+      ),
+      pathPrefixInvalid: getString(
+        "pathPrefixInvalid",
+        "The path prefix is not a valid HTTP(S) URL"
+      ),
+      scopePlaceholder: getString(
+        "scopePlaceholder",
+        "Regular expression for the scope of the rules"
+      ),
+      scopeInvalid: getString(
+        "scopeInvalid",
+        "The scope could not be parsed as a regular expression"
+      ),
+      save: getString("save", "Save"),
+      cancel: getString("cancel", "Cancel"),
+    };
+
+    return retval;
+  })() /* Rulesets */,
+
   /*
     Tor Deamon Configuration Key Strings
   */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits