measure_filter.col.version=Version
measure_filter.short_col.language=Lang.
measure_filter.short_col.short_name=Name
-measure_filter.short_col.metric.alert_status=A
measure_filter.missing_name=Name is missing
measure_filter.name_too_long=Name is too long
measure_filter.sharing=Sharing
metric.alert_status.name=Alert
metric.alert_status.description=Alert
+metric.alert_status.abbreviation=A
metric.classes.name=Classes
metric.classes.description=Classes
metric.ncloc.name=Lines of code
metric.ncloc.description=Non Commenting Lines of Code
+metric.ncloc.abbreviation=LOC
metric.packages.name=Packages
metric.packages.description=Packages
def title_label
if @metric
- label = Api::Utils.message("measure_filter.short_col.metric.#{@metric.key}", :default => '')
- label = Api::Utils.message("metric.#{@metric.key}.name", :default => @metric.short_name) if label==''
+ label = @metric.abbreviation
else
label = Api::Utils.message("measure_filter.short_col.#{@key}", :default => '')
label = Api::Utils.message("measure_filter.col.#{@key}", :default => @key) if label==''
def short_name=(value)
write_attribute(:short_name, value)
end
+
+ def abbreviation
+ label = Api::Utils.message("metric.#{key}.abbreviation", :default => '')
+ label = Api::Utils.message("metric.#{key}.name", :default => short_name) if label==''
+ label
+ end
def description(translate=true)
default_string = read_attribute(:description)