Description
Port this change from botbuilder-dotnet/master branch:
microsoft/botbuilder-dotnet#3129
Recognizers-Text added support for a few additional languages that we don't currently support in our Confirm and Choice prompts:
- Bulgarian
- Hindi
- Italian
- Korean
- Swedish
- Turkish
This PR adds support for those, ensures they get test coverage, and also adds test coverage for PromptCultureModels
.
Notes:
- I skipped adding Arabic support because it is read Right to Left, which makes prompt support tricker.
- Recognizers-Text JS SDK currently has only added Italian, but I don't believe there's a reason our C#/Node SDKs need to have matching language support
- I'm also far from a polyglot, so most of the translations were provided by [cough]Google Translate[cough]*
Need to Decide Before Merge
English is really the only language that uses the Oxford/Serial comma. I.e, in this sentence:
Yes, no, or maybe
...the second comma is the Oxford/Serial comma. Most other languages would write it as:
Yes, no or maybe
In our SDK, this is the InlineOrMore
property:
public static PromptCultureModel Spanish =>
new PromptCultureModel
{
InlineOr = " o ",
InlineOrMore = ", o ",
Locale = Culture.Spanish,
NoInLanguage = "No",
Separator = ", ",
YesInLanguage = "Sí",
};
..without the Oxford comma, InlineOrMore
would look the same as InlineOr
.
The languages that I added do not have the Oxford comma (as appropriate). However, many of the current languages we have support for do use the comma in our SDK, although would likely not in real life.
- Should those commas be removed in the SDK, or would that possibly create backwards-compat issues?