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

Commit

Permalink
[POI] fix localization issue (#2115)
Browse files Browse the repository at this point in the history
  • Loading branch information
xieofxie authored and bobokids committed Aug 19, 2019
1 parent 496b139 commit 747fec4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"size": "Large",
"weight": "Bolder",
"color": "Default",
"text": "Location services"
"text": "{CardTitle}"
}
],
"width": "stretch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"size": "Large",
"weight": "Bolder",
"color": "Light",
"text": "Location services"
"text": "{CardTitle}"
}
],
"width": "stretch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
- {KEYWORD=约克斯明斯特} 在 {ADDRESS=1827} {ADDRESS=哈钦森法院} {ADDRESS=布恩县} {ADDRESS=Md}
- {ADDRESS=z blvd。} 和 {ADDRESS=bnd 972} 在那里引导我
- {KEYWORD=齐翁国家公园} 在 {ADDRESS=第47街} 和 {ADDRESS=哥伦布的地方} 邮政编码
- {KEYWORD=祖普!} 在 {ADDRESS=1497年} {ADDRESS=希尔堡的地方} {ADDRESS=哈莱姆市} {ADDRESS=罗德岛} 在 {地址 = 帕普亚新几内亚}
- {KEYWORD=祖普!} 在 {ADDRESS=1497年} {ADDRESS=希尔堡的地方} {ADDRESS=哈莱姆市} {ADDRESS=罗德岛} 在 {ADDRESS=帕普亚新几内亚}
- 查找路线
- 哪里是 {KEYWORD=papa john's}
- 我在哪里可以找到{KEYWORD=papa john's}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ protected async Task<List<Card>> GetPointOfInterestLocationCards(DialogContext s
{
for (var i = 0; i < pointOfInterestList.Count; i++)
{
pointOfInterestList[i].CardTitle = PointOfInterestSharedStrings.CARD_TITLE;
pointOfInterestList[i] = await service.GetPointOfInterestDetailsAsync(pointOfInterestList[i]);

// Increase by one to avoid zero based options to the user which are confusing
Expand Down Expand Up @@ -656,7 +655,8 @@ protected async Task<List<Card>> GetRouteDirectionsViewCards(DialogContext sc, R
TravelTimeSpeak = GetFormattedTravelTimeSpanString(travelTimeSpan),
TravelDelaySpeak = GetFormattedTrafficDelayString(trafficTimeSpan),
ProviderDisplayText = string.Format($"{PointOfInterestSharedStrings.POWERED_BY} **{{0}}**", destination.Provider.Aggregate((j, k) => j + " & " + k).ToString()),
Speak = GetFormattedTravelTimeSpanString(travelTimeSpan)
Speak = GetFormattedTravelTimeSpanString(travelTimeSpan),
CardTitle = PointOfInterestSharedStrings.CARD_TITLE
};

cardData.Add(routeDirectionsModel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Text;
using Microsoft.Bot.Builder.Solutions.Responses;
using PointOfInterestSkill.Models.Foursquare;
using PointOfInterestSkill.Responses.Shared;

namespace PointOfInterestSkill.Models
{
Expand Down Expand Up @@ -49,6 +50,7 @@ public PointOfInterestModel(SearchResult azureMapsPoi)
Category = (azureMapsPoi.Poi?.Classifications != null)
? CultureInfo.CurrentCulture.TextInfo.ToTitleCase(azureMapsPoi.Poi.Classifications.FirstOrDefault().Names.FirstOrDefault().NameProperty)
: Category;
CardTitle = PointOfInterestSharedStrings.CARD_TITLE;

if (Provider == null)
{
Expand Down Expand Up @@ -98,6 +100,7 @@ public PointOfInterestModel(Venue foursquarePoi)
Category = (foursquarePoi.Categories != null)
? foursquarePoi.Categories.First().ShortName
: Category;
CardTitle = PointOfInterestSharedStrings.CARD_TITLE;

if (Provider == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public MainDialog(

protected override async Task OnStartAsync(DialogContext dc, CancellationToken cancellationToken = default(CancellationToken))
{
var locale = CultureInfo.CurrentUICulture;
await dc.Context.SendActivityAsync(_responseManager.GetResponse(MainResponses.WelcomeMessage));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public MainDialog(

protected override async Task OnStartAsync(DialogContext dc, CancellationToken cancellationToken = default(CancellationToken))
{
var locale = CultureInfo.CurrentUICulture;
await dc.Context.SendActivityAsync(_responseManager.GetResponse(MainResponses.WelcomeMessage));
}

Expand Down

0 comments on commit 747fec4

Please sign in to comment.