mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
fix(label): ensure the translation kept is not null
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
@class NSArray;
|
@class NSArray;
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class WOContext;
|
@class WOContext;
|
||||||
|
@class NSNull;
|
||||||
|
|
||||||
@interface NSObject (SOGoObjectUtilities)
|
@interface NSObject (SOGoObjectUtilities)
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ static NSMutableDictionary *translationCache = nil;
|
|||||||
|
|
||||||
while (!label && (language = [languages nextObject]))
|
while (!label && (language = [languages nextObject]))
|
||||||
{
|
{
|
||||||
if (![translationCache objectForKey: language]) {
|
if (![translationCache objectForKey: language] || [[translationCache objectForKey: language] objectForKey: key] != [NSNull null]) {
|
||||||
paths = [bundle pathsForResourcesOfType: @"strings"
|
paths = [bundle pathsForResourcesOfType: @"strings"
|
||||||
inDirectory: [NSString stringWithFormat: @"%@.lproj",
|
inDirectory: [NSString stringWithFormat: @"%@.lproj",
|
||||||
language]
|
language]
|
||||||
|
|||||||
Reference in New Issue
Block a user