【发布时间】:2020-08-04 13:03:29
【问题描述】:
我们正在尝试构建一个支持英语 (en-us) 和德语 (de-de) 的多语言聊天机器人。直到 2020 年 6 月中旬左右,我们一直在 Microsoft Teams 上使用它,没有任何问题。此后,我们注意到本地化不再正常工作。我们还注意到,这与 Teams 推出 manifest version 1.7 的时间差不多。观察到以下情况:
-
如果 Teams 管理员在其 MS Teams 客户端语言为 en-us 时上传应用程序,则所有自定义应用程序都会忽略“de-de”本地化信息,并且所有信息以及命令都仅以英语显示,即使如果用户的客户端语言是德语。
-
如果管理员在上传应用程序时使用的是 de-de 语言,则会发生完全相反的情况。来自机器人的所有信息都将使用德语,而默认语言(英语)将被忽略。
作为示例,我将分享此屏幕截图。
在这里,您可以看到虽然客户端语言是德语,但建议命令以英语显示。事实上,机器人名称和描述也是英文的。事实上,我们观察到 Microsoft 的官方清单 template 也表现出相同的行为。
这是我们的清单文件: manifest.json
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.7/MicrosoftTeams.schema.json",
"manifestVersion": "1.7",
"version": "1.0.0",
"id": "00000000-0000-0000-0000-00000000000",
"packageName": "com.sample.sample.sample.dev.bot3",
"developer": {
"name": "Sample Inc.",
"websiteUrl": "https:/sample.z6.web.core.windows.net",
"privacyUrl": "https://sample.z6.web.core.windows.net/privacy.html",
"termsOfUseUrl": "https://sample.z6.web.core.windows.net/tou.html"
},
"localizationInfo": {
"defaultLanguageTag": "en-us",
"additionalLanguages": [
{
"languageTag": "de-de",
"file": "de-de.json"
}
]
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Manifest Test EN",
"full": "Manifest Test EN Bot"
},
"description": {
"short": "Manifest Test EN",
"full": "Manifest Test EN Bot"
},
"accentColor": "#40497E",
"bots": [
{
"botId": "00000000-0000-0000-0000-00000000000",
"scopes": [
"personal"
],
"supportsFiles": true,
"isNotificationOnly": false,
"commandLists": [
{
"scopes": [
"personal"
],
"commands": [
{
"title": "Personal Command 1",
"description": "Description of Personal Command 1"
},
{
"title": "Personal Command N",
"description": "Description of Personal Command N"
}
]
}
]
}
],
"staticTabs": [
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"sample.z6.web.core.windows.net",
"token.botframework.com"
]
}
本地化文件 de-de.json
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.7/MicrosoftTeams.Localization.schema.json",
"name.short": "Manifest Test DE",
"name.full": "Manifest Test DE Bot",
"description.short": "Manifest Test DE",
"description.full": "Manifest Test DE Bot",
"bots[0].commandLists[0].commands[0].title": "Persönlicher Befehl 1",
"bots[0].commandLists[0].commands[0].description": "Beschreibung des persönlichen Befehls 1",
"bots[0].commandLists[0].commands[1].title": "Beschreibung des persönlichen Befehls N",
"bots[0].commandLists[0].commands[1].description": "Das ist DE1"
}
【问题讨论】:
标签: localization botframework manifest microsoft-teams