diff --git a/site/download/voxvera-portable.zip b/site/download/voxvera-portable.zip index 5da5a56..ae83a14 100644 Binary files a/site/download/voxvera-portable.zip and b/site/download/voxvera-portable.zip differ diff --git a/site/index.html b/site/index.html index 97d4ce1..cee5a82 100644 --- a/site/index.html +++ b/site/index.html @@ -331,10 +331,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -343,10 +343,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -354,10 +354,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -365,10 +365,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -376,10 +376,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -387,10 +387,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -398,10 +398,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -409,10 +409,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -420,10 +420,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -431,10 +431,10 @@
- Use Tor Browser

- to help spread this message go to
+ Use Tor Browser

+ to help spread this message go to
https://voxvera.org/
- click the button below to print + click the button below to print
QR Code @@ -465,14 +465,14 @@ Join us in a revolution that values truth and transparency. Together, we can bui

- - Download + + Download Tool & Source
diff --git a/voxvera/cli.py b/voxvera/cli.py index ec4af73..29cf681 100644 --- a/voxvera/cli.py +++ b/voxvera/cli.py @@ -360,7 +360,14 @@ def build_assets( html = html.replace("{{locales}}", json.dumps(all_locales)) - # Statically replace {{placeholders}} for Tor JS-disabled compatibility + # 1. Statically replace localization tokens {{t_web_...}} + # This ensures the flyer is translated even with JS disabled. + lang_data = all_locales.get(data.get("lang", "en"), all_locales.get("en", {})) + web_tokens = lang_data.get("web", {}) + for token, translation in web_tokens.items(): + html = html.replace(f"{{{{t_web_{token}}}}}", str(translation)) + + # 2. Statically replace config placeholders {{key}} for key, value in data.items(): html = html.replace(f"{{{{{key}}}}}", str(value)) @@ -736,10 +743,17 @@ def build_site(): html = html.replace("{{locales}}", json.dumps(all_locales)) - # Update relative path for download + # 1. Statically replace localization tokens (Default to EN for initial state) + lang_data = all_locales.get("en", {}) + for category in ["web", "landing"]: + tokens = lang_data.get(category, {}) + for token, translation in tokens.items(): + html = html.replace(f"{{{{t_{category}_{token}}}}}", str(translation)) + + # 2. Update relative path for download html = html.replace("download/download.zip", "download/voxvera-portable.zip") - # Inject site-specific config data + # 3. Inject site-specific config data for key, value in data.items(): html = html.replace(f"{{{{{key}}}}}", str(value)) diff --git a/voxvera/src/index-master.html b/voxvera/src/index-master.html index cf5693f..30c3249 100644 --- a/voxvera/src/index-master.html +++ b/voxvera/src/index-master.html @@ -331,10 +331,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -343,10 +343,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -354,10 +354,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -365,10 +365,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -376,10 +376,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -387,10 +387,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -398,10 +398,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -409,10 +409,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -420,10 +420,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -431,10 +431,10 @@
- Use Tor Browser

- to help spread this message go to
+ {{t_web_tear_off_tor_browser}}

+ {{t_web_tear_off_desc}}
{{tear_off_link}}
- click the button below to print + {{t_web_tear_off_footer}}
QR Code @@ -458,14 +458,14 @@

- - Download + + {{t_web_download_button}}