Skip to content

Fix date localization missing ZERODIGIT in Arabic(ar)#188473

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
QuncCccccc:date_localization_fix
Jun 24, 2026
Merged

Fix date localization missing ZERODIGIT in Arabic(ar)#188473
auto-submit[bot] merged 1 commit into
flutter:masterfrom
QuncCccccc:date_localization_fix

Conversation

@QuncCccccc

@QuncCccccc QuncCccccc commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #187767

The date localization data update removed ZERODIGIT from Flutter's generated generic Arabic (ar) DateSymbols, which caused DateFormat to fall back to ASCII digits for Arabic date formatting.

The upstream package:intl data change came from dart-lang/i18n commit dart-lang/i18n@4d96553, which removed "ZERODIGIT":"٠" from pkgs/intl/lib/src/data/dates/symbols/ar.json.

This PR is to add narrow Flutter-side compatibility override in gen_date_localizations.dart to preserve Flutter's historical generic Arabic DateFormat behavior until the upstream intl data is fixed. The override uses putIfAbsent, so an upstream fix will take precedence once available.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 24, 2026
@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. a: internationalization Supporting other languages or locales. (aka i18n) labels Jun 24, 2026
@QuncCccccc
QuncCccccc marked this pull request as ready for review June 24, 2026 02:19

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mechanism to override date symbols during localization generation, specifically adding an override for the Arabic ('ar') locale to preserve its historical zero digit ('٠'). It also includes the regenerated date localizations and a regression test to verify that Arabic date formatting behaves correctly. There are no review comments, and I have no feedback to provide.

@QuncCccccc
QuncCccccc force-pushed the date_localization_fix branch from ac2a868 to 20d9b28 Compare June 24, 2026 03:11
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 24, 2026
@QuncCccccc QuncCccccc added the CICD Run CI/CD label Jun 24, 2026
@Piinks

Piinks commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This should be ok to land since it does not directly change the Material library. 👍

@Piinks Piinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The override uses putIfAbsent, so an upstream fix will take precedence once available.

NICE!
LGTM

@QuncCccccc

Copy link
Copy Markdown
Contributor Author

The google testing failures are all related to the numbers not translated correctly. I'll set Github status and mark it as expected.

@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 24, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Jun 24, 2026
Merged via the queue into flutter:master with commit 2f39350 Jun 24, 2026
175 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 24, 2026
justinmc added a commit to justinmc/packages that referenced this pull request Jul 9, 2026
The problem was that I copied in a newer change
(flutter/flutter#188473) when I copied in the
localizations stuff. So I got the test changes from that PR, but not the
code change to make the tests pass.

In the future, this PR will come in when we upgrade the SDK for
material_ui and cupertino_ui.
justinmc added a commit to justinmc/packages that referenced this pull request Jul 14, 2026
flutter/flutter's flutter_localization package that relates to
material_ui and cupertino_ui. Moves the code to the right place, makes
sure it operates on the correct directories and works correctly and
passes CI, and rewords docs and READMEs to reflect the changes.

 * Creates a *_ui/lib/src/l10n directory.
 * Moves dart classes into material_ui and cupertino_ui.
 * Moves the arb files into material_ui and cupertino_ui.
 * Moves the *_ui l10n tests and makes sure they pass.
 * Moves the localization scripts to script/l10n and updates them to
   work in their new location.
 * Moves READMEs and rewords them, and creates a new README for the
   scripts.
 * Updates the license headers to match flutter/packages.
 * Removed some tests that shouldn't come in until flutter/flutter#188473 is ported to flutter/packages.
 * Skips some tests that failed on web that were previously not run on
   the web at all.
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jul 15, 2026
Fixes the tree. `flutter_localizations` contains a patch from flutter/flutter#188473 that has not reached stable yet. This means this test needs to accommodate a different result when tested on stable versus master. Refactored to green the tree. 
@justinmc is filing a follow up issue and looking into extending the code freeze that did not originally apply to localizations.

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: internationalization Supporting other languages or locales. (aka i18n) CICD Run CI/CD f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arabic ('ar') dates lost Arabic-Indic digits: ZERODIGIT removed from DateSymbols in 3.44 date localization update

2 participants