canonical / ubuntu-flutter-plugins

A collection of Flutter plugins and packages for Ubuntu applications.
46 stars 11 forks source link

fix: update unsupported country code #415

Closed matthew-hagemann closed 4 months ago

matthew-hagemann commented 4 months ago

The OEM team ran into the following issue when testing the stage 4 installer:

https://bugs.launchpad.net/ubuntu-desktop-provision/+bug/2063575

Apr 26 15:36:09 ubuntu gnome-initial-setup.desktop[1984]: flutter: INFO locale: Set eo_AQ as system locale
Apr 26 15:36:09 ubuntu gnome-initial-setup.desktop[1984]: flutter: ERROR ubuntu_init: Unhandled exception
Apr 26 15:36:09 ubuntu gnome-initial-setup.desktop[1984]: GrpcError: gRPC Error (code: 3, codeName: INVALID_ARGUMENT, message: locale is not supported, details: [], rawResponse: null, trailers: {})

Looking at the supported country codes for Esperanto, it looks to me that the issue is we have an unsupported country code assigned to it in packages/ubuntu_localizations/lib/src/l10n/ubuntu_eo.arb

These are the supported country codes:

cat /usr/share/i18n/SUPPORTED | grep eo
eo UTF-8
eo_US.UTF-8 UTF-8
medicalwei commented 4 months ago

Let me validate all locales and see whether there are anything else missing. The eo_AQ case is one of the mismatching cases.

medicalwei commented 4 months ago

I tried to diff between SUPPORTED file and this repo and eo_AQ seems to be the only mismatching case I can find, so I don't have any further questions to this PR. Thanks!

spydon commented 4 months ago

It's weird that we have country codes here at all - we don't have them in any other arb files.

LGTM 👍

It's rather the other way around I think, it's weird that we don't have country codes in the other arb files, regional language variations can change the content a lot, like en_US vs en_GB, pt_BR vs. pt_PT, zh_CN vs. zh_Hant etc.

We should probably support fallbacks within the same language code in the future though...

d-loose commented 4 months ago

Yes, good point, see also https://bugs.launchpad.net/ubuntu-desktop-provision/+bug/2063230