From: Grégoire Aubert Date: Tue, 23 May 2017 13:50:18 +0000 (+0200) Subject: Fix localization in projects page facets X-Git-Tag: 6.4-RC3~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ecd2b90b42b8f70d18f8ab6a6fb4353267893c29;p=sonarqube.git Fix localization in projects page facets --- diff --git a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.js index e914a5180cd..c29c7f26ec6 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.js @@ -23,6 +23,7 @@ import FilterHeader from './FilterHeader'; import SortingFilter from './SortingFilter'; import CoverageRating from '../../../components/ui/CoverageRating'; import { getCoverageRatingLabel, getCoverageRatingAverageValue } from '../../../helpers/ratings'; +import { translate } from '../../../helpers/l10n'; export default class CoverageFilter extends React.PureComponent { static propTypes = { @@ -65,7 +66,7 @@ export default class CoverageFilter extends React.PureComponent { getFacetValueForOption={this.getFacetValueForOption} highlightUnder={1} header={ - + + - {option > 1 && option < 5 && and worse} + {option > 1 && + option < 5 && + {translate('and_worse')}} ); } @@ -57,7 +60,7 @@ export default class IssuesFilter extends React.PureComponent { getFacetValueForOption={this.getFacetValueForOption} highlightUnder={1} header={ - + } + header={} footer={ } + header={} /> ); } diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.js index d97524f2546..c9cb96b15bc 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.js @@ -81,7 +81,7 @@ export default class SizeFilter extends React.PureComponent { getFacetValueForOption={this.getFacetValueForOption} highlightUnder={1} header={ - + - {leftText} + {leftText || translate('worst')} - {rightText} + {rightText || translate('best')} diff --git a/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.js index c79b7bf2fb8..05f795cbd50 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.js @@ -25,6 +25,7 @@ import FilterHeader from './FilterHeader'; import SearchableFilterFooter from './SearchableFilterFooter'; import SearchableFilterOption from './SearchableFilterOption'; import { searchProjectTags } from '../../../api/components'; +import { translate } from '../../../helpers/l10n'; type Props = { query: {}, @@ -104,7 +105,7 @@ export default class TagsFilter extends React.PureComponent { organization={this.props.organization} getFacetValueForOption={this.getFacetValueForOption} highlightUnder={1} - header={} + header={} footer={ } highlightUnder={1} @@ -157,7 +157,7 @@ exports[`should render the languages facet with the selected languages 1`] = ` halfWidth={false} header={ } highlightUnder={1} @@ -194,7 +194,7 @@ exports[`should render the languages facet with the selected languages 2`] = ` data-key="languages" >
} highlightUnder={1} diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.js.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.js.snap index aeaa01f2554..1cadc1ba2e8 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.js.snap @@ -80,7 +80,7 @@ exports[`should render maximum 10 tags in the searchbox results 1`] = ` halfWidth={false} header={ } highlightUnder={1} @@ -148,7 +148,7 @@ exports[`should render the tags facet with the selected tags 1`] = ` halfWidth={false} header={ } highlightUnder={1} @@ -185,7 +185,7 @@ exports[`should render the tags facet with the selected tags 2`] = ` data-key="tags" >
} highlightUnder={1} @@ -396,7 +396,7 @@ exports[`should render the tags without the ones in the facet 2`] = ` halfWidth={false} header={ } highlightUnder={1} diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 1ed38b49f5f..aba765f0df2 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -221,7 +221,7 @@ added_since_previous_version_detailed=Added since previous version ({0}) added_since_version=Added since version {0} all_violations=All violations all_issues=All issues -apply_template +and_worse=and worse are_you_sure=Are you sure? assigned_to=Assigned to bulk_change=Bulk Change @@ -878,6 +878,9 @@ projects.visualization.coverage.description=See missing test coverage's long-ter projects.visualization.duplications=Duplications projects.visualization.duplications.description=See duplications' long-term risks to your projects. Bubble size indicates the volume of duplicated blocks in the project, and each bubble's vertical position reflects the volume of lines in those blocks. Small bubbles on the bottom edge are best. projects.limited_set_of_projects=Displayed project set limited to the top {0} projects based on current sort: {1}. +projects.facets.quality_gate=Quality Gate +projects.facets.languages=Languages +projects.facets.tags=Tags projects.sort.name=by name projects.sort.reliability=by reliability (best first) projects.sort.-reliability=by reliability (worst first) @@ -2803,7 +2806,6 @@ component_measures.not_found=The requested measure was not found. # ABOUT PAGE # #------------------------------------------------------------------------------ -about_page.read_documentation. about_page.projects_analyzed=Projects Analyzed about_page.issues_found=Issues Found about_page.read_more=Read More