Skip to content

Commit

Permalink
feat: Add language parameter to deploy script (#2308)
Browse files Browse the repository at this point in the history
I have added language parameter for generating the luconfig.json file to allow generation in another language. For example is-is.

Also I have added property control to make it 'es-us' by default

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Co-authored-by: Andy Brown <asbrown002@gmail.com>
  • Loading branch information
3 people authored Mar 23, 2020
1 parent 3ca3cf9 commit 374b6f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion BotProject/Templates/CSharp/Scripts/deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Param(
[string] $environment,
[string] $luisAuthoringKey,
[string] $luisAuthoringRegion,
[string] $language,
[string] $projFolder = $(Get-Location),
[string] $botPath,
[string] $logFile = $(Join-Path $PSScriptRoot .. "deploy_log.txt")
Expand Down Expand Up @@ -31,6 +32,9 @@ if (-not $environment) {
$environment = $environment.ToLower().Split(" ") | Select-Object -First 1
}

if (-not $language) {
$language = "en-us"
}

# Reset log file
if (Test-Path $logFile) {
Expand Down Expand Up @@ -107,7 +111,7 @@ if ($luisAuthoringKey -and $luisAuthoringRegion) {
# Generate Luconfig.json file
$luconfigjson = @{
"name" = $name;
"defaultLanguage" = "en-us";
"defaultLanguage" = $language;
"models" = $noneEmptyModels
}

Expand Down

0 comments on commit 374b6f2

Please sign in to comment.