Skip to content

Commit

Permalink
Translate ml -> server -> lib (elastic#27974)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nox911 authored and pavel06081991 committed Jan 8, 2019
1 parent e848e10 commit 31122b2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions x-pack/plugins/ml/server/lib/check_license/check_license.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


import { LICENSE_TYPE } from '../../../common/constants/license';
import { i18n } from '@kbn/i18n';

export function checkLicense(xpackLicenseInfo) {
// If, for some reason, we cannot get the license information
Expand All @@ -15,7 +16,9 @@ export function checkLicense(xpackLicenseInfo) {
isAvailable: false,
showLinks: true,
enableLinks: false,
message: 'You cannot use Machine Learning because license information is not available at this time.'
message: i18n.translate('xpack.ml.checkLicense.licenseInformationNotAvailableThisTimeMessage', {
defaultMessage: 'You cannot use Machine Learning because license information is not available at this time.'
})
};
}

Expand All @@ -25,7 +28,9 @@ export function checkLicense(xpackLicenseInfo) {
isAvailable: false,
showLinks: false,
enableLinks: false,
message: 'Machine Learning is unavailable'
message: i18n.translate('xpack.ml.checkLicense.mlIsUnavailableMessage', {
defaultMessage: 'Machine Learning is unavailable'
})
};
}

Expand All @@ -47,7 +52,10 @@ export function checkLicense(xpackLicenseInfo) {
enableLinks: true,
hasExpired: true,
licenseType,
message: `Your ${licenseTypeName} Machine Learning license has expired.`
message: i18n.translate('xpack.ml.checkLicense.licenseHasExpiredMessage', {
defaultMessage: 'Your {licenseTypeName} Machine Learning license has expired.',
values: { licenseTypeName }
})
};
}

Expand Down

0 comments on commit 31122b2

Please sign in to comment.