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.
This commit is contained in:
Leo Camus authored and GitHub committed 2026-09-16 20:41:23 -07:00
1 parent 07db2480ad
commit 7a8baa664b
1 file changed
+5 -4
+5 -4
View File
@@ -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