mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Made Swift 6 local translation support optional.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user