Skip to content

Commit 31ab7b8

Browse files
committed
Add LocalizedData to PSM incase of load failure
1 parent 3d03a07 commit 31ab7b8

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

PowerShellBuild/PowerShellBuild.psm1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,35 @@ foreach ($import in $public + $private) {
99
}
1010
}
1111

12+
data LocalizedData {
13+
# Load here in case Import-LocalizedData is not available
14+
ConvertFrom-StringData @'
15+
NoCommandsExported=No commands have been exported. Skipping markdown generation.
16+
FailedToGenerateMarkdownHelp=Failed to generate markdown help. : {0}
17+
AddingFileToPsm1=Adding [{0}] to PSM1
18+
MakeCabNotAvailable=MakeCab.exe is not available. Cannot create help cab.
19+
DirectoryAlreadyExists=Directory already exists [{0}].
20+
PathLongerThan3Chars=`$Path [{0}] must be longer than 3 characters.
21+
BuildSystemDetails=Build System Details:
22+
BuildModule=Build Module: {0}`:{1}
23+
PowerShellVersion=PowerShell Version: {0}
24+
EnvironmentVariables={0}`Environment variables:
25+
PublishingVersionToRepository=Publishing version [{0}] to repository [{1}]...
26+
FolderDoesNotExist=Folder does not exist: {0}
27+
PathArgumentMustBeAFolder=The Path argument must be a folder. File paths are not allowed.
28+
UnableToFindModuleManifest=Unable to find module manifest [{0}]. Can't import module
29+
PesterTestsFailed=One or more Pester tests failed
30+
CodeCoverage=Code Coverage
31+
Type=Type
32+
CodeCoverageLessThanThreshold=Code coverage: [{0}] is [{1:p}], which is less than the threshold of [{2:p}]
33+
CodeCoverageCodeCoverageFileNotFound=Code coverage file [{0}] not found.
34+
SeverityThresholdSetTo=SeverityThreshold set to: {0}
35+
PSScriptAnalyzerResults=PSScriptAnalyzer results:
36+
ScriptAnalyzerErrors=One or more ScriptAnalyzer errors were found!
37+
ScriptAnalyzerWarnings=One or more ScriptAnalyzer warnings were found!
38+
ScriptAnalyzerIssues=One or more ScriptAnalyzer issues were found!
39+
'@
40+
}
1241
$importLocalizedDataSplat = @{
1342
BindingVariable = 'LocalizedData'
1443
FileName = 'Messages.psd1'

0 commit comments

Comments
 (0)