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

Uploaded file in Polish appears to be empty #4403

Open
2 tasks
compulim opened this issue Sep 6, 2022 · 2 comments · Fixed by #4404 or #4410 · May be fixed by #4874
Open
2 tasks

Uploaded file in Polish appears to be empty #4403

compulim opened this issue Sep 6, 2022 · 2 comments · Fixed by #4404 or #4410 · May be fixed by #4874
Labels
bug Indicates an unexpected problem or an unintended behavior. external-omnichannel p1 Painful if we don't fix, won't block releasing
Milestone

Comments

@compulim
Copy link
Contributor

compulim commented Sep 6, 2022

Is it an issue related to Adaptive Cards?

  • Yes, this is an Adaptive Card issue but it is specific to Web Chat.

Do you have any screenshots?

No response

What version of Web Chat are you using?

I am not using latest

Which distribution are you using Web Chat from?

Bundle (webchat.js)

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

Browser: Edge (latest), Browser: Chrome (latest), Browser: Firefox (latest), Browser: Safari (latest), Browser: IE Mode (latest), Platform: Windows, Platform: macOS, Platform: iOS/iPadOS, Platform: Android

Which area does this issue affect?

Attachment: Other rich cards

Is this an accessibility issue?

  • Yes, this is an accessibility issue.

Please describe the bug

This issue repro as early as 4.8.0 (2020 March), and did not repro on 4.7.1 (2019 December).

The technical root cause is:

  • One of our packages downloaded the official Unicode CLDR database
  • The CLDR database it downloaded is inconsistent and causing an exception:
    • The database has two parts to support internationalizing a file size: plural generator and unit formatter, we only use bytes, kilobytes, megabytes, and gigabytes
    • The plural generator turns a number into a plural type
      • In English, it turn 1 -> "one" and any other numbers -> "other" (only 2 types)
      • In Polish, the plural type for number could be "one", "many", "few", and "other" (4 types in total)
    • The unit formatter localize a number into string based on the plural type
      • In English, "one" -> "$1 byte", "other" -> "$1 bytes"
      • In Polish, "one" -> "$1 bajt", etc.
    • The inconsistency:
      • Plural generator return "one", "many", "few", "other" for Polish
      • Unit formatter only support "other"
    • This is causing the unit formatter throwing exception when the number has plural type of "one", "many", or "few"

When the Unicode CLDR is downloaded from https://github.com/unicode-cldr/cldr-units-full/archive/36.0.0.zip, it does not contains one/few/many for short/digital-gigabyte, short/digital-megabyte, and short/digital-kilobyte.

image

However, the supplemental/plurals say Polish do have plural types of one/few/many, as shown below:

image

When we are doing our investigation, we also look at another source of Unicode CLDR, at https://github.com/unicode-org/cldr/blob/release-36/common/main/pl.xml. In this source, we do see short/digital-gigabyte et al. have one/few/many.

image

We concluded the issue is rooted from the Unicode CLDR v36 database. And it is causing globalize package to fail due to the missing strings.

Do you see any errors in console log?

Based on 4.14.1.

image

image

How to reproduce the issue?

  1. Use Polish and talk to MockBot
  2. Upload a file

What is the expected and actual behavior?

Expected: the uploaded file should display properly

Actual: the uploaded file appear to be an empty box

Adaptive Card JSON

No response

Additional context

IcM ticket 332820283 and 330190903.

@compulim compulim added bug Indicates an unexpected problem or an unintended behavior. customer-reported Required for internal Azure reporting. Do not delete. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. labels Sep 6, 2022
@compulim
Copy link
Contributor Author

compulim commented Sep 7, 2022

Reopening after short-term fix. We should go for long-term fix.

@compulim compulim reopened this Sep 7, 2022
@compulim compulim added external-omnichannel and removed customer-reported Required for internal Azure reporting. Do not delete. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. labels Sep 7, 2022
@compulim compulim reopened this Sep 30, 2022
@compulim
Copy link
Contributor Author

This is filed as globalizejs/globalize#932.

@compulim compulim added the p1 Painful if we don't fix, won't block releasing label Sep 30, 2022
@compulim compulim modified the milestones: release-4.15.5, imminent Oct 29, 2022
@compulim compulim linked a pull request Sep 23, 2023 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. external-omnichannel p1 Painful if we don't fix, won't block releasing
Projects
None yet
1 participant