From 1dcb87b93525d1b838a23212626ba1c7ffbaec81 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 5 Dec 2012 12:39:22 +0100 Subject: [PATCH] SONAR-3986 manage abbreviations on fields like Short Name and Language --- .../resources/org/sonar/l10n/core.properties | 54 +++---------------- .../app/models/measure_filter_display_list.rb | 12 +++-- 2 files changed, 15 insertions(+), 51 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 95c4313c358..663f3c7f2c1 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -409,6 +409,13 @@ measure_filter.col.language=Language measure_filter.col.links=Links measure_filter.col.name=Name measure_filter.col.short_name=Short Name +measure_filter.abbr.date=Date +measure_filter.abbr.description=Description +measure_filter.abbr.key=Key +measure_filter.abbr.language=Lang. +measure_filter.abbr.links=Links +measure_filter.abbr.name=Name +measure_filter.abbr.short_name=Name measure_filter.col.version=Version measure_filter.missing_name=Name is missing measure_filter.name_too_long=Name is too long @@ -424,53 +431,6 @@ measure_filter.display.treemap=Treemap measure_filter.configure_columns=Configure Columns measure_filter.too_many_results=Too many results. Please refine your search. -#------------------------------------------------------------------------------ -# -# FILTERS -# -#------------------------------------------------------------------------------ - -filters.new=New filter -filters.size=Size -filters.color=Color -filters.add_filter=Add filter -filters.edit_filter=Edit filter -filters.manage_filters=Manage filters -filters.search_for=Display -filters.advanced_search=Advanced search -filters.default_period=Differential period -filters.when_no_language_no_filter_apply=When no language is selected, no filter will apply -filters.favourite_only=Favourites only -filters.key_like=Key like -filters.use_star_to_match=Use * to match zero or more characters and ? to match any single character. -filters.name_contains=Name contains -filters.do_you_want_to_delete=Do you want to delete this filter? -filters.during_last=During last -filters.prior_to_last=Prior to last -filters.search_by_name=Search by name -filters.add_column=Add column -filters.default_sorted_column=Default sorted column -filters.treemap_not_supported_for_period_selection=Treemap does not support yet the selection of a period. -filters.my_filters=My filters -filters.no_filters=No filters -filters.do_you_want_to_stop_following=Do you want to stop following this filter? -filters.criteria=Criteria -filters.display_form.title=Display -filters.display_form.as=Display as -filters.display_form.table=Table -filters.display_form.treemap=Treemap -filters.build_date=Build date -filters.col.date=Date -filters.col.language=Language -filters.col.name=Name -filters.col.links=Links -filters.col.version=Version -filters.col.key=Key -filters.default=Default filters -filters.default.description=These filters are displayed on the homepage. -filters.shared=Shared filters -filters.shared.description=These filters are shared by administrators and can be added to default filters. -filters.directChildrenCriterion=Direct Children #------------------------------------------------------------------------------ # diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_filter_display_list.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_filter_display_list.rb index d838db67e9e..10a336822d4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_filter_display_list.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_filter_display_list.rb @@ -37,14 +37,18 @@ class MeasureFilterDisplayList < MeasureFilterDisplay if @metric 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=='' + label = Api::Utils.message("measure_filter.abbr.#{@key}", :default => @key) end label end def tooltip - @metric.description if @metric + if @metric + tooltip = @metric.description + else + tooltip = Api::Utils.message("measure_filter.col.#{@key}", :default => @key) + end + tooltip end def align @@ -60,7 +64,7 @@ class MeasureFilterDisplayList < MeasureFilterDisplay end def row_css - 'nowrap' unless @metric && !@metric.numeric? + 'nowrap' unless (@metric && !@metric.numeric?) || @key=='description' end def sort? -- 2.39.5