[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [pluggable-transports/snowflake-webext] branch main updated: Seperate website strings from extension/badge strings
This is an automated email from the git hooks/post-receive script.
cohosh pushed a commit to branch main
in repository pluggable-transports/snowflake-webext.
The following commit(s) were added to refs/heads/main by this push:
new 29a4cc6 Seperate website strings from extension/badge strings
29a4cc6 is described below
commit 29a4cc6e0970f2e10ed610b8ae8449eafe75472c
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
AuthorDate: Wed Oct 12 14:03:12 2022 -0400
Seperate website strings from extension/badge strings
---
README.md | 7 ++--
init-badge.js | 2 +-
make.js | 2 +-
static/_locales/en_US/badge.json | 41 ++++++++++++++++++++++
.../_locales/en_US/{messages.json => website.json} | 39 --------------------
static/index.js | 2 +-
6 files changed, 48 insertions(+), 45 deletions(-)
diff --git a/README.md b/README.md
index 0bd6461..b3b354b 100644
--- a/README.md
+++ b/README.md
@@ -118,9 +118,10 @@ npm run clean
# Maybe check what's left behind
git clean -n -d -x
-# Be sure that translation/en/messages.json has been populated with any new
-# strings that may have been merged in the recent patches. It may take some
-# time for transifex to have updated. You can check with the following,
+# Be sure that website.json and badge.json in translation/en/ have been
+# populated with any new strings that may have been merged in the recent
+# patches. It may take some time for weblate to have updated. You can
+# check with the following,
git submodule update --remote
# But note that it's also run as part of the "pack-webext" script, so return
diff --git a/init-badge.js b/init-badge.js
index a4305a2..30f0242 100644
--- a/init-badge.js
+++ b/init-badge.js
@@ -247,7 +247,7 @@ var
};
window.onload = function() {
- fetch(`./_locales/${getLang()}/messages.json`)
+ fetch(`./_locales/${getLang()}/badge.json`)
.then((res) => {
if (!res.ok) { return; }
return res.json();
diff --git a/make.js b/make.js
index 6116257..0506158 100755
--- a/make.js
+++ b/make.js
@@ -109,7 +109,7 @@ var fillIndex = function(outDir) {
var indexFile = `${outDir}/index.html`;
var html = readFileSync(indexFile, 'utf8');
var dom = domino.createDocument(html);
- var locales = require(`./static/_locales/en_US/messages.json`);
+ var locales = require(`./static/_locales/en_US/website.json`);
fill(dom.body, function(m) {
return locales[m].message;
});
diff --git a/static/_locales/en_US/badge.json b/static/_locales/en_US/badge.json
new file mode 100644
index 0000000..b24d817
--- /dev/null
+++ b/static/_locales/en_US/badge.json
@@ -0,0 +1,41 @@
+{
+ "appDesc": {
+ "message": "Allow users in censored countries to use your network connection to access the Tor network."
+ },
+ "popupEnabled": {
+ "message": "Enabled"
+ },
+ "popupRunInBackground": {
+ "message": "Keep running when the browser is closed"
+ },
+ "popupLearnMore": {
+ "message": "Learn more"
+ },
+ "popupStatusOff": {
+ "message": "Snowflake is off"
+ },
+ "popupStatusOn": {
+ "message": "Number of users currently connected: $1"
+ },
+ "popupStatusReady": {
+ "message": "Your Snowflake is ready to help users circumvent censorship"
+ },
+ "popupWebRTCOff": {
+ "message": "WebRTC feature is not detected."
+ },
+ "popupBridgeUnreachable": {
+ "message": "Could not connect to the bridge."
+ },
+ "popupDescOn": {
+ "message": "Number of users your Snowflake has helped circumvent censorship in the last 24 hours: $1"
+ },
+ "popupRetry": {
+ "message": "Retry"
+ },
+ "popupRetrying": {
+ "message": "Retrying ..."
+ },
+ "badgeCookiesOff": {
+ "message": "Cookies are not enabled."
+ }
+}
diff --git a/static/_locales/en_US/messages.json b/static/_locales/en_US/website.json
similarity index 86%
rename from static/_locales/en_US/messages.json
rename to static/_locales/en_US/website.json
index 567eecd..9f7aa38 100644
--- a/static/_locales/en_US/messages.json
+++ b/static/_locales/en_US/website.json
@@ -1,43 +1,4 @@
{
- "appDesc": {
- "message": "Allow users in censored countries to use your network connection to access the Tor network."
- },
- "popupEnabled": {
- "message": "Enabled"
- },
- "popupRunInBackground": {
- "message": "Keep running when the browser is closed"
- },
- "popupLearnMore": {
- "message": "Learn more"
- },
- "popupStatusOff": {
- "message": "Snowflake is off"
- },
- "popupStatusOn": {
- "message": "Number of users currently connected: $1"
- },
- "popupStatusReady": {
- "message": "Your Snowflake is ready to help users circumvent censorship"
- },
- "popupWebRTCOff": {
- "message": "WebRTC feature is not detected."
- },
- "popupBridgeUnreachable": {
- "message": "Could not connect to the bridge."
- },
- "popupDescOn": {
- "message": "Number of users your Snowflake has helped circumvent censorship in the last 24 hours: $1"
- },
- "popupRetry": {
- "message": "Retry"
- },
- "popupRetrying": {
- "message": "Retrying ..."
- },
- "badgeCookiesOff": {
- "message": "Cookies are not enabled."
- },
"websiteIntro": {
"message": "Snowflake is a system that <strong>allows people from all over the world to access censored websites and applications</strong>. Similar to how VPNs assist users in getting around Internet censorship, Snowflake helps you avoid being noticed by Internet censors by making your Internet activity appear as though you're using the Internet for a regular video or voice call."
},
diff --git a/static/index.js b/static/index.js
index d9efc5d..e52c42f 100644
--- a/static/index.js
+++ b/static/index.js
@@ -57,7 +57,7 @@ var fill = function(n, func) {
};
let gotLang = getLang();
-fetch(`./_locales/${gotLang}/messages.json`)
+fetch(`./_locales/${gotLang}/website.json`)
.then((res) => {
if (!res.ok) { return; }
return res.json();
--
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