diff --git a/messages/envVars.md b/messages/envVars.md index 4b1e39f02..64f1b1581 100644 --- a/messages/envVars.md +++ b/messages/envVars.md @@ -314,4 +314,4 @@ Your environment has both variables populated, and with different values. The va # sfCapitalizeRecordTypes -Boolean indicating whether or not to capitalize object settings. +Whether record types are capitalized on scrach org creation. diff --git a/messages/scratchOrgSettingsGenerator.md b/messages/scratchOrgSettingsGenerator.md new file mode 100644 index 000000000..3b2eb5da7 --- /dev/null +++ b/messages/scratchOrgSettingsGenerator.md @@ -0,0 +1,4 @@ +# noCapitalizeRecordTypeConfigVar + +Record types defined in the scratch org definition file will stop being capitalized by default in a future release. +Set the `org-capitalize-record-types` config var to `true` to enforce capitalization. diff --git a/src/org/scratchOrgSettingsGenerator.ts b/src/org/scratchOrgSettingsGenerator.ts index 6b6c012ec..1d9d62d19 100644 --- a/src/org/scratchOrgSettingsGenerator.ts +++ b/src/org/scratchOrgSettingsGenerator.ts @@ -17,9 +17,12 @@ import { PollingClient } from '../status/pollingClient'; import { ZipWriter } from '../util/zipWriter'; import { DirectoryWriter } from '../util/directoryWriter'; import { Lifecycle } from '../lifecycleEvents'; +import { Messages } from '../messages'; import { ScratchOrgInfo, ObjectSetting } from './scratchOrgTypes'; import { Org } from './org'; +Messages.importMessagesDirectory(__dirname); + export enum RequestStatus { Pending = 'Pending', InProgress = 'InProgress', @@ -212,9 +215,8 @@ export default class SettingsGenerator { }) { this.logger = Logger.childFromRoot('SettingsGenerator'); if (options?.capitalizeRecordTypes === undefined) { - void Lifecycle.getInstance().emitWarning( - 'record types will stop being capitalized by default in a future release.' - ); + const messages = Messages.loadMessages('@salesforce/core', 'scratchOrgSettingsGenerator'); + void Lifecycle.getInstance().emitWarning(messages.getMessage('noCapitalizeRecordTypeConfigVar')); this.capitalizeRecordTypes = true; } else { this.capitalizeRecordTypes = options.capitalizeRecordTypes;