]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7634 Metric names should be localized (#967)
authorStas Vilchik <vilchiks@gmail.com>
Fri, 13 May 2016 09:57:38 +0000 (11:57 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 13 May 2016 09:57:38 +0000 (11:57 +0200)
33 files changed:
server/sonar-web/src/main/js/apps/code/components/Search.js
server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/BubbleChart.js
server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js
server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentsList.js
server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistory.js
server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemap.js
server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js
server/sonar-web/src/main/js/apps/component-measures/home/Home.js
server/sonar-web/src/main/js/apps/component-measures/home/HomeMeasuresList.js
server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js
server/sonar-web/src/main/js/apps/component-measures/home/reducer.js
server/sonar-web/src/main/js/apps/issues/facets/author-facet.js
server/sonar-web/src/main/js/apps/issues/facets/custom-values-facet.js
server/sonar-web/src/main/js/apps/issues/facets/language-facet.js
server/sonar-web/src/main/js/apps/issues/facets/project-facet.js
server/sonar-web/src/main/js/apps/issues/facets/rule-facet.js
server/sonar-web/src/main/js/apps/issues/facets/tag-facet.js
server/sonar-web/src/main/js/apps/issues/templates/facets/issues-mode-facet.hbs
server/sonar-web/src/main/js/apps/issues/templates/issues-workspace-home.hbs
server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionForm.js
server/sonar-web/src/main/js/apps/quality-gates/components/Condition.js
server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-condition-delete.hbs
server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js
server/sonar-web/src/main/js/apps/quality-profiles/templates/quality-profile-comparison.hbs
server/sonar-web/src/main/js/apps/quality-profiles/templates/quality-profiles-intro.hbs
server/sonar-web/src/main/js/apps/web-api/components/Search.js
server/sonar-web/src/main/js/components/SelectList/templates/list.hbs
server/sonar-web/src/main/js/components/issue/templates/issue-assign-form.hbs
server/sonar-web/src/main/js/components/issue/templates/issue-tags-form.hbs
server/sonar-web/src/main/js/components/select-list/controls.js
server/sonar-web/src/main/js/helpers/l10n.js
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 86044f9de8f21f29cf25de927ea33ef1e8cf1b3a..fb373856470c14d16c008432415c28ea61b6bdf8 100644 (file)
@@ -22,7 +22,7 @@ import { connect } from 'react-redux';
 import classNames from 'classnames';
 
 import { search, selectCurrent, selectNext, selectPrev } from '../actions';
-import { translateWithParameters } from '../../../helpers/l10n';
+import { translate, translateWithParameters } from '../../../helpers/l10n';
 
 class Search extends Component {
   componentDidMount () {
@@ -78,7 +78,7 @@ class Search extends Component {
               className={inputClassName}
               type="search"
               name="q"
-              placeholder="Search"
+              placeholder={translate('search_verb')}
               maxLength="100"
               autoComplete="off"/>
           <div className="note">
index 2f51e605e6527687222c8ea4be51d0298d6cdae4..bb5e925bc7363750d242e89d7aaaaae837fb9c8c 100644 (file)
@@ -26,6 +26,7 @@ import { getComponentLeaves } from '../../../../api/components';
 import { formatMeasure } from '../../../../helpers/measures';
 import Workspace from '../../../../components/workspace/main';
 import { getComponentUrl } from '../../../../helpers/urls';
+import { getLocalizedMetricName, translateWithParameters } from '../../../../helpers/l10n';
 
 const HEIGHT = 500;
 const BUBBLES_LIMIT = 500;
@@ -168,9 +169,15 @@ export default class BubbleChart extends React.Component {
             {this.renderBubbleChart()}
           </div>
 
-          <div className="measure-details-bubble-chart-axis x">{this.xMetric.name}</div>
-          <div className="measure-details-bubble-chart-axis y">{this.yMetric.name}</div>
-          <div className="measure-details-bubble-chart-axis size">Size: {this.sizeMetric.name}</div>
+          <div className="measure-details-bubble-chart-axis x">
+            {getLocalizedMetricName(this.xMetric)}
+          </div>
+          <div className="measure-details-bubble-chart-axis y">
+            {getLocalizedMetricName(this.yMetric)}
+          </div>
+          <div className="measure-details-bubble-chart-axis size">
+            {translateWithParameters('component_measures.legend.size_x', getLocalizedMetricName(this.sizeMetric))}
+          </div>
         </div>
     );
   }
index bc0d5a5f31bcf870baddd15b94bff8c07634f7ce..67063af2737cb150ed16db554bccabdef96bc7b2 100644 (file)
@@ -25,12 +25,13 @@ import LeakPeriodLegend from '../components/LeakPeriodLegend';
 import { ComplexityDistribution } from '../../overview/components/complexity-distribution';
 import { isDiffMetric, formatLeak } from '../utils';
 import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin';
+import { getLocalizedMetricName } from '../../../helpers/l10n';
 
 export default function MeasureDetailsHeader ({ measure, metric, secondaryMeasure, leakPeriod }) {
   return (
       <header className="measure-details-header">
         <h2 className="measure-details-metric">
-          {metric.name}
+          {getLocalizedMetricName(metric)}
         </h2>
 
         {isDiffMetric(metric) && (
index c9df13a2482ed701bd7294cdabb5e5fdced76be0..ff6b063441b04a03b6f56115977e8c43ca122e7f 100644 (file)
@@ -22,6 +22,7 @@ import React from 'react';
 import ComponentsListRow from './ComponentsListRow';
 import EmptyComponentsList from './EmptyComponentsList';
 import complementary from '../../config/complementary';
+import { getLocalizedMetricName } from '../../../../helpers/l10n';
 
 const ComponentsList = ({ components, metrics, selected, metric, onClick }) => {
   if (!components.length) {
@@ -39,11 +40,11 @@ const ComponentsList = ({ components, metrics, selected, metric, onClick }) => {
               <tr>
                 <th>&nbsp;</th>
                 <th className="text-right">
-                  <span className="small">{metric.name}</span>
+                  <span className="small">{getLocalizedMetricName(metric)}</span>
                 </th>
                 {otherMetrics.map(metric => (
                     <th key={metric.key} className="text-right">
-                      <span className="small">{metric.name}</span>
+                      <span className="small">{getLocalizedMetricName(metric)}</span>
                     </th>
                 ))}
               </tr>
index 22c72923f43684102ccadcff311f5da667db434f..2370fce10314fd65650fdfe8ad110af0330a56b8 100644 (file)
@@ -26,6 +26,7 @@ import Timeline from '../../../../components/charts/Timeline';
 import { getTimeMachineData } from '../../../../api/time-machine';
 import { getEvents } from '../../../../api/events';
 import { formatMeasure, getShortType } from '../../../../helpers/measures';
+import { translate } from '../../../../helpers/l10n';
 
 const HEIGHT = 500;
 
@@ -162,7 +163,7 @@ export default class MeasureHistory extends React.Component {
       return (
           <div className="measure-details-history">
             <div className="note text-center" style={{ lineHeight: `${HEIGHT}px` }}>
-              There is no historical data.
+              {translate('component_measures.no_history')}
             </div>
           </div>
       );
index 7b75d0b65f5a204eb3c73950d72129be8d6ffd48..1fe61d36ec911adf3a3e54f308f3c705eae0fa2c 100644 (file)
@@ -24,7 +24,7 @@ import { getLeakValue } from '../../utils';
 import { Treemap } from '../../../../components/charts/treemap';
 import { getChildren } from '../../../../api/components';
 import { formatMeasure } from '../../../../helpers/measures';
-import { translate, translateWithParameters } from '../../../../helpers/l10n';
+import { translate, translateWithParameters, getLocalizedMetricName } from '../../../../helpers/l10n';
 import { getComponentUrl } from '../../../../helpers/urls';
 import Workspace from '../../../../components/workspace/main';
 
@@ -93,7 +93,7 @@ export default class MeasureTreemap extends React.Component {
     const colorMeasure = component.measures[metric.key];
     const formatted = colorMeasure != null ? formatMeasure(colorMeasure, metric.type) : '—';
 
-    inner.push(`${metric.name}: ${formatted}`);
+    inner.push(`${getLocalizedMetricName(metric)}: ${formatted}`);
     inner = inner.join('<br>');
 
     return `<div class="text-left">${inner}</div>`;
@@ -213,7 +213,7 @@ export default class MeasureTreemap extends React.Component {
         <div className="measure-details-treemap">
           <ul className="list-inline note measure-details-treemap-legend">
             <li>
-              {translateWithParameters('component_measures.legend.color_x', metric.name)}
+              {translateWithParameters('component_measures.legend.color_x', getLocalizedMetricName(metric))}
             </li>
             <li>
               {translateWithParameters('component_measures.legend.size_x', translate('metric.ncloc.name'))}
index 8403346f9ec1aebaf8ed0e907e95f20a60478d4d..6f14109c27a0de295960b63af980949b9976db73 100644 (file)
@@ -20,6 +20,7 @@
 import React from 'react';
 
 import HomeMeasuresList from './HomeMeasuresList';
+import { getLocalizedMetricDomain } from '../../../helpers/l10n';
 
 export default class AllMeasuresDomain extends React.Component {
   render () {
@@ -29,7 +30,9 @@ export default class AllMeasuresDomain extends React.Component {
         <li>
           {displayHeader && (
               <header className="page-header">
-                <h3 className="page-title">{domain.name}</h3>
+                <h3 className="page-title">
+                  {getLocalizedMetricDomain(domain.name)}
+                </h3>
               </header>
           )}
 
index a68619568c11403e8c256115ae95cd044f6f6e6f..84b8dabece383e5b888c528a6e46ec035a9a8624 100644 (file)
@@ -22,7 +22,7 @@ import { Link, IndexLink } from 'react-router';
 
 import LeakPeriodLegend from '../components/LeakPeriodLegend';
 import { getLeakPeriod } from '../../../helpers/periods';
-import { translate } from '../../../helpers/l10n';
+import { translate, getLocalizedMetricDomain } from '../../../helpers/l10n';
 
 export default class Home extends React.Component {
   componentDidMount () {
@@ -61,7 +61,7 @@ export default class Home extends React.Component {
                       <Link
                           to={{ pathname: `domain/${domain.name}`, query: { id: component.key } }}
                           activeClassName="active">
-                        {domain.name}
+                        {getLocalizedMetricDomain(domain.name)}
                       </Link>
                     </li>
                 ))}
index d8eaa2bf8fe72f9b745c8d6bacaf8a62456117b9..921a24f9f03ce36bca903fa7f74e7620054b9605 100644 (file)
@@ -23,12 +23,13 @@ import sortBy from 'lodash/sortBy';
 
 import MeasuresList from './MeasuresList';
 import { domains } from '../config/domains';
+import { getLocalizedMetricName } from '../../../helpers/l10n';
 
 function sortMeasures (measures, order) {
   const [known, unknown] = partition(measures, measure => order.includes(measure.metric.key));
   return [
     ...sortBy(known, measure => order.indexOf(measure.metric.key)),
-    ...sortBy(unknown, measure => measure.metric.name)
+    ...sortBy(unknown, measure => getLocalizedMetricName(measure.metric))
   ];
 }
 
index 9ed099b4924472b6dd8a3e67f2a008a75f4144b6..95a0ac857a804c5795e72fa7c65e34c4a1547cde 100644 (file)
@@ -21,6 +21,7 @@ import React from 'react';
 import { Link } from 'react-router';
 
 import MeasureListValue from './MeasureListValue';
+import { getLocalizedMetricName } from '../../../helpers/l10n';
 
 const MeasuresList = ({ measures, component, className = 'domain-measures' }) => {
   return (
@@ -32,7 +33,7 @@ const MeasuresList = ({ measures, component, className = 'domain-measures' }) =>
               <Link to={{ pathname: `metric/${measure.metric.key}`, query: { id: component.key } }}>
                 <div className="domain-measures-name">
                     <span id={`measure-${measure.metric.key}-name`}>
-                      {measure.metric.name}
+                      {getLocalizedMetricName(measure.metric)}
                     </span>
                 </div>
 
index 9d0cfafb1f5354ab5d0d60bb7327ab196f3fd63d..757889e6860621b45f615817cb291806acc0acf1 100644 (file)
@@ -23,6 +23,7 @@ import sortBy from 'lodash/sortBy';
 import toPairs from 'lodash/toPairs';
 
 import { RECEIVE_MEASURES } from './actions';
+import { getLocalizedMetricName } from '../../../helpers/l10n';
 
 const initialState = {
   measures: undefined,
@@ -36,7 +37,7 @@ function groupByDomains (measures) {
 
   const domains = sortBy(toPairs(groupBy(measures, measure => measure.metric.domain)).map(r => {
     const [name, measures] = r;
-    const sortedMeasures = sortBy(measures, measure => measure.metric.name);
+    const sortedMeasures = sortBy(measures, measure => getLocalizedMetricName(measure.metric));
 
     return { name, measures: sortedMeasures };
   }), 'name');
index 448922fa23dcbc883c4214cd980852a04e29e8ee..bdb039f805a8283c52d4003bb04faeed6905ecf9 100644 (file)
@@ -27,7 +27,7 @@ export default CustomValuesFacet.extend({
 
   prepareSearch () {
     return this.$('.js-custom-value').select2({
-      placeholder: 'Search...',
+      placeholder: translate('search_verb'),
       minimumInputLength: 2,
       allowClear: false,
       formatNoMatches () {
index 170d96111faa5e57a46c2db44755ca83e41dede9..225d193a241c84e3a98e68eef2ea66d140e0f6c7 100644 (file)
@@ -42,7 +42,7 @@ export default BaseFacet.extend({
 
   prepareSearch () {
     return this.$('.js-custom-value').select2({
-      placeholder: 'Search...',
+      placeholder: translate('search_verb'),
       minimumInputLength: 2,
       allowClear: false,
       formatNoMatches () {
index 38164faed8faa852da5461e9dabc8a6c9dfdacb5..ab9b6671c0e8bd590ac3b34dfacff20ad8118309 100644 (file)
@@ -28,7 +28,7 @@ export default CustomValuesFacet.extend({
 
   prepareSearch () {
     return this.$('.js-custom-value').select2({
-      placeholder: 'Search...',
+      placeholder: translate('search_verb'),
       minimumInputLength: 2,
       allowClear: false,
       formatNoMatches () {
index 5b1eaf2bfd0468bf1290ad17a59040651851c42b..bc6e193242c313305b15d2ca237fccb92aaec1d8 100644 (file)
@@ -44,7 +44,7 @@ export default CustomValuesFacet.extend({
   prepareSearchForViews () {
     const componentId = this.options.app.state.get('contextComponentUuid');
     return this.$('.js-custom-value').select2({
-      placeholder: 'Search...',
+      placeholder: translate('search_verb'),
       minimumInputLength: 2,
       allowClear: false,
       formatNoMatches () {
index 9cd5a7023855879648a377ed61402df7fa18e9a7..343fa489e1c479bc383299c8b69b01113a9054d2 100644 (file)
@@ -29,7 +29,7 @@ export default CustomValuesFacet.extend({
       url += '&languages=' + languages;
     }
     return this.$('.js-custom-value').select2({
-      placeholder: 'Search...',
+      placeholder: translate('search_verb'),
       minimumInputLength: 2,
       allowClear: false,
       formatNoMatches () {
index 1e41af86e4e65f74c8d19f3795357df6f97d97bb..6bf0055b68592baaed0407a59813fa1793c56698 100644 (file)
@@ -29,7 +29,7 @@ export default CustomValuesFacet.extend({
       url += '&tags=' + tags;
     }
     return this.$('.js-custom-value').select2({
-      placeholder: 'Search...',
+      placeholder: translate('search_verb'),
       minimumInputLength: 0,
       allowClear: false,
       formatNoMatches () {
index bfbce223cf730655909c96ca15f4f51011ae4d07..26dc6a0a5abc26595153ea5dbfdefb8b06987e59 100644 (file)
@@ -3,12 +3,12 @@
     <li>
       <input type="radio" name="issues-page-mode" value="count" id="issues-page-mode-count"
              {{#eq mode 'count'}}checked{{/eq}}>
-      <label for="issues-page-mode-count">Issues</label>
+      <label for="issues-page-mode-count">{{t 'issues.facet.mode.issues'}}</label>
     </li>
     <li>
       <input type="radio" name="issues-page-mode" value="effort" id="issues-page-mode-effort"
              {{#eq mode 'effort'}}checked{{/eq}}>
-      <label for="issues-page-mode-effort">Effort</label>
+      <label for="issues-page-mode-effort">{{t 'issues.facet.mode.effort'}}</label>
     </li>
   </ul>
 </div>
index 0057630ed6ae36ffef38b06b871fd879f0ae2c64..fe32b6b8b2185c9b2d107352baeb837f75008117 100644 (file)
@@ -21,6 +21,6 @@
 
   <div class="big-spacer-top">
     or make a
-    <a href="#resolved=false" class="button spacer-left">New Search</a>
+    <a href="#resolved=false" class="button spacer-left">{{t 'issues.home.new_search'}}</a>
   </div>
 </div>
index e9cf133c2b008d9be11c84c1fb2917563102c39e..02722807a439fd14826af4cda7cdc40d55182a44 100644 (file)
@@ -21,7 +21,7 @@ import _ from 'underscore';
 import React from 'react';
 import Select from 'react-select';
 
-import { translate } from '../../../helpers/l10n';
+import { translate, getLocalizedMetricName, getLocalizedMetricDomain } from '../../../helpers/l10n';
 
 export default function AddConditionForm ({ metrics, onSelect }) {
   function handleChange (option) {
@@ -36,7 +36,7 @@ export default function AddConditionForm ({ metrics, onSelect }) {
   const options = sortedMetrics.map(metric => {
     return {
       value: metric.key,
-      label: metric.name,
+      label: getLocalizedMetricName(metric),
       domain: metric.domain
     };
   });
@@ -48,7 +48,7 @@ export default function AddConditionForm ({ metrics, onSelect }) {
     if (!previous || previous.domain !== option.domain) {
       optionsWithDomains.push({
         value: option.domain,
-        label: option.domain,
+        label: getLocalizedMetricDomain(option.domain),
         disabled: true
       });
     }
index 0e91e67d44081be1863983726986ba36742415d8..385bf06fc2eafd8fa69d1484981e73096399c4e3 100644 (file)
@@ -23,7 +23,7 @@ import Select from 'react-select';
 import DeleteConditionView from '../views/gate-conditions-delete-view';
 import Checkbox from '../../../components/shared/checkbox';
 import { createCondition, updateCondition } from '../../../api/quality-gates';
-import { translate } from '../../../helpers/l10n';
+import { translate, getLocalizedMetricName } from '../../../helpers/l10n';
 import { formatMeasure } from '../../../helpers/measures';
 
 export default class Condition extends Component {
@@ -162,7 +162,7 @@ export default class Condition extends Component {
     return (
         <tr>
           <td className="text-middle nowrap">
-            {metric.name}
+            {getLocalizedMetricName(metric)}
             {metric.hidden && (
                 <span className="text-danger little-spacer-left">
                   {translate('deprecated')}
index 8281bf0541bca6aace6c1514e966662748ac5e3b..50f0244c683b1ae0906694965861a80952331b1f 100644 (file)
@@ -24,7 +24,7 @@ import uniqBy from 'lodash/uniqBy';
 import ConditionsAlert from './ConditionsAlert';
 import AddConditionForm from './AddConditionForm';
 import Condition from './Condition';
-import { translate } from '../../../helpers/l10n';
+import { translate, getLocalizedMetricName } from '../../../helpers/l10n';
 
 function getKey (condition, index) {
   return condition.id ? condition.id : `new-${index}`;
@@ -107,7 +107,7 @@ export default class Conditions extends React.Component {
                 <p>{translate('quality_gates.duplicated_conditions')}</p>
                 <ul className="list-styled spacer-top">
                   {uniqDuplicates.map(d => (
-                      <li>{d.metric.name}</li>
+                      <li>{getLocalizedMetricName(d.metric)}</li>
                   ))}
                 </ul>
               </div>
index 221d03800167b7edd2e84c16b518fc09f6ec2ae2..5ca1ac2944c4127938274330b5c30417bdb1cfef 100644 (file)
@@ -4,7 +4,7 @@
   </div>
   <div class="modal-body">
     <div class="js-modal-messages"></div>
-    {{tp 'quality_gates.delete_condition.confirm.message' metric.name}}
+    {{tp 'quality_gates.delete_condition.confirm.message' localizedMetricName}}
   </div>
   <div class="modal-foot">
     <button id="delete-condition-submit">{{t 'delete'}}</button>
index 4c4d8bed31240abcd60a29fc925afd23d9087cec..4df1682a9076a995bb91318c863b306cdbbf8904 100644 (file)
@@ -20,6 +20,7 @@
 import ModalForm from '../../../components/common/modal-form';
 import Template from '../templates/quality-gates-condition-delete.hbs';
 import { deleteCondition } from '../../../api/quality-gates';
+import { getLocalizedMetricName } from '../../../helpers/l10n';
 
 export default ModalForm.extend({
   template: Template,
@@ -40,7 +41,8 @@ export default ModalForm.extend({
 
   serializeData () {
     return {
-      metric: this.options.metric
+      metric: this.options.metric,
+      localizedMetricName: getLocalizedMetricName(this.options.metric)
     };
   }
 });
index e34ee3e4d004e66083d1ffde0d588d4e4a902332..e26259b6bad4dfd5d1da7a9e16b3b5e84377e742 100644 (file)
@@ -6,7 +6,7 @@
 
 {{#notEmpty profiles}}
   <form class="spacer-bottom" id="quality-profile-comparison-form">
-    <label class="text-middle" for="quality-profile-comparison-with-key">With</label>
+    <label class="text-middle" for="quality-profile-comparison-with-key">{{t 'with'}}</label>
     <select id="quality-profile-comparison-with-key">
       {{#each profiles}}
         <option value="{{key}}" {{#eq key ../comparedWith}}selected{{/eq}}>{{name}}</option>
index 469fd1078a4bffd294afc663c08121b5f57ff0fa..add14e7937494d95a601008b626f2b1417497cbd 100644 (file)
@@ -1,5 +1,4 @@
 <div class="search-navigator-intro markdown">
-  <p>Quality Profiles are collections of rules to apply during an analysis.</p>
-  <p>For each language there is a default profile. All projects not explicitly assigned to some other profile will be
-    analyzed with the default.</p>
+  <p>{{t 'quality_profiles.intro1'}}</p>
+  <p>{{t 'quality_profiles.intro2'}}</p>
 </div>
index ca3ae5e2c4a1732cb1e1d35650b63fab3a635295..5f6caa881b089cad3659a55f283fb8e6bfcc01ae 100644 (file)
@@ -53,7 +53,7 @@ export default class Search extends React.Component {
                 className="spacer-left input-large"
                 type="search"
                 value={this.state.query}
-                placeholder="Search..."
+                placeholder={translate('search_verb')}
                 onChange={this.handleSearch.bind(this)}/>
           </div>
 
index 6500857a1061b96363e7e12cf540d8a8056c1926..95b602d96afad14b31a99936e1f99efb6f0a1872 100644 (file)
@@ -6,7 +6,7 @@
     <div class="select-list-search-control">
       <form class="search-box">
         <span class="search-box-submit button-clean"><i class="icon-search"></i></span>
-        <input class="search-box-input" type="search" name="q" placeholder="Search" maxlength="100" autocomplete="off">
+        <input class="search-box-input" type="search" name="q" placeholder="{{t 'search_verb'}}" maxlength="100" autocomplete="off">
       </form>
     </div>
   </div>
index 9509d7871636dbd5de7cb8f2073c01abb5c2ba19..64d2d0d71664d13d3edae323a3dd441ae0920251 100644 (file)
@@ -2,7 +2,7 @@
   <button class="search-box-submit button-clean">
     <i class="icon-search-new"></i>
   </button>
-  <input class="search-box-input" type="search" placeholder="Search" value="{{query}}">
+  <input class="search-box-input" type="search" placeholder="{{t 'search_verb'}}" value="{{query}}">
 </div>
 
 <ul class="menu"></ul>
index 9509d7871636dbd5de7cb8f2073c01abb5c2ba19..64d2d0d71664d13d3edae323a3dd441ae0920251 100644 (file)
@@ -2,7 +2,7 @@
   <button class="search-box-submit button-clean">
     <i class="icon-search-new"></i>
   </button>
-  <input class="search-box-input" type="search" placeholder="Search" value="{{query}}">
+  <input class="search-box-input" type="search" placeholder="{{t 'search_verb'}}" value="{{query}}">
 </div>
 
 <ul class="menu"></ul>
index 35e6d2456a37c4adca3d4b21e9bba5e027fee4c9..47877eae26e5104704845078214543b872062c25 100644 (file)
@@ -20,6 +20,7 @@
 import _ from 'underscore';
 import React from 'react';
 import RadioToggle from '../shared/radio-toggle';
+import { translate } from '../../helpers/l10n';
 
 export default React.createClass({
   componentWillMount() {
@@ -68,7 +69,7 @@ export default React.createClass({
                 onChange={this.search}
                 ref="search"
                 type="search"
-                placeholder="Search"
+                placeholder={translate('search_verb')}
                 initialValue={this.props.query}/>
           </div>
         </div>
index 0744ede3acf41632efd3956e9451cc0690a28aab..4327acd30e64b8a4f9acde6ae0f0a2ffd5840678 100644 (file)
@@ -95,3 +95,15 @@ export function getLocalizedDashboardName (baseName) {
   const l10nLabel = translate(l10nKey);
   return l10nLabel !== l10nKey ? l10nLabel : baseName;
 }
+
+export function getLocalizedMetricName (metric) {
+  const bundleKey = `metric.${metric.key}.name`;
+  const fromBundle = translate(bundleKey);
+  return fromBundle !== bundleKey ? fromBundle : metric.name;
+}
+
+export function getLocalizedMetricDomain (domainName) {
+  const bundleKey = `metric_domain.${domainName}`;
+  const fromBundle = translate(bundleKey);
+  return fromBundle !== bundleKey ? fromBundle : domainName;
+}
index ecbf7655cae7c49db17fb2f943026153237909e2..45971557aebb6541f696ace1e389cd3a036a5c36 100644 (file)
@@ -182,6 +182,7 @@ version=Version
 view=View
 views=Views
 violations=Violations
+with=With
 
 
 
@@ -728,6 +729,7 @@ issues.home.my_filters=My Filters
 issues.home.projects=Projects
 issues.home.authors=Authors
 issues.home.tags=Tags
+issues.home.new_search=New Search
 issues.toggle_selection_tooltip=(De-)Select all currently visible issues
 
 
@@ -836,6 +838,8 @@ issues.facet.createdAt.last_month=Last month
 issues.facet.createdAt.last_year=Last year
 issues.facet.authors=Author
 issues.facet.issues=Issue Key
+issues.facet.mode.issues=Issues
+issues.facet.mode.effort=Effort
 
 
 #------------------------------------------------------------------------------
@@ -1751,6 +1755,8 @@ quality_profiles.projects.select_hint=Click to associate this project with the q
 quality_profiles.projects.deselect_hint=Click to remove association between this project and the quality profile
 quality_profiles.no_profiles_for_comparison=There are no profiles for comparison
 quality_profiles.activate_more=Activate More
+quality_profiles.intro1=Quality Profiles are collections of rules to apply during an analysis.
+quality_profiles.intro2=For each language there is a default profile. All projects not explicitly assigned to some other profile will be analyzed with the default.
 
 
 
@@ -2202,6 +2208,9 @@ metric_domain.SCM=SCM
 metric_domain.Maintainability=Maintainability
 metric_domain.Reliability=Reliability
 metric_domain.Security=Security
+metric_domain.Issues=Issues
+metric_domain.Duplications=Duplications
+metric_domain.Coverage=Coverage
 
 
 #------------------------------------------------------------------------------
@@ -3176,3 +3185,4 @@ component_measures.tab.history=History
 component_measures.legend.color_x=Color: {0}
 component_measures.legend.size_x=Size: {0}
 component_measures.x_of_y={0} of {1}
+component_measures.no_history=There is no historical data.