Attributes have to be translated certain ways based on their unit (ex: decimals converting to percentages). This allows us to get an easy representation of how the attribute should be printed
(self, value)
| 707 | return "%s (%d)" % (attribute.name.capitalize(), v) |
| 708 | |
| 709 | def PreformatValue(self, value): |
| 710 | """Attributes have to be translated certain ways based on their unit (ex: decimals converting to percentages). |
| 711 | This allows us to get an easy representation of how the attribute should be printed """ |
| 712 | |
| 713 | override = self.translations.get(self.name) |
| 714 | if override is not None: |
| 715 | return override[1](value), override[2](self.displayName) |
| 716 | |
| 717 | return value, self.displayName |
| 718 | |
| 719 | def SimplifyValue(self, value): |
| 720 | """Takes the internal representation value and convert it into the display value""" |
no test coverage detected