fix(label): ensure the translation kept is not null

This commit is contained in:
Hivert Quentin committed 2025-09-16 16:09:01 +02:00
1 parent a7651e56c5
commit 0fb3db0608
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -27,6 +27,7 @@
@class NSArray;
@class NSString;
@class WOContext;
@class NSNull;
@interface NSObject (SOGoObjectUtilities)
+1 -1
View File
@@ -110,7 +110,7 @@ static NSMutableDictionary *translationCache = nil;
while (!label && (language = [languages nextObject]))
{
if (![translationCache objectForKey: language]) {
if (![translationCache objectForKey: language] || [[translationCache objectForKey: language] objectForKey: key] != [NSNull null]) {
paths = [bundle pathsForResourcesOfType: @"strings"
inDirectory: [NSString stringWithFormat: @"%@.lproj",
language]