# HG changeset patch
# User Nicolas Chauvat <nicolas.chauvat@logilab.fr>
# Date 1583879021 -3600
# Tue Mar 10 23:23:41 2020 +0100
# Branch 3.26
# Node ID cc0ed3bb4c5646d6a64e02326ac2121180d4e69f
# Parent f783f7d1d45598bc7f606b14ef313e552f5b3f07
fix error cases when internationalizable is not defined on rdef
# User Nicolas Chauvat <nicolas.chauvat@logilab.fr>
# Date 1583879021 -3600
# Tue Mar 10 23:23:41 2020 +0100
# Branch 3.26
# Node ID cc0ed3bb4c5646d6a64e02326ac2121180d4e69f
# Parent f783f7d1d45598bc7f606b14ef313e552f5b3f07
fix error cases when internationalizable is not defined on rdef
@@ -119,11 +119,11 @@
1 return choosed 2 # All other case, generate a default string 3 attrlength = get_max_length(self.eschema, attrname) 4 num_len = numlen(index) 5 if num_len >= attrlength: 6 - ascii = self.eschema.rdef(attrname).internationalizable 7 + ascii = getattr(self.eschema.rdef(attrname), 'internationalizable', False) 8 return ('&'+decompose_b26(index, ascii))[:attrlength] 9 # always use plain text when no format is specified 10 attrprefix = attrname[:max(attrlength-num_len-1, 0)] 11 if format == 'text/html': 12 value = u'<span>�%s<b>%d</b></span>' % (attrprefix, index)