Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add french language for the number prompt #1484

Closed
erbizard opened this issue Dec 9, 2019 · 6 comments · Fixed by #1573
Closed

Add french language for the number prompt #1484

erbizard opened this issue Dec 9, 2019 · 6 comments · Fixed by #1573
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository.

Comments

@erbizard
Copy link

erbizard commented Dec 9, 2019

Hi,

After testing the number prompt on teams I just found an "error".
If your local is "fr" you can't use the number prompt since the language isn't imported in the prompt
Error: E_MISSING_BUNDLE: {"locale":"fr"} at createError (...\node_modules\cldrjs\dist\cldr.js:339:11) at validate (...\node_modules\cldrjs\dist\cldr.js:355:10) at Cldr.main (...\node_modules\cldrjs\dist\cldr.js:669:3) at numberNumberingSystem (...\node_modules\globalize\dist\globalize\number.js:553:14) at numberPattern (...\node_modules\globalize\dist\globalize\number.js:1433:37) at Globalize.numberParser.Globalize.numberParser (...\node_modules\globalize\dist\globalize\number.js:1545:13) at NumberPrompt.<anonymous> (...\node_modules\botbuilder-dialogs\lib\prompts\numberPrompt.js:69:51) at Generator.next (<anonymous>) at ...\node_modules\botbuilder-dialogs\lib\prompts\numberPrompt.js:7:71 at new Promise (<anonymous>) { code: 'E_MISSING_BUNDLE', locale: 'fr' }

To fix that , in lib/prompts/numberPrompt.js

[...]
const Spanish = require("cldr-data/main/es/numbers.json");
const French = require("cldr-data/main/fr/numbers.json");
const Globalize = require("globalize");
Globalize.load(Chinese, English, Dutch, German, Japanese, LikelySubtags, NumberingSystem,
Portuguese, Spanish, French);
[...]

If this can be added that will be very nice (it's sad to extend the lib for that)

regards,
Arthur Rouet.

@CoHealer CoHealer added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Issue is created by anyone that is not a collaborator in the repository. labels Dec 9, 2019
@tracyboehrer
Copy link
Member

@mdrichardson Can you comment on this?

@mdrichardson
Copy link
Contributor

mdrichardson commented Dec 9, 2019

@tracyboehrer This is unrelated to the changes that I made to Confirm and Choice Prompts, as this uses the cldr npm package. I can look into it, however.

@mdrichardson
Copy link
Contributor

mdrichardson commented Dec 9, 2019

@erbizard @tracyboehrer Looks like this may be a mistake as Number Prompt supports all of the same languages as Confirm/Choice prompts except French.

I'll work a fix for this into a PR for some additional language support that's in my backlog.

@mdrichardson mdrichardson added the customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. label Dec 9, 2019
@cleemullins
Copy link
Contributor

I've approved the PR. Just waiting for a JS person (@christopheranderson) to chime in and merge.

@cleemullins
Copy link
Contributor

PR is currently failing to build. Working with @mdrichardson to get it fixed so we can merge.

@mdrichardson
Copy link
Contributor

@cleemullins Looking into it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository.
Projects
None yet
5 participants