From cb3baf14f52eb4365d017f640f85310735c19b79 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 20 May 2026 17:40:29 +0200 Subject: [PATCH] ungoogled-chromium: Disable translate integration: fix desktop build --- ...romium-Disable-translate-integration.patch | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/build/patches/ungoogled-chromium-Disable-translate-integration.patch b/build/patches/ungoogled-chromium-Disable-translate-integration.patch index 47a03d02..15c29179 100644 --- a/build/patches/ungoogled-chromium-Disable-translate-integration.patch +++ b/build/patches/ungoogled-chromium-Disable-translate-integration.patch @@ -18,14 +18,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/ui/BUILD.gn | 2 +- .../strings/android_chrome_strings.grd | 3 - ...translation_internals_page_handler_impl.cc | 8 + + components/live_caption/BUILD.gn | 3 + components/live_caption/features.cc | 1 + .../buildflags/features.gni | 2 +- + .../public/mojom/BUILD.gn | 2 +- .../core/browser/translate_manager.cc | 5 +- .../core/browser/translate_script.cc | 17 +- ...n_device_speech_recognition_engine_impl.cc | 3 +- ...on_device_speech_recognition_engine_impl.h | 2 + media/base/media_switches.cc | 1 + - 19 files changed, 32 insertions(+), 224 deletions(-) + 21 files changed, 36 insertions(+), 225 deletions(-) diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn @@ -458,6 +460,19 @@ diff --git a/chrome/browser/ui/webui/on_device_translation_internals/on_device_t page_->OnLanguagePackStatus(std::move(info_list)); } +diff --git a/components/live_caption/BUILD.gn b/components/live_caption/BUILD.gn +--- a/components/live_caption/BUILD.gn ++++ b/components/live_caption/BUILD.gn +@@ -109,6 +109,9 @@ if (!is_android && !is_ios) { + "//ui/native_theme", + ] + ++ public_deps += [ ++ "//components/on_device_translation/public/mojom", ++ ] + if (enable_on_device_translation) { + sources += [ + "translation_dispatcher_on_device.cc", diff --git a/components/live_caption/features.cc b/components/live_caption/features.cc --- a/components/live_caption/features.cc +++ b/components/live_caption/features.cc @@ -478,6 +493,18 @@ diff --git a/components/on_device_translation/buildflags/features.gni b/componen - enable_on_device_translation = is_mac || is_win || is_linux || is_chromeos + enable_on_device_translation = false } +diff --git a/components/on_device_translation/public/mojom/BUILD.gn b/components/on_device_translation/public/mojom/BUILD.gn +--- a/components/on_device_translation/public/mojom/BUILD.gn ++++ b/components/on_device_translation/public/mojom/BUILD.gn +@@ -5,7 +5,7 @@ + import("//components/on_device_translation/buildflags/features.gni") + import("//mojo/public/tools/bindings/mojom.gni") + +-assert(enable_on_device_translation) ++# assert(enable_on_device_translation) + + mojom("mojom") { + sources = [ diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc --- a/components/translate/core/browser/translate_manager.cc +++ b/components/translate/core/browser/translate_manager.cc