From 7cce2b74027c210804aa07525f7af49361337844 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Wed, 8 Nov 2023 10:59:49 +0100 Subject: [PATCH] :wrench: (LekaUpdater): Add env to activate l10n if needed and remove option to disable auto schemes --- Apps/LekaUpdater/Project.swift | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Apps/LekaUpdater/Project.swift b/Apps/LekaUpdater/Project.swift index b65767d9a2..9def65d3b3 100644 --- a/Apps/LekaUpdater/Project.swift +++ b/Apps/LekaUpdater/Project.swift @@ -5,6 +5,21 @@ import ProjectDescription import ProjectDescriptionHelpers +private var schemes: [Scheme] { + var schemeList: [Scheme] = [] + + if Environment.createLocalizationSchemes.getBoolean( + default: false) + { + schemeList.append(contentsOf: [ + SchemeList.l10nFR(name: "LekaUpdater"), + SchemeList.l10nEN(name: "LekaUpdater"), + ]) + } + + return schemeList +} + // Creates our project using a helper function defined in ProjectDescriptionHelpers let project = Project.iOSApp( name: "LekaUpdater", @@ -38,9 +53,5 @@ let project = Project.iOSApp( ], "LSApplicationQueriesSchemes": ["LekaApp"], ], - options: .options(automaticSchemesOptions: .disabled), - schemes: [ - SchemeList.l10nFR(name: "LekaUpdater"), - SchemeList.l10nEN(name: "LekaUpdater"), - ] + schemes: schemes )