Skip to content

Commit d7accf8

Browse files
License: Text fixes (#33550)
Co-authored-by: Aliullov Vlad <vladislav.aliullov@devexpress.com> Co-authored-by: Aliullov Vlad <91639107+GoodDayForSurf@users.noreply.github.com>
1 parent be18d2c commit d7accf8

4 files changed

Lines changed: 10 additions & 12 deletions

File tree

packages/devextreme/js/__internal/core/license/license_validation.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ describe('license check', () => {
406406
])('License verification warning should be logged if license is corrupted/invalid [%#]', ({ token, version }) => {
407407
validateLicense(token, version);
408408
expect(consoleWarnSpy).toHaveBeenCalledTimes(2);
409-
expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining('License key verification has failed'));
409+
expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining('W0021'));
410410
});
411411

412412
test.each([
@@ -497,7 +497,7 @@ describe('DevExpress license check', () => {
497497
const token = 'LCPtherestofthekey';
498498
validateLicense(token, '25.1.3');
499499
expect(consoleWarnSpy).toHaveBeenCalledTimes(2);
500-
expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining('License key verification has failed'));
500+
expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining('W0021'));
501501
expect(trialPanelSpy).toHaveBeenCalled();
502502
});
503503
});

packages/devextreme/js/__internal/core/license/license_warnings.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const TEMPLATES = Object.freeze({
55
let warningDescription = '';
66
switch (code) {
77
case 'W0019':
8-
warningDescription = 'DevExtreme: You are using a trial (evaluation) version of DevExtreme.';
8+
warningDescription = 'DevExtreme: You are using a trial (evaluation) version.';
99
break;
1010
case 'W0020':
1111
warningDescription = 'DevExtreme: License Key Has Expired.';
@@ -40,7 +40,7 @@ export const TEMPLATES = Object.freeze({
4040
case 'incompatibleVersion':
4141
return `Incompatible DevExpress license key version (v${keyVersion}). Download and register an updated DevExpress license key (v${requiredVersion}+). Clear npm/IDE/NuGet cache and rebuild your project (https://devexpress.com/DX1002).`;
4242
default:
43-
return 'License key verification has failed.';
43+
return '';
4444
}
4545
},
4646

@@ -70,10 +70,12 @@ export function logLicenseWarning(
7070

7171
const pushToLastGroup = (...items: string[]): void => {
7272
const lastGroup = warnings[warnings.length - 1];
73+
const notEmptyItems = items.filter((item) => !!item);
74+
7375
if (lastGroup.length === 1) {
74-
lastGroup.push('', ...items);
76+
lastGroup.push('', ...notEmptyItems);
7577
} else {
76-
lastGroup.push(...items);
78+
lastGroup.push(...notEmptyItems);
7779
}
7880
};
7981

packages/devextreme/license/devextreme-license.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ function main() {
184184
if(lcx && lcx.trimStart().startsWith('ewog')) {
185185
logStderr(
186186
prefixed(`${TEMPLATES.warningPrefix(1000)} ${TEMPLATES.purchaseLicense}`),
187-
TEMPLATES.keyVerificationFailed(),
188187
TEMPLATES.oldDevExtremeKey(currentVersion),
189188
TEMPLATES.keyWasFound(source.type, source.path),
190189
prefixed(`${TEMPLATES.warningPrefix(1001)} ${TEMPLATES.installationInstructions}`),
@@ -217,9 +216,6 @@ function main() {
217216
prefixed(`${TEMPLATES.warningPrefix(code)} ${TEMPLATES.keyVerificationFailed(warning.type, warning.keyVersion, warning.currentVersion)}`),
218217
);
219218
} else {
220-
lines.push(
221-
TEMPLATES.keyVerificationFailed(warning.type, warning.keyVersion, warning.currentVersion),
222-
);
223219
lines.push(prefixed(`${TEMPLATES.warningPrefix(code)} ${TEMPLATES.installationInstructions}`));
224220
}
225221
}

packages/devextreme/license/messages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const TEMPLATES = Object.freeze({
5555
'Clear npm/IDE/NuGet cache and rebuild your project (https://devexpress.com/DX1002).',
5656
].join(' ');
5757
}
58-
return 'License key verification has failed.';
58+
return '';
5959
},
6060

6161
warningCodeByType: (type) => WARNING_CODES[type] || WARNING_CODES.general,
@@ -74,7 +74,7 @@ const TEMPLATES = Object.freeze({
7474
].join(' '),
7575

7676
oldDevExtremeKey: (version) =>
77-
`A DevExtreme key (v25_2 or earlier) has been detected. Use DevExpress license key (v${version}+) instead.`,
77+
`A DevExtreme key (v25.2 or earlier) has been detected. Use DevExpress license key (v${version}+) instead.`,
7878

7979
licenseId: (id) => `License ID: ${id}`,
8080
});

0 commit comments

Comments
 (0)