Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 32070e1

Browse files
ChengxianMolzc850612
authored andcommitted
refine chinese skip (#489)
1 parent 048f9c9 commit 32070e1

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

solutions/Virtual-Assistant/src/csharp/skills/calendarskill/Dialogs/CreateEvent/Resources/CreateEventResponses.zh.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"NoTitle": {
33
"replies": [
4-
{
5-
"text": "好的,我将发送会议给{UserName},会议主题是什么?",
6-
"speak": "好的,我将发送会议给{UserName},会议主题是什么?"
7-
}
4+
{
5+
"text": "好的,我将发送会议给{UserName},会议主题是什么?或者您可以回复“跳过”来跳过这一项并使用默认设置",
6+
"speak": "好的,我将发送会议给{UserName},会议主题是什么?或者您可以回复跳过来跳过这一项并使用默认设置"
7+
}
88
],
99
"inputHint": "expectingInput"
1010
},
1111
"NoContent": {
1212
"replies": [
13-
{
14-
"text": "会议内容是什么?",
15-
"speak": "会议内容是什么?"
16-
}
13+
{
14+
"text": "会议内容是什么?或者跳过",
15+
"speak": "会议内容是什么?或者跳过"
16+
}
1717
],
1818
"inputHint": "expectingInput"
1919
},
2020
"NoLocation": {
2121
"replies": [
22-
{
23-
"text": "您要加入会议地址?",
24-
"speak": "您要加入会议地址?"
25-
}
22+
{
23+
"text": "您要加入会议地址?或者跳过",
24+
"speak": "您要加入会议地址?或者跳过"
25+
}
2626
],
2727
"inputHint": "expectingInput"
2828
},

solutions/Virtual-Assistant/src/csharp/skills/calendarskill/Dialogs/CreateEvent/Resources/CreateEventWhiteList.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ static CreateEventWhiteList()
4040
var locale = CultureInfo.CurrentUICulture.Name;
4141
}
4242

43+
// todo: discuss about whether use Luis, just whitelist, or any other solutions.
4344
public static bool IsSkip(string input)
4445
{
4546
var locale = CultureInfo.CurrentUICulture.Name.Split("-")[0].ToLower();

solutions/Virtual-Assistant/src/csharp/skills/calendarskill/Dialogs/CreateEvent/Resources/CreateEventWhiteList.zh.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"SkipPhrases": [
33
"跳过",
4-
"空着"
4+
"空着",
5+
"不要",
6+
"没有"
57
],
68
"DefaultTitle": [
79
"会议"

solutions/Virtual-Assistant/src/csharp/skills/calendarskill/Startup.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using Microsoft.Bot.Schema;
2222
using Microsoft.Bot.Solutions;
2323
using Microsoft.Bot.Solutions.Extensions;
24+
using Microsoft.Bot.Solutions.Middleware;
2425
using Microsoft.Bot.Solutions.Skills;
2526
using Microsoft.Extensions.Configuration;
2627
using Microsoft.Extensions.DependencyInjection;
@@ -127,6 +128,10 @@ public void ConfigureServices(IServiceCollection services)
127128
options.Middleware.Add(typingMiddleware);
128129

129130
options.Middleware.Add(new AutoSaveStateMiddleware(userState, conversationState));
131+
132+
var defaultLocale = Configuration.GetSection("defaultLocale").Get<string>();
133+
options.Middleware.Add(new SetLocaleMiddleware(defaultLocale ?? "en"));
134+
130135
});
131136
}
132137

0 commit comments

Comments
 (0)