aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2020-02-17 14:57:10 +0100
committerSonarTech <sonartech@sonarsource.com>2020-02-21 20:46:16 +0100
commitbb62fc4a728e45537f828a7f90f994db48df1a6e (patch)
tree64f4a58a0632084d0880893f993b5862ac7a5b49 /server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx
parentcfabfcbc0c4dc65000a2d1aca4212f7b1e720889 (diff)
downloadsonarqube-bb62fc4a728e45537f828a7f90f994db48df1a6e.tar.gz
sonarqube-bb62fc4a728e45537f828a7f90f994db48df1a6e.zip
SONAR-12829 Fix error message when encountering a license issue
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx')
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx
index 951a2af3dba..3c97fa52d3e 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx
@@ -20,9 +20,10 @@
import * as React from 'react';
import { Link } from 'react-router';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
-import { translate } from 'sonar-ui-common/helpers/l10n';
+import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { isValidLicense } from '../../../../api/marketplace';
import { withAppState } from '../../../../components/hoc/withAppState';
+import { ComponentQualifier } from '../../../../types/component';
interface Props {
appState: Pick<T.AppState, 'canAdmin'>;
@@ -74,7 +75,10 @@ export class ComponentNavLicenseNotif extends React.PureComponent<Props, State>
if (isValidLicense && currentTask.errorType !== 'LICENSING_LOC') {
return (
<Alert display="banner" variant="error">
- {translate('component_navigation.status.last_blocked_due_to_bad_license')}
+ {translateWithParameters(
+ 'component_navigation.status.last_blocked_due_to_bad_license_X',
+ translate('qualifier', currentTask.componentQualifier || ComponentQualifier.Project)
+ )}
</Alert>
);
}