Skip to content

intl 0.20.2 got error when using DateFormat in Uyghur language #996

@isaacyan17

Description

@isaacyan17

Describe the bug
When I use Uyghur as the app language, I get the following error when using DateFormat:

The following ArgumentError was thrown building Builder:
Invalid argument(s): Invalid locale "ug"

When the exception was thrown, this was the stack: 
#0      _throwLocaleError (package:intl/src/intl_helpers.dart:207:3)
#1      verifiedLocale (package:intl/src/intl_helpers.dart:201:42)
#2      verifiedLocale (package:intl/src/intl_helpers.dart:181:12)
#3      new DateFormat (package:intl/src/intl/date_format.dart:267:27)
#4      new DateFormat.yMMMd (package:intl/src/intl/date_format.dart:548:32)
#5      _MyHomePageState.initState (package:ftest/main.dart:90:39)
#6      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5842:55)
#7      ComponentElement.mount (package:flutter/src/widgets/framework.dart:5691:5)
...     Normal element mounting (228 frames)
#235    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4539:16)
#236    MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:7159:36)
#237    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:7175:32)
...     Normal element mounting (222 frames)
#459    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4539:16)
#460    Element.updateChild (package:flutter/src/widgets/framework.dart:3998:20)
#461    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5738:16)
#462    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5874:11)
#463    Element.rebuild (package:flutter/src/widgets/framework.dart:5427:7)
#464    BuildScope._tryRebuild (package:flutter/src/widgets/framework.dart:2694:15)
#465    BuildScope._flushDirtyElements (package:flutter/src/widgets/framework.dart:2752:11)
#466    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3056:18)

seems like the translation of ug indate_symbol_data_local.dart is missing

To Reproduce
Add a minimal working example or, if not possible or available, any code which might help to reproduce the problem

 DateFormat dateFormat = DateFormat.yMMMd();
  print(dateFormat.locale);

System info

Flutter sdk version:

[!] Flutter (Channel stable, 3.32.7, on Microsoft Windows [版本 10.0.26100.1882], locale zh-CN)
[√] Windows Version (Windows 11 or higher, 24H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
[√] Android Studio (version 2024.3)

pubspec.yaml:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions