Skip to content

Commit e5d4b9c

Browse files
committed
SkyObjectField: Localize checkbox values
...
1 parent 8a0790a commit e5d4b9c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

WebUI/Common/BaseUI/SkyObjectField.m

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,18 @@ - (NSString *)_attributeValueInContext:(WOContext *)_ctx {
225225
[self calFormatAttributeInContext:_ctx]]
226226
: [tmp stringValue];
227227
}
228-
else
229-
ret = [tmp stringValue];
228+
else {
229+
int tc = [[attrib valueForKey:@"type"] intValue];
230+
231+
if (tc == 2) { /* checkbox */
232+
ret = [self localizeValueAttribute:[tmp stringValue]
233+
inContext:_ctx];
234+
if (ret == nil)
235+
ret = [tmp stringValue];
236+
}
237+
else
238+
ret = [tmp stringValue];
239+
}
230240

231241
return ret;
232242
}

0 commit comments

Comments
 (0)