Skip to content

[CupertinoDatePicker] Showing months incorrectly in pt-br #138305

@jehhxuxu

Description

@jehhxuxu

Is there an existing issue for this?

Steps to reproduce

Just create an app with supportedLocales: const [Locale('pt', 'BR')], and use CupertinoDatePicker

Expected results

I think that the expected result is the month word shown correctly, maybe we can calculate the size of the word instead of the length of the word.

Actual results

Currently, CupertinoDatePicker is calculating the space of the month column based on the longestText. In pt-br the longer month is Fevereiro but Dezembro is larger in space because we have larger letters. With that, the CupertinoDatePicker is cutting the month word. Even if we set dateOrder mdy or dmy, the problem persists.

Screenshot 2023-11-11 at 16 57 40

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.5, on macOS 14.0 23A344 darwin-x64, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Community Edition (version 2023.2.3)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)f: cupertinoflutter/packages/flutter/cupertino repositoryf: date/time pickerDate or time picker widgetsfound in release: 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions