mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-30 05:28:50 +00:00
Changing localized release notes behavior slightly: release note keys which are not tagged with an xml:lang attribute are no longer assumed to be English. So if the user has a foreign language anywhere in their preferred languages list, even if English is higher, release notes keyed to "da" will be picked before release notes not keyed to any language.
This commit is contained in:
1 parent
d73d8333a1
commit
00c5ae4a42
1 file changed
+2
-2
+2
-2
@@ -196,10 +196,10 @@
|
||||
while ((node = [nodeEnum nextObject]))
|
||||
{
|
||||
lang = [[node attributeForName:@"xml:lang"] stringValue];
|
||||
[languages addObject:(lang ?: @"en")]; // Default to a key being English if no xml:lang is specified.
|
||||
[languages addObject:(lang ?: @"")]; // Default to a key being English if no xml:lang is specified.
|
||||
}
|
||||
lang = [[NSBundle preferredLocalizationsFromArray:languages] objectAtIndex:0];
|
||||
i = [languages indexOfObject:(lang ?: @"en")];
|
||||
i = [languages indexOfObject:(lang ?: @"")];
|
||||
if (i == NSNotFound)
|
||||
i = 0;
|
||||
return [nodes objectAtIndex:i];
|
||||
|
||||
Reference in new issue
Block a user