From f9e6bc829dcfa513917d185e8b1fc1595abe2ab0 Mon Sep 17 00:00:00 2001 From: Matt Seaman Date: Tue, 16 Dec 2025 01:29:47 -0500 Subject: [PATCH] Provide LOCALIZED_STRING_CODE_COMMENTS build setting definition. Clients of SwiftBuild can use this to inform String Catalog sync and other localization behaviors. --- Sources/SWBCore/Specs/CoreBuildSystem.xcspec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/SWBCore/Specs/CoreBuildSystem.xcspec b/Sources/SWBCore/Specs/CoreBuildSystem.xcspec index d0e4fdb1..4b19b867 100644 --- a/Sources/SWBCore/Specs/CoreBuildSystem.xcspec +++ b/Sources/SWBCore/Specs/CoreBuildSystem.xcspec @@ -3655,6 +3655,13 @@ When this setting is enabled: Category = "Localization"; Description = "When enabled, literal strings in SwiftUI will be extracted during localization export. This will only extract string literals in `Text()` initializers, unless `SWIFT_EMIT_LOC_STRINGS` is also enabled."; }, + { Name = LOCALIZED_STRING_CODE_COMMENTS; + Type = Boolean; + DefaultValue = NO; + DisplayName = "Localized Strings in Code Comments"; + Category = "Localization"; + Description = "When enabled, localizable strings wrapped in NSLocalizedString and similar string macros will be extracted even if commented out or wrapped in `#if 0`."; + }, { Name = "STRINGSDATA_ROOT"; Type = Path;