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

Commit 8ace622

Browse files
DingmaomaoBJTUryanisgrig
authored andcommitted
[Weather Skill] Localization issues for zh-cn (#2184)
* weather fix * fix logic bug
1 parent 7748f9d commit 8ace622

File tree

6 files changed

+120
-42
lines changed

6 files changed

+120
-42
lines changed

skills/src/csharp/experimental/weatherskill/Dialogs/ForecastDialog.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ private async Task<bool> GeographyLuisValidatorAsync(PromptValidatorContext<stri
103103
// check if geography is in state from processed LUIS result
104104
if (string.IsNullOrEmpty(state.Geography))
105105
{
106-
var prompt = ResponseManager.GetResponse(SharedResponses.LocationPrompt);
107-
await promptContext.Context.SendActivityAsync(prompt, cancellationToken: cancellationToken);
108-
return false;
106+
state.Geography = promptContext.Recognized.Value;
107+
return true;
109108
}
110109

111110
return true;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

skills/src/csharp/experimental/weatherskill/Responses/Shared/SharedResponses.zh.json

Lines changed: 118 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,177 @@
1-
{
1+
{
2+
"AuthFailed": {
3+
"replies": [
4+
{
5+
"text": "身份验证失败。请重试",
6+
"speak": "身份验证失败。请重试。"
7+
},
8+
{
9+
"text": "您无法登录。请稍后再试。",
10+
"speak": "您无法登录。请稍后再试。"
11+
},
12+
{
13+
"text": "您的登录失败。让我们再试一次。",
14+
"speak": "您的登录失败。让我们再试一次。"
15+
}
16+
],
17+
"inputHint": "acceptingInput"
18+
},
19+
"SixHourForecast": {
20+
"replies": [
21+
{
22+
"text": "以下是接下来六小时的天气。",
23+
"speak": "以下是接下来六小时的天气。"
24+
}
25+
],
26+
"inputHint": "acceptingInput"
27+
},
228
"DidntUnderstandMessage": {
329
"replies": [
430
{
5-
"text": "对不起,没有明白你的意思。",
6-
"speak": "对不起,没有明白你的意思。"
31+
"text": "对不起,我不明白你的意思。",
32+
"speak": "对不起,我不明白你的意思。"
33+
},
34+
{
35+
"text": "我不明白,也许用另一种方式再试一次。",
36+
"speak": "我不明白,也许用另一种方式再试一次。"
37+
},
38+
{
39+
"text": "你能用另一种方式问吗?",
40+
"speak": "你能用另一种方式问吗?"
41+
},
42+
{
43+
"text": "我不明白你的意思,你能换个方法试试吗?",
44+
"speak": "我不明白你的意思,你能换个方法试试吗?"
45+
},
46+
{
47+
"text": "你能详细说明一下吗?",
48+
"speak": "你能详细说明一下吗?"
49+
},
50+
{
51+
"text": "请用不同的方式再说一遍。",
52+
"speak": "请用不同的方式再说一遍。"
753
},
854
{
9-
"text": "我没有明白你的意思,你能以不同的方式尝试吗?",
10-
"speak": "我没有明白你的意思,你能以不同的方式尝试吗?"
55+
"text": "我不太明白。",
56+
"speak": "我不太明白。"
1157
},
1258
{
13-
"text": "你能以不同的方式说出来吗",
14-
"speak": "你能以不同的方式说出来吗"
59+
"text": "你能用不同的方式说吗",
60+
"speak": "你能用不同的方式说吗"
1561
},
1662
{
17-
"text": "你能再试一次问我,我没听懂你的意思",
18-
"speak": "你能再试一次问我,我没听懂你的意思"
63+
"text": "你能再问我一次吗?我不明白你的意思",
64+
"speak": "你能再问我一次吗?我不明白你的意思"
1965
}
2066
],
2167
"inputHint": "acceptingInput"
2268
},
2369
"CancellingMessage": {
2470
"replies": [
2571
{
26-
"text": "当然,我们可以稍后再做。",
27-
"speak": "当然,我们可以稍后再做。"
72+
"text": "当然,我们可以在以后再做。",
73+
"speak": "当然,我们可以在以后再做。"
74+
},
75+
{
76+
"text": "当然,我们可以稍后开始。",
77+
"speak": "当然,我们可以稍后开始。"
78+
},
79+
{
80+
"text": "没问题,你可以在另一时间再试一次。",
81+
"speak": "没问题,你可以在另一时间再试一次。"
82+
},
83+
{
84+
"text": "好吧,当你需要我的帮助时,让我知道。",
85+
"speak": "好吧,当你需要我的帮助时,让我知道。"
86+
},
87+
{
88+
"text": "当然,如果你需要我,我在这里。",
89+
"speak": "当然,如果你需要我,我在这里。"
2890
}
2991
],
3092
"inputHint": "acceptingInput"
3193
},
32-
"NoAuth": {
94+
"DidNotUnderstandLocationPrompt": {
3395
"replies": [
3496
{
35-
"text": "请登录,以便我采取进一步行动。",
36-
"speak": "请登录,以便我采取进一步行动。"
97+
"text": "对不起,我不明白。你现在在哪里?",
98+
"speak": "对不起,我不明白。你现在在哪里?"
99+
},
100+
{
101+
"text": "让我们再试一次。你现在在哪里?",
102+
"speak": "让我们再试一次。你现在在哪里?"
37103
}
38104
],
39-
"inputHint": "expectingInput"
105+
"inputHint": "acceptingInput"
40106
},
41-
"AuthFailed": {
107+
"ActionEnded": {
42108
"replies": [
43109
{
44-
"text": "您的登录失败,请稍后再试。",
45-
"speak": "您的登录失败,请稍后再试。"
110+
"text": "如果你需要我的帮助,请告诉我。",
111+
"speak": "如果你需要我的帮助,请告诉我。"
112+
},
113+
{
114+
"text": "如果你需要我,我在这里。",
115+
"speak": "如果你需要我,我在这里。"
46116
}
47117
],
48118
"inputHint": "acceptingInput"
49119
},
50-
"ActionEnded": {
120+
"NoAuth": {
51121
"replies": [
52122
{
53-
"text": "还有什么需要我的帮助吗?",
54-
"speak": "还有什么需要我的帮助吗?"
123+
"text": "请在采取进一步操作之前登录。",
124+
"speak": "请在采取进一步操作之前登录。"
55125
},
56126
{
57-
"text": "还有什么我可以帮你的吗?",
58-
"speak": "还有什么我可以帮你的吗?"
127+
"text": "请登录,以便我采取进一步的行动。",
128+
"speak": "请登录,以便我采取进一步的行动。"
59129
},
60130
{
61-
"text": "还有什么想要采取行动吗?",
62-
"speak": "还有什么想要采取行动吗?"
131+
"text": "请登录,以便我继续您的请求。",
132+
"speak": "请登录,以便我继续您的请求。"
63133
},
64134
{
65-
"text": "如果您需要我的帮助,请告诉我。",
66-
"speak": "如果您需要我的帮助,请告诉我。"
135+
"text": "你能登录,以便我进一步帮助您吗?",
136+
"speak": "你能登录,以便我进一步帮助您吗?"
67137
},
68138
{
69-
"text": "如果你需要我的帮助,我就在这里。",
70-
"speak": "如果你需要我的帮助,我就在这里。"
139+
"text": "您需要登录,以便我采取进一步操作。",
140+
"speak": "您需要登录,以便我采取进一步操作。"
141+
}
142+
],
143+
"inputHint": "expectingInput"
144+
},
145+
"LocationPrompt": {
146+
"replies": [
147+
{
148+
"text": "你现在在哪里?",
149+
"speak": "你现在在哪里?"
71150
}
72151
],
73152
"inputHint": "acceptingInput"
74153
},
75154
"ErrorMessage": {
76155
"replies": [
77156
{
78-
"text": "对不起,看起来出了问题",
79-
"speak": "对不起,看起来出了问题"
157+
"text": "对不起,好像出了什么问题",
158+
"speak": "对不起,好像出了什么问题"
80159
},
81160
{
82-
"text": "发生错误,给我一些时间,稍后再试",
83-
"speak": "发生错误,给我一些时间,稍后再试"
161+
"text": "发生错误,请稍后重试",
162+
"speak": "发生错误,请稍后重试"
84163
},
85164
{
86-
"text": "出了点问题,对不起!",
87-
"speak": "出了点问题,对不起!"
165+
"text": "出问题了,对不起!",
166+
"speak": "出问题了,对不起!"
88167
},
89168
{
90-
"text": "我相信出了点问题。你稍后可以再试一次吗",
91-
"speak": "我相信出了点问题。你稍后可以再试一次吗"
169+
"text": "好像出了什么问题。您以后再试一次吗",
170+
"speak": "好像出了什么问题。您以后再试一次吗"
92171
},
93172
{
94-
"text": "抱歉,我现在找不到你想要的东西。请稍后再试。",
95-
"speak": "抱歉,我现在找不到你想要的东西。请稍后再试。"
173+
"text": "对不起,我现在帮不上忙。请稍后再试。",
174+
"speak": "对不起,我现在帮不上忙。请稍后再试。"
96175
}
97176
],
98177
"inputHint": "acceptingInput"

0 commit comments

Comments
 (0)