richard pushed to branch tor-browser-115.4.0esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
444e340c by Pier Angelo Vendrame at 2023-11-01T15:36:40+00:00
fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.
TorStartupService is not launched on Android, so initialize FPI in
another script that is used by GV (and only once, if I understand
correctly).
- - - - -
1 changed file:
- mobile/android/components/geckoview/GeckoViewStartup.jsm
Changes:
=====================================
mobile/android/components/geckoview/GeckoViewStartup.jsm
=====================================
@@ -17,6 +17,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
PdfJs: "resource://pdf.js/PdfJs.sys.mjs",
Preferences: "resource://gre/modules/Preferences.sys.mjs",
RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs",
+ TorDomainIsolator: "resource://gre/modules/TorDomainIsolator.sys.mjs",
});
const { XPCOMUtils } = ChromeUtils.importESModule(
@@ -258,6 +259,8 @@ class GeckoViewStartup {
"GeckoView:SetLocale",
]);
+ lazy.TorDomainIsolator.init();
+
Services.obs.addObserver(this, "browser-idle-startup-tasks-finished");
Services.obs.addObserver(this, "handlersvc-store-initialized");
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/444e340…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/444e340…
You're receiving this email because of your account on gitlab.torproject.org.
richard pushed to branch tor-browser-115.4.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
693c5fb9 by Pier Angelo Vendrame at 2023-11-01T11:04:45+01:00
fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.
TorStartupService is not launched on Android, so initialize FPI in
another script that is used by GV (and only once, if I understand
correctly).
- - - - -
1 changed file:
- mobile/android/components/geckoview/GeckoViewStartup.jsm
Changes:
=====================================
mobile/android/components/geckoview/GeckoViewStartup.jsm
=====================================
@@ -17,6 +17,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
PdfJs: "resource://pdf.js/PdfJs.sys.mjs",
Preferences: "resource://gre/modules/Preferences.sys.mjs",
RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs",
+ TorDomainIsolator: "resource://gre/modules/TorDomainIsolator.sys.mjs",
});
const { XPCOMUtils } = ChromeUtils.importESModule(
@@ -258,6 +259,8 @@ class GeckoViewStartup {
"GeckoView:SetLocale",
]);
+ lazy.TorDomainIsolator.init();
+
Services.obs.addObserver(this, "browser-idle-startup-tasks-finished");
Services.obs.addObserver(this, "handlersvc-store-initialized");
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/693c5fb…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/693c5fb…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch tor-browser-115.4.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
54828940 by Henry Wilkes at 2023-11-01T09:45:33+00:00
fixup! Tor Browser localization migration scripts.
Bug 42219: Use URLs returned by weblate API rather than constructing
them ourself. The weblate structure has changed since tor-browser's
components have been grouped together under
hosted.weblate.org/projects/tor/tor-browser/
- - - - -
1 changed file:
- tools/torbrowser/migrate_l10n.py
Changes:
=====================================
tools/torbrowser/migrate_l10n.py
=====================================
@@ -103,10 +103,10 @@ class WeblateMetadata:
# Expect the final structure to be:
# {
# template: {
- # "component-name": str, # Used for API translations query.
+ # "translations-url": str, # Used for API translations query.
# "translations": {
# filename: {
- # "language-code": str, # Used for API units query.
+ # "units-url": str, # Used for API units query.
# "units": {
# context: {
# "translated": bool,
@@ -130,9 +130,8 @@ class WeblateMetadata:
with urllib.request.urlopen(weblate_request, timeout=20) as response:
return json.load(response)
- def _get_from_weblate(self, request):
+ def _get_from_weblate(self, url):
ret = []
- url = "https://hosted.weblate.org/api/" + request
while url:
response = self._get_weblate_response(url)
# Continue to fetch the next page, if it is present.
@@ -146,10 +145,12 @@ class WeblateMetadata:
if self._components is None:
self._components = {
comp["template"]: {
- "name": comp["slug"],
"translations": None,
+ "translations-url": comp["translations_url"],
}
- for comp in self._get_from_weblate("projects/tor/components/")
+ for comp in self._get_from_weblate(
+ "https://hosted.weblate.org/api/projects/tor/components/"
+ )
if comp["template"]
}
return self._components
@@ -160,16 +161,12 @@ class WeblateMetadata:
self.logger.warning(f"No component in weblate for {template}.")
return None
if component["translations"] is None:
- comp_name = component["name"]
component["translations"] = {
trans["filename"]: {
- "component-name": comp_name,
- "language-code": trans["language"]["code"],
"units": None,
+ "units-url": trans["units_list_url"],
}
- for trans in self._get_from_weblate(
- f"components/tor/{comp_name}/translations/"
- )
+ for trans in self._get_from_weblate(component["translations-url"])
}
return component["translations"]
@@ -182,15 +179,11 @@ class WeblateMetadata:
self.logger.warning(f"No translation in weblate for {file}.")
return None
if translation["units"] is None:
- comp_name = translation["component-name"]
- lang_code = translation["language-code"]
translation["units"] = {
unit["context"]: {
"translated": unit["translated"],
}
- for unit in self._get_from_weblate(
- f"translations/tor/{comp_name}/{lang_code}/units/"
- )
+ for unit in self._get_from_weblate(translation["units-url"])
}
return translation["units"]
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5482894…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5482894…
You're receiving this email because of your account on gitlab.torproject.org.