From 7a8baa664bfe25b0106001af5ef5e730f59d695e Mon Sep 17 00:00:00 2001 From: Leo Camus Date: Thu, 17 Sep 2026 05:41:23 +0200 Subject: [PATCH] Skip en and Base when recording Sparkle locales in generate_appcast (#2925) The guard compared the directory name (e.g. "en.lproj") against "en" and "Base", so it never matched and both locales were recorded in sparkle:deltaFromSparkleLocales, taking up slots of the 7 sampled locales. Compare the locale name after dropping the .lproj extension instead. --- generate_appcast/ArchiveItem.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/generate_appcast/ArchiveItem.swift b/generate_appcast/ArchiveItem.swift index af3c779d..833a2028 100644 --- a/generate_appcast/ArchiveItem.swift +++ b/generate_appcast/ArchiveItem.swift @@ -334,14 +334,15 @@ class ArchiveItem: CustomStringConvertible { guard filename.hasSuffix(localeExtension) else { continue } - + + let locale = String(filename.dropLast(localeExtensionCount)) + // English and Base directories are the least likely to be stripped, // so let's not bother recording them. - guard filename != "en" && filename != "Base" else { + guard locale != "en" && locale != "Base" else { continue } - - let locale = String(filename.dropLast(localeExtensionCount)) + localesPresent.append(locale) localeIndex += 1