Skip to content

Uploaded file in Polish appears to be empty #4403

@compulim

Description

@compulim

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or an unintended behavior.external-omnichannelp1Painful if we don't fix, won't block releasing

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions