Made Swift 6 local translation support optional.

This commit is contained in:
23rd
2026-04-06 17:43:56 +03:00
parent 9cb41f4517
commit b80f25fbc5
4 changed files with 26 additions and 2 deletions
@@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/translate_provider_mac.h"
#ifndef TDESKTOP_DISABLE_SWIFT6
#include "base/weak_ptr.h"
#include "spellcheck/platform/platform_language.h"
#include "translate_provider_mac_swift_bridge.h"
@@ -102,4 +104,19 @@ bool IsTranslateProviderAvailable() {
return TranslateProviderMacSwiftIsAvailable();
}
#else // TDESKTOP_DISABLE_SWIFT6
// Local on-device translation disabled (no Swift 6).
namespace Platform {
std::unique_ptr<Ui::TranslateProvider> CreateTranslateProvider() {
return nullptr;
}
bool IsTranslateProviderAvailable() {
return false;
}
#endif // TDESKTOP_DISABLE_SWIFT6
} // namespace Platform